/* --- Global Variables --- */
.vstt-wrapper {
    /* PHP'den gelen değişkenler (inline style) önceliklidir */
    --vstt-bg-color: #fff; /* Fallback */
    --vstt-text-main: #2a2b2f;
    --vstt-text-muted: #575757;
    --vstt-accent: #b05a36; /* Fallback */
    --vstt-border: #e0dcd3;
    
    font-family: inherit;
    background-color: var(--vstt-bg-color);
    padding: 40px 20px;
    border-radius: 12px;
    box-sizing: border-box;
    max-width: 100%;
    position: relative;
}

/* Tüm elementler için box-sizing izolasyonu */
.vstt-wrapper *, .vstt-wrapper *::before, .vstt-wrapper *::after {
    box-sizing: border-box;
}

/* --- Search Bar --- */
.vstt-header { margin-bottom: 40px; }
.vstt-search-box { position: relative; max-width: 400px; width: 100%; }
.vstt-search-icon { 
    position: absolute; left: 15px; top: 50%; 
    transform: translateY(-50%); 
    color: var(--vstt-text-main); 
    display: flex; 
    pointer-events: none; /* İkona tıklamayı engeller */
    opacity: 0.6;
}
#vstt-search-input {
    width: 100%; 
    padding: 12px 12px 12px 45px;
    border-radius: 50px; 
    border: 1px solid var(--vstt-border); 
    background: #fff; 
    font-size: 16px; 
    color: var(--vstt-text-main); 
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
#vstt-search-input:focus { 
    border-color: var(--vstt-accent); 
    box-shadow: 0 0 0 1px var(--vstt-accent), 0 4px 10px rgba(0,0,0,0.05); 
}

/* --- Container --- */
.vstt-container { 
    display: flex; 
    gap: 60px; 
    align-items: flex-start; 
}

/* --- Sidebar (Desktop) --- */
.vstt-sidebar { 
    flex: 0 0 250px; 
    position: sticky; 
    /* WordPress Admin Bar uyumu için hesaplama */
    top: calc(32px + 20px); 
    align-self: flex-start;
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 10px; /* Scrollbar için pay */
}
/* İnce Scrollbar (Desktop Sidebar) */
.vstt-sidebar::-webkit-scrollbar { width: 4px; }
.vstt-sidebar::-webkit-scrollbar-thumb { background-color: #ddd; border-radius: 4px; }

.vstt-label { 
    font-size: 11px; 
    font-weight: 700; 
    letter-spacing: 1px; 
    text-transform: uppercase; 
    color: var(--vstt-text-muted); 
    margin-bottom: 15px; 
    display: block; 
    opacity: 0.8;
}
.vstt-nav-inner { display: flex; flex-direction: column; }
.vstt-nav-link {
    text-decoration: none; 
    color: var(--vstt-text-main); 
    font-size: 16px; 
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 2px;
    border-left: 2px solid transparent; 
    transition: all 0.2s ease; 
    font-weight: 500;
    display: block;
}
.vstt-nav-link:hover {
    background-color: rgba(0,0,0,0.03);
    color: var(--vstt-accent);
}
.vstt-nav-link.active { 
    color: var(--vstt-accent); 
    font-weight: 600; 
    background-color: rgba(0,0,0,0.04);
    border-left-color: var(--vstt-accent);
}
/* Accessibility Focus */
.vstt-nav-link:focus-visible {
    outline: 2px solid var(--vstt-accent);
    outline-offset: -2px;
}

/* --- Content --- */
.vstt-content { flex: 1; min-width: 0; }
.vstt-content.w-full { flex: 100%; }

.vstt-category-section {
    /* JS offset ile uyumlu native scroll margin */
    scroll-margin-top: 100px; 
    margin-bottom: 40px;
}

.vstt-cat-title {
    font-size: 26px; 
    font-weight: 600; 
    margin: 0 0 20px; 
    color: var(--vstt-text-main); 
    line-height: 1.2;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0,0,0,0.05);
}

/* --- FAQ Item --- */
.vstt-item { 
    border: 1px solid var(--vstt-border); 
    border-radius: 8px;
    margin-bottom: 15px;
    background: #fff;
    transition: border-color 0.2s;
}
.vstt-item:hover {
    border-color: #ccc;
}

