/* Advanced Search Widget Styling */
.wf-advanced-search-container {
    color: #ffffff;
    font-family: 'Wix Madefor Text', sans-serif;
}

.wf-advanced-search-header h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #fff;
}

.wf-advanced-search-header p {
    font-size: 16px;
    color: #94a3b8;
    margin-bottom: 30px;
}

.wf-advanced-search-tabs {
    display: flex;
    gap:10px;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 30px;
}

.wf-tab-btn {
    background: transparent;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.wf-tab-btn.active {
    border-bottom-color: #ef4444;
    /* Match the red/orange line in mockup */
}

.wf-tab-btn .tab-title {
    font-size: 14px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}

.wf-tab-btn.active .tab-title {
    color: #ef4444;
}

.wf-tab-btn .tab-subtitle {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.wf-tab-btn.active .tab-subtitle {
    color: #ef4444;
    opacity: 0.8;
}

.wf-advanced-search-content {
    background: rgba(30, 41, 59, 0.5);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #1e293b;
}

.panel-instruction {
    font-size: 15px;
    color: #e2e8f0;
    margin-bottom: 20px;
}

.wf-search-form-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: flex-end;
}

.rim-specs-row {
    grid-template-columns: repeat(5, 1fr);
}

.wf-form-group {
    display: flex;
    flex-direction: column;
}

.wf-form-group select {
    background: #1e293b;
    border: 1px solid #334155;
    color: #f1f5f9;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    outline: none;
    transition: border-color 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.wf-form-group select:focus {
    border-color: #ef4444;
}

.wf-form-group select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wf-adv-search-submit {
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

.wf-adv-search-submit:hover {
    background: #dc2626;
}

.wf-tab-panel {
    display: none;
}

.wf-tab-panel.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .wf-search-form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .wf-advanced-search-tabs {
        flex-direction: column;
    }

    .wf-tab-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .wf-search-form-row {
        grid-template-columns: 1fr;
    }
}

/* Compact Header Search Bar */
.wf-header-search-bar {
    background: #0f172a;
    border-radius: 8px;
    padding: 4px;
    border: 1px solid #1e293b;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.wf-header-search-bar .wf-compact-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wf-header-search-bar .wf-compact-group {
    flex: 1;
    border-right: 1px solid #1e293b;
}

.wf-header-search-bar .wf-compact-group:last-of-type {
    border-right: none;
}

.wf-header-search-bar select {
    background: transparent;
    border: none !important;
    color: #e2e8f0 !important;
    font-size: 13px !important;
    padding: 8px 24px 8px 10px !important;
    width: 100% !important;
    outline: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 6px center !important;
    cursor: pointer;
    box-shadow: none !important;
}

.wf-compact-submit {
    background: #ef4444;
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-left: 4px;
}

.wf-compact-submit:hover {
    background: #dc2626;
}

.wf-compact-more {
    color: #64748b;
    padding: 0 8px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.wf-compact-more:hover {
    color: #fff;
}

@media (max-width: 1200px) {
    .wf-header-search-bar {
        max-width: 450px;
    }
}

@media (max-width: 991px) {
    .wf-header-search-bar {
        display: none;
    }
}

/* Select2 Custom Styling */
.select2-container--default .select2-selection--single {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    height: 46px !important;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #f1f5f9 !important;
    padding-left: 16px !important;
    padding-right: 30px !important;
    font-size: 14px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px !important;
    right: 10px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #94a3b8 transparent transparent transparent !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #94a3b8 transparent !important;
}

.select2-dropdown {
    background-color: #0f172a !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5) !important;
    z-index: 10001 !important;
}

.select2-search--dropdown {
    padding: 10px !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #fff !important;
    border-radius: 4px !important;
    outline: none !important;
}

.select2-results__option {
    padding: 10px 16px !important;
    font-size: 14px !important;
    color: #94a3b8 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #ef4444 !important;
    color: #fff !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #334155 !important;
    color: #fff !important;
}

/* Compact Header Search Tweaks */
.compact-header-form .select2-container--default .select2-selection--single {
    background-color: transparent !important;
    border: none !important;
    height: 32px !important;
}

.compact-header-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 13px !important;
    padding-left: 10px !important;
    color: #e2e8f0 !important;
}

.compact-header-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 30px !important;
    right: 5px !important;
}

.select2-container--default .select2-selection--single[aria-disabled="true"] {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

@media (max-width: 991px) {
    .wf-header-search-bar {
        display: none;
    }
}