/* =====================================================
   TOUCH TARGETS - W4-A Accessibility Enhancement
   Min 48x48px touch areas + 8px spacing for WCAG AA
   ===================================================== */

/* =====================================================
   1. ICON BUTTONS - Consistent 48x48 touch area
   ===================================================== */
.icon-btn,
button.icon-btn,
a.icon-btn,
.cart-btn,
.mobile-menu-toggle,
.search-toggle,
.close-btn,
.play-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    padding: 8px;
    line-height: 1;
    border-radius: var(--radius-md);
}

/* Visible focus for keyboard navigation */
.icon-btn:focus-visible,
button.icon-btn:focus-visible,
a.icon-btn:focus-visible,
.cart-btn:focus-visible {
    outline: 2px solid var(--primary-color, #0071C2);
    outline-offset: 2px;
}

/* =====================================================
   2. TEXT LINKS - Expanded hit area without visual change
   ===================================================== */
a.tap-area {
    position: relative;
    display: inline-block;
}

a.tap-area::before {
    content: "";
    position: absolute;
    top: -8px;
    bottom: -8px;
    left: -8px;
    right: -8px;
}

/* =====================================================
   2c. DAR EKRAN (≤768) DOKUNMA ALANI — görünür kutu DEĞİŞMEZ (D cila K6/K7/K9/K10/K11/K14)
   =====================================================
   Ölçüldü (etkin alan = elementFromPoint ile, kutu değil): hap 27 · galeri oku 36 · takvim oku 32 ·
   alt bilgi 'Tümü →' 33 · kart CTA 30/37 · 'Tümünü gör' 23 · sepet 40 ⇒ hepsi 44'ün altında.
   Çare bölüm 2 / 2b'nin deseni: görünmez ::before. Fark: pay elle değil, MERKEZDEN 44 olarak türetilir —
   sözde-öge dolgu kutusuna göre konumlanır, `50% - 22px` kenarı merkezden 22px'e koyar (kenarlıktan bağımsız),
   `min(0px, …)` zaten ≥44 olan eksende alanı KÜÇÜLTMEZ (geniş öğede yatay uzantı 0 ⇒ komşu çalınmaz).
   Galeri oku zaten position:absolute (sözde-öğeyi o taşır) ⇒ ona position verilmez.
   🔒 Hap rayı overflow:auto: alan ray dolgusunu aşarsa ray dikey kaydırılır ⇒ category-strip.css ≤768 ray dolgusu 8.5px. */
@media (max-width: 768px) {
    .cart-btn,
    .header-pill-link,
    .pc-nav,
    .footer-all-tours,
    .review-link,
    .tour-cta,
    .fh-featured__all,
    .fh-blog__all {
        position: relative;
    }

    .cart-btn::before,
    .header-pill-link::before,
    .gallery-nav::before,
    .pc-nav::before,
    .footer-all-tours::before,
    .review-link::before,
    .tour-cta::before,
    .fh-featured__all::before,
    .fh-blog__all::before {
        content: "";
        position: absolute;
        top: min(0px, calc(50% - 22px));
        bottom: min(0px, calc(50% - 22px));
        left: min(0px, calc(50% - 22px));
        right: min(0px, calc(50% - 22px));
    }
}

/* =====================================================
   3. MOBILE NAVIGATION - Block display + adequate height
   ===================================================== */
.nav-mobile a,
.mobile-menu a,
.sidebar-nav a {
    display: block;
    min-height: 48px;
    padding: 12px 16px;
    line-height: 1.5;
}

.nav-mobile a + a,
.mobile-menu a + a {
    margin-top: 4px; /* 8px spacing between targets */
}

/* =====================================================
   4. CARD CTAs - Minimum height for touch
   ===================================================== */
.card .cta,
.card a.cta,
.tour-card .cta,
.blog-card .cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
}

/* =====================================================
   5. SMALL ICONS - Keep visual small, hit area large
   ===================================================== */
