/* Saira font import */
@import url('https://fonts.googleapis.com/css2?family=Saira:wght@400;500;600;700&display=swap');

:root {
    /* Temel Renkler */
    --wpce-primary: #101920;
    --wpce-secondary: #1F303C;
    --wpce-text: #7A7A7A;
    --wpce-accent: #F3F5F2;
    --wpce-border: #e0e0e0;
    --wpce-error: #F7494B;
    --wpce-red: #F7494B;
    --wpce-green: #9DE0BC;
    --wpce-dark-green: #3CB371;
    
    /* Temel Ölçüler */
    --wpce-radius: 4px;
    --wpce-padding: 12px;
    --wpce-margin: 10px;
}

/* Temel Reset */
.wpce-field select,
.wpce-field input,
.wpce-field-term,
.wpce-button {
    margin: 0;
    padding: 0;
    border: none;
    /* background: none; <- Bu satırı kaldırdık, şimdi component dosyasındaki stilleri kullanacak */
    font-family: inherit;
    font-size: inherit;
    line-height: 1;
    color: inherit;
}

/* Ana Container */
.wpce-filter-widget-inner {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

/* Form Elemanları */
.wpce-field {
    margin-bottom: 10px;
    width: 100%;
    position: relative;
}

.wpce-field select,
.wpce-field input[type="submit"] {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--wpce-border);
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    text-align: left;
}

/* Label Düzenlemeleri */
.wpce-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: var(--wpce-text);
}

/* Submit Button */
.wpce-field input[type="submit"] {
    background: var(--wpce-red);
    color: #fff;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* Mesaj Stilleri */
.wpce-compatible,
.wpce-incompatible,
.wpce-error-message {
    padding: 8px 10px;
    border-radius: 4px;
    margin: 0;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: transparent;
    font-family: 'Saira', sans-serif; /* Saira font olarak değiştirildi */
    text-transform: uppercase; /* Büyük harf yapıldı */
}

.wpce-compatible {
    color: var(--wpce-dark-green);
}

.wpce-incompatible {
    color: var(--wpce-red);
}

.wpce-error-message {
    color: var(--wpce-red);
}

/* Ürün Validasyon Stilleri */
.wpce-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    margin: 0;
    border-radius: 6px;
    background: transparent;
}

.wpce-message {
    flex: 1;
    margin: 0;
}

.wpce-button {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
}

.wpce-button:hover {
    transform: translateY(-1px);
}

.wpce-button.uyumlu {
    background: var(--wpce-green);
    color: var(--wpce-primary);
}

.wpce-button.uyumsuz {
    background: var(--wpce-red);
    color: #fff;
}

/* Popup Stilleri */
.wpce-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: none;
    width: 90%;
    max-width: 500px;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.wpce-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: var(--wpce-text);
}

.wpce-popup-instr {
    margin: 0 0 15px;
    font-weight: 500;
    color: var(--wpce-primary);
}

/* Tablo Stilleri */
.wpce-table-container {
    border: 1px solid var(--wpce-border);
    border-radius: var(--wpce-radius);
    overflow-x: auto;
    margin: var(--wpce-margin) 0;
}

.wpce-product-terms-list-table {
    width: 100%;
    border-spacing: 0;
    text-transform: uppercase;
}

.wpce-product-terms-list-table th {
    background: #f8f9fa;
    padding: 6px 12px;
    text-align: left;
    font-weight: 600;
    border: 0;
    border-bottom: 1px solid var(--wpce-border);
    font-size: 13px;
}

.wpce-product-terms-list-table td {
    padding: 6px 12px;
    border: 0;
    border-bottom: 1px solid var(--wpce-border);
    font-size: 13px;
    line-height: 1.3;
}

/* Loading İndikatörü */
.wpce-processing {
    opacity: 0.7;
    pointer-events: none;
}

