/**
 * ThermPro Part Finder Styles
 */

.thermpro-part-finder {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.thermpro-part-finder .finder-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f26522;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.thermpro-part-finder .finder-title svg {
    color: #f26522;
}

/* Search by Part Number */
.thermpro-part-finder .finder-search {
    margin-bottom: 20px;
}

.thermpro-part-finder .finder-search input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.thermpro-part-finder .finder-search input:focus {
    outline: none;
    border-color: #f26522;
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.1);
}

.thermpro-part-finder .finder-search input::placeholder {
    color: #999;
}

/* Filter Dropdowns */
.thermpro-part-finder .finder-filters {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.thermpro-part-finder .finder-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.thermpro-part-finder .finder-field label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.thermpro-part-finder .finder-field select {
    width: 100%;
    height: 44px;
    padding: 0 35px 0 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    line-height: 44px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    vertical-align: middle;
}

.thermpro-part-finder .finder-field select:focus {
    outline: none;
    border-color: #f26522;
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.1);
}

.thermpro-part-finder .finder-field select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Text input fields (OE Number) */
.thermpro-part-finder .finder-field input[type="text"] {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    line-height: 44px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.thermpro-part-finder .finder-field input[type="text"]:focus {
    outline: none;
    border-color: #f26522;
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.1);
}

.thermpro-part-finder .finder-field input[type="text"]::placeholder {
    color: #999;
}

/* Search Button */
.thermpro-part-finder .finder-submit {
    margin-top: 5px;
}

.thermpro-part-finder .finder-submit button {
    width: 100%;
    padding: 14px 20px;
    background: #f26522;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.thermpro-part-finder .finder-submit button:hover {
    background: #d9541a;
}

.thermpro-part-finder .finder-submit button:active {
    transform: scale(0.98);
}

/* Active Filters */
.thermpro-part-finder .finder-active-filters {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.thermpro-part-finder .finder-active-filters .active-label {
    font-size: 12px;
    color: #777;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.thermpro-part-finder .finder-active-filters .filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.thermpro-part-finder .finder-active-filters .filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 13px;
    color: #333;
}

.thermpro-part-finder .finder-active-filters .filter-tag .remove-filter {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    line-height: 1;
}

.thermpro-part-finder .finder-active-filters .filter-tag .remove-filter:hover {
    background: #f26522;
    color: #fff;
}

.thermpro-part-finder .finder-active-filters .clear-all {
    margin-top: 10px;
}

.thermpro-part-finder .finder-active-filters .clear-all a {
    font-size: 13px;
    color: #f26522;
    text-decoration: none;
}

.thermpro-part-finder .finder-active-filters .clear-all a:hover {
    text-decoration: underline;
}

/* Loading State */
.thermpro-part-finder.is-loading {
    position: relative;
    pointer-events: none;
}

.thermpro-part-finder.is-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
}

.thermpro-part-finder .finder-field.is-loading select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 50 50'%3E%3Cpath fill='%23f26522' d='M25 5A20 20 0 1 0 45 25 20 20 0 0 0 25 5zm0 35A15 15 0 1 1 40 25 15 15 0 0 1 25 40z' opacity='.3'/%3E%3Cpath fill='%23f26522' d='M25 5v5a15 15 0 0 1 15 15h5A20 20 0 0 0 25 5z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.8s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
}

/* -----------------------------------------------
   Slim down the category page banner/breadcrumb
   on WooCommerce archive pages (shop, categories)
   ----------------------------------------------- */
body.post-type-archive-product .breadcrumb-area.ptb-150,
body.tax-product_cat .breadcrumb-area.ptb-150,
body.tax-pa_product-type .breadcrumb-area.ptb-150 {
    padding: 40px 0 !important;
}

body.post-type-archive-product .breadcrumb-area .breadcrumb h1,
body.tax-product_cat .breadcrumb-area .breadcrumb h1,
body.tax-pa_product-type .breadcrumb-area .breadcrumb h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

body.post-type-archive-product .breadcrumb-area .breadcrumb ul,
body.tax-product_cat .breadcrumb-area .breadcrumb ul,
body.tax-pa_product-type .breadcrumb-area .breadcrumb ul {
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .thermpro-part-finder {
        padding: 15px;
    }

    .thermpro-part-finder .finder-title {
        font-size: 16px;
    }

    body.post-type-archive-product .breadcrumb-area.ptb-150,
    body.tax-product_cat .breadcrumb-area.ptb-150,
    body.tax-pa_product-type .breadcrumb-area.ptb-150 {
        padding: 25px 0 !important;
    }

    body.post-type-archive-product .breadcrumb-area .breadcrumb h1,
    body.tax-product_cat .breadcrumb-area .breadcrumb h1,
    body.tax-pa_product-type .breadcrumb-area .breadcrumb h1 {
        font-size: 20px;
    }
}

/* Widget compatibility */
.widget_thermpro_part_finder .thermpro-part-finder {
    box-shadow: none;
    padding: 0;
}