.icon-btn > svg,
.icon-btn > i,
button > svg,
button > i {
    width: 20px;
    height: 20px;
    pointer-events: none; /* Hit area on parent */
}

/* =====================================================
   6. FILTER BUTTONS & CHIPS - Touch-friendly
   ===================================================== */
.filter-btn,
.chip,
.tag {
    min-height: 44px; /* Slightly smaller for dense UI */
    padding: 8px 16px;
    border-radius: var(--radius-full);
}

/* =====================================================
   7. FORM CONTROLS - Enhanced touch area
   ===================================================== */
input[type="checkbox"],
input[type="radio"] {
    min-width: 24px;
    min-height: 24px;
    margin: 12px; /* Creates 48px total touch area */
}

/* Görsel-gizli özel-toggle input'u (.toggle-switch içindeki opacity:0/width:0/height:0 checkbox) touch-target
   min-boyutundan MUAF: yukarıdaki min-height:24px, height:0'ı EZER (min-height ayrı property, clamp eder) →
   gizli input 24px+margin şişip toggle görselini bozardı. Tek yer — tüm .toggle-switch örnekleri (admin
   config/languages/blogs vb.) buradan düzelir. Specificity (0,2,1) > global (0,1,1). */
.toggle-switch input[type="checkbox"],
.toggle-switch input[type="radio"] {
    min-width: 0;
    min-height: 0;
    margin: 0;
}

/* 2. katman: toggle'ın KENDİSİ bir <label class="toggle-switch"> — aşağıdaki genel 'label' dokunma-hedefi
   kuralı (min-height:48px + padding:8px 0) onu 44x48'e şişirir (min-height, editor.js height:24px'i clamp eder).
   Toggle'ı da DAR muaf tut (gerçek form etiketlerinin 48px dokunma hedefi korunur — yalnız .toggle-switch).
   display'e dokunulmaz: aç/kapa görseli (slider + renk) çalışıyor, yalnız boyut hedeflenir. Specificity (0,1,0) > 'label' (0,0,1). */
.toggle-switch {
    min-height: 0;
    padding: 0;
}

label {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 8px 0;
    cursor: pointer;
}

/* =====================================================
   8. SPECIFIC OVERRIDES - Project components
   ===================================================== */

/* Premium Header - Already correct, ensure consistency */
.premium-header .cart-btn {
    min-width: 48px;
    min-height: 48px;
}

.premium-header .call-btn {
    min-height: 48px;
    padding: 12px 20px;
}

.premium-header .selector-btn {
    min-height: 44px; /* Dense UI exception */
}

/* Tour Cards - Wishlist button */
.tour-wishlist {
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal close buttons */
.modal-close,
.close-icon {
    min-width: 48px;
    min-height: 48px;
}

/* =====================================================
   9. MOBILE SPECIFIC - Extra touch area
   ===================================================== */
@media (max-width: 768px) {
    /* Increase spacing on mobile */
    .nav-mobile a + a,
    .mobile-menu a + a {
        margin-top: 8px;
    }

    /* Larger touch areas for primary CTAs */
    .primary-cta,
    .cta-primary {
        min-height: 52px;
        padding: 14px 24px;
    }

    /* Filter buttons larger spacing */
    .filter-btn,
    .chip {
        margin: 4px;
    }
}

/* =====================================================
   10. ACCESSIBILITY - Focus indicators
   ===================================================== */

/* All interactive elements should have visible focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color, #0071C2);
    outline-offset: 2px;
}

/* Skip to content link (hidden until focused) */
.skip-to-content {
    position: absolute;
    top: -100px;
    inset-inline-start: 0;
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    min-height: 48px;
    z-index: 9999;
}

.skip-to-content:focus {
    top: 0;
}

/* =====================================================
   RWD-P0-5: iOS Safari zoom prevention
   font-size < 16px on inputs triggers auto-zoom on iOS
   ===================================================== */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="search"],
    input[type="password"],
    input[type="url"],
    input[type="date"],
    textarea,
    select {
        font-size: 16px !important;
    }
}