/* Mobil Optimizasyonu */
@media (max-width: 768px) {
    .wpce-field {
        margin-bottom: 10px;
    }

    .wpce-field select,
    .wpce-field input[type="submit"] {
        height: 42px;
        font-size: 13px;  /* Changed from 6px to 13px */
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .wpce-widget {
        flex-direction: column;
        gap: 8px;
    }

    .wpce-message {
        margin: 0;
    }

    .wpce-compatible,
    .wpce-incompatible {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding: 14px;
    }    .wpce-button {
        width: 100%;
        justify-content: center;
    }

    .wpce-redirect-btn {
        width: 100% !important;
        justify-content: center !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .wpce-popup {
        width: calc(100% - 30px);
        margin: 15px;
        padding: 15px;
    }

    .wpce-table-container {
        margin: 0;
        padding: 0;
        border: none;
    }

    .wpce-product-terms-list-table {
        width: 100%;
        border-collapse: collapse;
    }

    .wpce-product-terms-list-table tr {
        display: flex;
        border-bottom: 1px solid var(--wpce-border);
        padding: 2px;
    }

    .wpce-product-terms-list-table th,
    .wpce-product-terms-list-table td {
        font-size: 7px;
        padding: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: left;
    }

    .wpce-product-terms-list-table thead tr {
        background: #f8f9fa;
    }

    /* Sütun genişlikleri */
    .wpce-product-terms-list-table td:first-child,
    .wpce-product-terms-list-table th:first-child {
        flex: 2;
        font-weight: 600;
    }

    .wpce-product-terms-list-table td:nth-child(2),
    .wpce-product-terms-list-table th:nth-child(2) {
        flex: 1.5;
    }

    .wpce-product-terms-list-table td:nth-child(3),
    .wpce-product-terms-list-table td:nth-child(4),
    .wpce-product-terms-list-table th:nth-child(3),
    .wpce-product-terms-list-table th:nth-child(4) {
        flex: 1;
        color: var(--wpce-text);
    }

    .wpce-table-container {
        margin: 0;
        padding: 0;
        border: none;
    }

    .wpce-product-terms-list-table {
        width: 100%;
    }

    .wpce-product-terms-list-table tr {
        display: flex;
        align-items: center;
        border-bottom: 1px solid var(--wpce-border);
        padding: 1px;
    }

    .wpce-product-terms-list-table th,
    .wpce-product-terms-list-table td {
        font-size: 6px;
        padding: 1px 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .wpce-product-terms-list-table thead tr {
        background: #f8f9fa;
    }

    /* İçeriğe göre sütun genişlikleri */
    .wpce-product-terms-list-table td:first-child,
    .wpce-product-terms-list-table th:first-child {
        flex: 2.5;  /* Marka için en geniş alan */
        min-width: 60px;
        font-weight: 600;
    }

    .wpce-product-terms-list-table td:nth-child(2),
    .wpce-product-terms-list-table th:nth-child(2) {
        flex: 1.8;  /* Model için orta genişlik */
        min-width: 45px;
    }

    .wpce-product-terms-list-table td:nth-child(3),
    .wpce-product-terms-list-table th:nth-child(3) {
        flex: 1;    /* Yıl için minimum */
        min-width: 30px;
        color: var(--wpce-text);
    }

    .wpce-product-terms-list-table td:nth-child(4),
    .wpce-product-terms-list-table th:nth-child(4) {
        flex: 0.8;  /* Motor için en az alan */
        min-width: 25px;
        color: var(--wpce-text);
    }

    .wpce-table-container {
        margin: 0;
        padding: 0;
        border: none;
    }

    .wpce-product-terms-list-table {
        width: 100%;
    }

    .wpce-product-terms-list-table tr {
        display: flex;
        align-items: center;
        padding: 2px 4px;
        border-bottom: 1px solid var(--wpce-border);
    }

    .wpce-product-terms-list-table th,
    .wpce-product-terms-list-table td {
        font-size: 7px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* İçerik analizi sonrası optimize edilmiş genişlikler */
    .wpce-product-terms-list-table td:nth-child(1),
    .wpce-product-terms-list-table th:nth-child(1) {
        flex: 1.2;  /* Marka - SMART gibi kısa markalar */
        min-width: 40px;
        font-weight: 600;
        text-align: left;
    }

    .wpce-product-terms-list-table td:nth-child(2),
    .wpce-product-terms-list-table th:nth-child(2) {
        flex: 2;    /* Model - CITY-COUPE gibi uzun modeller */
        min-width: 70px;
        text-align: left;
    }

    .wpce-product-terms-list-table td:nth-child(3),
    .wpce-product-terms-list-table th:nth-child(3),
    .wpce-product-terms-list-table td:nth-child(4),
    .wpce-product-terms-list-table th:nth-child(4) {
        flex: 1;    /* Yıl ve Motor - Benzer uzunlukta */
        min-width: 35px;
        color: var(--wpce-text);
        text-align: center;
    }

    .wpce-table-container {
        margin: 0;
        padding: 2px;
        border: 1px solid var(--wpce-border);
    }

    .wpce-product-terms-list-table {
        width: 100%;
    }

    .wpce-product-terms-list-table tr {
        display: flex;
        align-items: center;
        padding: 3px;
        border-bottom: 1px solid var(--wpce-border);
    }

    /* Tüm hücreler için temel stiller */
    .wpce-product-terms-list-table th,
    .wpce-product-terms-list-table td {
        font-size: 6.5px;
        padding: 0 3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Başlık satırı */
    .wpce-product-terms-list-table thead tr {
        background: #f8f9fa;
        margin-bottom: 1px;
    }

    /* İçerik analizi sonrası optimize edilmiş genişlikler */
    .wpce-product-terms-list-table td:nth-child(1),
    .wpce-product-terms-list-table th:nth-child(1) {
        flex: 0.8;  /* MARKA - En kısa içerik */
        font-weight: 600;
        text-align: left;
    }

    .wpce-product-terms-list-table td:nth-child(2),
    .wpce-product-terms-list-table th:nth-child(2) {
        flex: 2.2;  /* MODEL - En uzun içerik */
        text-align: left;
    }

    .wpce-product-terms-list-table td:nth-child(3),
    .wpce-product-terms-list-table th:nth-child(3),
    .wpce-product-terms-list-table td:nth-child(4),
    .wpce-product-terms-list-table th:nth-child(4) {
        flex: 1;    /* Yıl ve Motor - Benzer uzunlukta */
        min-width: 35px;
        color: var(--wpce-text);
        text-align: center;
    }

    .wpce-table-container {
        margin: 0;
        padding: 2px;
        border: 1px solid var(--wpce-border);
    }

    .wpce-product-terms-list-table {
        width: 100%;
    }

    .wpce-product-terms-list-table tr {
        display: flex;
        align-items: center;
        padding: 2px;
        border-bottom: 1px solid var(--wpce-border);
    }

    /* Hücre temel stilleri */
    .wpce-product-terms-list-table th,
    .wpce-product-terms-list-table td {
        font-size: 6.5px;
        padding: 0 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: left;  /* Hepsi sola hizalı */
    }

    /* Optimize edilmiş sütun genişlikleri */
    .wpce-product-terms-list-table td:nth-child(1),
    .wpce-product-terms-list-table th:nth-child(1) {
        flex: 0.8;
        font-weight: 600;
    }

    .wpce-product-terms-list-table td:nth-child(2),
    .wpce-product-terms-list-table th:nth-child(2) {
        flex: 1.8;
        padding-left: 4px;
    }

    .wpce-product-terms-list-table td:nth-child(3),
    .wpce-product-terms-list-table th:nth-child(3) {
        flex: 1;
        padding-left: 4px;
        color: var(--wpce-text);
    }

    .wpce-product-terms-list-table td:nth-child(4),
    .wpce-product-terms-list-table th:nth-child(4) {
        flex: 1.2;
        padding-left: 4px;
        color: var(--wpce-text);
    }

    /* Başlık satırı */
    .wpce-product-terms-list-table thead tr {
        background: #f8f9fa;
        margin-bottom: 1px;
    }

    .wpce-table-container {
        margin: 0;
        padding: 2px;
        border: 1px solid var(--wpce-border);
    }

    .wpce-product-terms-list-table tr {
        display: flex;
        align-items: left;
        padding: 2px;
        border-bottom: 1px solid var(--wpce-border);
    }

    .wpce-product-terms-list-table th,
    .wpce-product-terms-list-table td {
        font-size: 6.5px;
        padding: 0 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: left;
    }

    .wpce-product-terms-list-table thead tr {
        background: #f8f9fa;
        border-bottom: 1px solid var(--wpce-border);
    }

    /* Sütun genişlikleri - Maksimum verimlilik için */
    .wpce-product-terms-list-table td:nth-child(1),
    .wpce-product-terms-list-table th:nth-child(1) {
        flex: 0.7;  /* SMART */
        font-weight: 600;
        min-width: 0;
    }

    .wpce-product-terms-list-table td:nth-child(2),
    .wpce-product-terms-list-table th:nth-child(2) {
        flex: 1.5;  /* CITY-COUPE */
        padding-left: 3px;
        min-width: 0;
    }

    .wpce-product-terms-list-table td:nth-child(3),
    .wpce-product-terms-list-table th:nth-child(3) {
        flex: 0.8;  /* 600/700 */
        padding-left: 3px;
        min-width: 0;
        color: var(--wpce-text);
    }

    .wpce-product-terms-list-table td:nth-child(4),
    .wpce-product-terms-list-table th:nth-child(4) {
        flex: 1;    /* M160.921 */
        padding-left: 3px;
        min-width: 0;
        color: var(--wpce-text);
    }

    .wpce-table-container {
        margin: 0;
        padding: 2px;
        border: 1px solid var(--wpce-border);
    }

    .wpce-product-terms-list-table {
        width: 100%;
    }

    .wpce-product-terms-list-table tr {
        display: flex;
        align-items: center;
        padding: 2px;
        border-bottom: 1px solid var(--wpce-border);
    }

    /* Temel hücre stilleri */
    .wpce-product-terms-list-table th,
    .wpce-product-terms-list-table td {
        font-size: 6.5px;
        padding: 0;
        padding-right: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: left !important;
    }

    /* Optimize edilmiş sütun genişlikleri */
    .wpce-product-terms-list-table td:nth-child(1),
    .wpce-product-terms-list-table th:nth-child(1) {
        flex: 0.7;
        font-weight: 600;
        min-width: 0;
    }

    .wpce-product-terms-list-table td:nth-child(2),
    .wpce-product-terms-list-table th:nth-child(2) {
        flex: 1.5;
        min-width: 0;
    }

    .wpce-product-terms-list-table td:nth-child(3),
    .wpce-product-terms-list-table th:nth-child(3) {
        flex: 0.8;
        min-width: 0;
        color: var(--wpce-text);
    }

    .wpce-product-terms-list-table td:nth-child(4),
    .wpce-product-terms-list-table th:nth-child(4) {
        flex: 1;
        min-width: 0;
        color: var(--wpce-text);
    }

    .wpce-product-terms-list-table thead tr {
        background: #f8f9fa;
        border-bottom: 1px solid var(--wpce-border);
    }

    .wpce-button,
    .wpce-redirect-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        min-height: 42px;
    }
}

/* Extra mobile responsive styles */
@media (max-width: 480px) {
    #redirectCompatible {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        min-height: 44px !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
        margin: 8px 0 !important;
        box-sizing: border-box !important;
        background: var(--wpce-green) !important;
        color: var(--wpce-primary) !important;
        border: 1px solid var(--wpce-green) !important;
        border-radius: 6px !important;
        text-decoration: none !important;
        cursor: pointer !important;
        z-index: 1000 !important;
    }
    
    /* Disabled state için mobil özel stiller */
    #redirectCompatible.wpce-disabled {
        background: #cccccc !important;
        color: #666666 !important;
        border-color: #cccccc !important;
        cursor: not-allowed !important;
    }
    
    .wpce-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }
}

/* Yatay Layout */
@media (min-width: 768px) {
    .wpce-widget-layout-h .wpce-field {
        float: left;
        margin-right: 1%;
        margin-bottom: 0;
    }
    
    .wpce-widget-layout-h.wpce-widget-levels-2 .wpce-field { width: 49.5%; }
    .wpce-widget-layout-h.wpce-widget-levels-3 .wpce-field { width: 32.66%; }
    .wpce-widget-layout-h.wpce-widget-levels-4 .wpce-field { width: 24.25%; }
    
    .wpce-widget-layout-h .wpce-field:last-child {
        margin-right: 0;
    }
}

/* Select2 Ana Düzenlemeler */
.select2-container {
    width: 100% !important;
    margin-bottom: 10px;
    display: block !important;
}

.select2-container .select2-selection--single {
    height: 42px !important;
    border: 1px solid var(--wpce-border) !important;
    border-radius: 4px !important;
    background: #fff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px !important;
    padding: 0 12px !important;
    color: #333 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
    right: 6px !important;
}

/* Dropdown Menü */
.select2-dropdown {
    margin-top: 2px !important;
    border: 1px solid var(--wpce-border) !important;
    border-radius: 4px !important;
    background: #fff !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05) !important;
}

/* Arama Alanı */
.select2-search--dropdown {
    padding: 8px !important;
}

.select2-search--dropdown .select2-search__field {
    height: 32px !important;
    padding: 4px 8px !important;
    border: 1px solid var(--wpce-border) !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
}

/* Sonuç Listesi */
.select2-results {
    padding: 4px !important;
}

.select2-results__options {
    max-height: 280px !important;
    overflow-y: auto !important;
    font-size: 13px !important;
}

.select2-results__option {
    padding: 6px 8px !important;
    border-radius: 3px !important;
    text-transform: uppercase !important;
    margin-bottom: 1px !important;
    white-space: nowrap !important;
}

/* Seçenek Durumları */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--wpce-accent) !important;
    color: var(--wpce-primary) !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background: var(--wpce-red) !important;
    color: #fff !important;
}