.vstt-question {
    width: 100%; 
    background: none; 
    border: none; 
    text-align: left; 
    padding: 20px;
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    cursor: pointer;
    color: var(--vstt-text-main); 
    transition: color 0.2s; 
    margin: 0;
}
.vstt-q-text { 
    font-size: 17px; 
    font-weight: 600; 
    margin: 0; 
    padding: 0; 
    line-height: 1.4;
    background: none; 
    border: none; 
    font-family: inherit; 
}
.vstt-question:hover, .vstt-question[aria-expanded="true"] { 
    color: var(--vstt-accent); 
}
.vstt-question:focus-visible {
    outline: 2px solid var(--vstt-accent);
    border-radius: 8px;
    outline-offset: -2px;
}

.vstt-toggle-icon {
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 28px; 
    height: 28px;
    border-radius: 50%; 
    flex-shrink: 0; 
    margin-left: 15px;
    transition: all 0.2s; 
    color: var(--vstt-text-muted);
    background: rgba(0,0,0,0.05);
}
.vstt-question[aria-expanded="true"] .vstt-toggle-icon { 
    background-color: var(--vstt-accent); 
    color: #fff; 
    transform: rotate(180deg); /* Icon rotation effect */
}

.vstt-answer { 
    display: none; 
    border-top: 1px solid transparent;
}
.vstt-question[aria-expanded="true"] + .vstt-answer {
    border-top-color: rgba(0,0,0,0.05);
}

.vstt-answer-inner { 
    padding: 20px; 
    padding-top: 5px;
    color: var(--vstt-text-muted); 
    line-height: 1.6; 
    font-size: 15px; 
}
.vstt-answer-inner p:last-child { margin-bottom: 0; }

/* --- "Sonuç Bulunamadı" Mesajı --- */
.vstt-no-results {
    font-size: 16px;
    color: var(--vstt-text-muted);
    background: #f0f0f1;
    border-radius: 8px;
    margin-top: 20px;
    padding: 20px;
    text-align: center;
}

/* --- MOBILE RESPONSIVE (Sticky Horizontal Menu) --- */
@media (max-width: 991px) {
    .vstt-wrapper {
        padding: 20px 0; /* Kenarlardan sıfırla ki sticky tam otursun */
        background-color: transparent !important; /* Mobilde wrapper arka planını kaldır */
    }
    .vstt-header, .vstt-container {
        padding: 0 15px; /* İçerik paddingi */
    }
    
    .vstt-container {
        display: flex;
        flex-direction: column !important;
        gap: 20px !important;
        align-items: stretch;
    }

    /* Sol Menü: Üstte Yapışkan ve Yatay */
    .vstt-sidebar {
        flex: 0 0 auto !important;
        width: 100% !important;
        height: auto !important;
        max-height: none;
        
        /* Sticky Logic */
        position: sticky !important;
        top: 0px !important; 
        /* Admin bar varsa JS ile veya body class ile top ayarlanabilir, 0 güvenli varsayılan */
        z-index: 100;
        
        /* ÖNEMLİ: Okunabilirlik için solid background */
        background-color: #fff !important; 
        
        margin: 0;
        padding: 15px;
        
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        border-bottom: 1px solid var(--vstt-border);
        
        /* Yatay Scroll */
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        
        /* Scrollbar Gizle */
        scrollbar-width: none; 
    }
    
    .vstt-sidebar::-webkit-scrollbar { display: none; }
    
    .vstt-nav-inner {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        gap: 10px;
        width: max-content;
    }

    .vstt-label { display: none !important; }

    .vstt-nav-link {
        display: inline-block;
        padding: 8px 16px;
        background: #f5f5f5;
        border: 1px solid transparent;
        border-radius: 20px;
        font-size: 14px;
        flex-shrink: 0;
        margin-bottom: 0;
        white-space: nowrap;
        font-weight: 500;
        color: var(--vstt-text-muted);
    }
    
    .vstt-nav-link.active {
        background-color: var(--vstt-accent);
        color: #fff;
        border-color: var(--vstt-accent);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    /* Scroll margin ayarı (header + sticky nav yüksekliği) */
    .vstt-category-section {
        scroll-margin-top: 150px; 
    }
}