/* Scroll Bar */
.select2-results__options::-webkit-scrollbar {
    width: 6px !important;
}

.select2-results__options::-webkit-scrollbar-track {
    background: transparent !important;
}

.select2-results__options::-webkit-scrollbar-thumb {
    background: var(--wpce-border) !important;
    border-radius: 3px !important;
}

/* Buton Grubu Stilleri */
.wpce-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.wpce-button,
.wpce-redirect-btn {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.wpce-button:hover,
.wpce-redirect-btn:hover {
    transform: translateY(-1px);
}

.wpce-button.uyumlu,
.wpce-redirect-btn {
    background: var(--wpce-green);
    color: var(--wpce-primary);
}

.wpce-button.uyumsuz {
    background: var(--wpce-red);
    color: #fff;
}

/* Mobil için buton düzenlemeleri */
@media (max-width: 768px) {
    .wpce-buttons {
        flex-direction: column;
        width: 100%;
    }

    .wpce-button,
    .wpce-redirect-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        min-height: 42px;
    }

    .wpce-redirect-btn {
        width: 100% !important;
        justify-content: center !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* ========================================
   MOBILE REDIRECT BUTTON FIX
   ======================================== */

/* Force redirect button visibility on all devices */
#redirectCompatible {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Disabled redirect button stili */
#redirectCompatible.wpce-disabled,
.wpce-redirect-btn.wpce-disabled {
    background: #cccccc !important;
    color: #666666 !important;
    border-color: #cccccc !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

#redirectCompatible.wpce-disabled:hover,
.wpce-redirect-btn.wpce-disabled:hover {
    background: #cccccc !important;
    color: #666666 !important;
    transform: none !important;
}

