/* ==========================================================================
   ÇEREZ ONAY BANDI (js/consent.js oluşturur; partials/consent-head.blade.php yükler)
   - Sitenin cam/pill dili: pill bar ile aynı buzlu beyaz yüzey (header-pill.css
     --pillbar-* değerleri), koyu metin, yuvarlak düğmeler.
   - Sabit konum (position: fixed) → sayfa yerleşimini kaydırmaz (CLS yok); hero ve
     anasayfa kompozisyonunu örtmeyecek kadar kompakt, alt kenarda.
   - "Reddet" ve "Kabul et" BİREBİR aynı görünüm (KVKK Çerez Rehberi: eşit ağırlık).
   - Mobil/tablet (991px ve altı): sağ-alttaki WhatsApp FAB'ı (42px, sağ 12px) ve
     yukarı-çık butonu için sağda boşluk bırakır; masaüstünde ortada, alt kenarda.
   - z-index 1035: sabit sosyal ikonların (1030) üstünde; pill bar (1050), mobil menü
     (offcanvas 1045) ve WhatsApp seçici popup'ının (1060) altında.
   - Global tema kuralları (style.min.css: a/button focus outline 0, p font-size 15px,
     bootstrap code rengi) burada yerel olarak eziliyor.
   ========================================================================== */

.gc {
    --gc-surface: rgba(255, 255, 255, 0.9);
    --gc-glass: blur(18px) saturate(145%);
    --gc-border: rgba(255, 255, 255, 0.75);
    --gc-line: rgba(24, 32, 28, 0.1);
    --gc-shadow: 0 14px 38px rgba(24, 32, 28, 0.2);
    --gc-text: #1f2421;
    --gc-muted: #555b58;
    --gc-dark: #1b1f1d;
    --gc-dark-h: #343a37;
    --gc-accent: #b07400;     /* açık zeminde 3:1+ (anahtar "açık" rengi + odak halkası) */
    position: fixed;
    z-index: 1035;
    left: 12px;
    right: 66px;
    bottom: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    max-width: 600px;
    color: var(--gc-text);
    font-family: "Manrope", "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.24s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gc[hidden],
.gc [hidden] {
    display: none !important;
}

.gc.gc--in {
    opacity: 1;
    transform: none;
}

.gc *,
.gc *::before,
.gc *::after {
    box-sizing: border-box;
}

.gc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 110px);
    max-height: calc(100dvh - 110px);
    padding: 14px;
    border: 1px solid var(--gc-border);
    border-radius: 22px;
    background: var(--gc-surface);
    box-shadow: var(--gc-shadow), 0 0 0 1px var(--gc-line);
    -webkit-backdrop-filter: var(--gc-glass);
    backdrop-filter: var(--gc-glass);
}

/* ---------- metin ---------- */

.gc-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 0 auto;
}

.gc .gc-title {
    margin: 0 0 4px;
    padding: 0;
    color: var(--gc-text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
}

.gc .gc-desc {
    margin: 0;
    padding: 0;
    color: var(--gc-muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}

.gc .gc-policy {
    display: inline;
    color: var(--gc-text);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.gc .gc-policy:hover {
    color: var(--gc-accent);
}

/* ---------- düğmeler ---------- */

.gc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.gc .gc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--gc-dark);
    border-radius: 999px;
    background: var(--gc-dark);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.gc .gc-btn:hover {
    border-color: var(--gc-dark-h);
    background: var(--gc-dark-h);
    color: #fff;
}

/* "Ayrıntılar" düğmelerle aynı satırda, solda (DOM sırası = görsel sıra: Ayrıntılar →
   Reddet → Kabul et) → mobilde ayrı satır açmaz, bant alçak kalır. Uzun metinde
   ("Ayrıntıları gizle") satır kırılır. */
.gc .gc-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 44px;
    margin: 0;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--gc-text);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.gc .gc-more:hover {
    color: var(--gc-accent);
}

.gc .gc-x {
    position: absolute;
    top: 8px;
    right: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--gc-muted);
    font-family: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.gc .gc-x:hover {
    background: rgba(24, 32, 28, 0.08);
    color: var(--gc-text);
}

/* Kapat (×) yalnız yeniden açılmış bantta (kayıtlı tercih var); ilk ziyarette seçim şart. */
.gc.gc--reopen .gc-x {
    display: inline-flex;
}

.gc.gc--reopen .gc-title {
    padding-right: 34px;
}

/* Klavye odağı: tema a/button:focus outline'ı sıfırlıyor → burada görünür halka. */
.gc button:focus-visible,
.gc a:focus-visible,
.gc .gc-sw input:focus-visible + .gc-sw-track {
    outline: 3px solid var(--gc-accent);
    outline-offset: 2px;
}

/* ---------- ayrıntılar ---------- */

.gc-details:not([hidden]) {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gc-line);
}

.gc-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
}

.gc-cat {
    padding: 10px 0;
    border-bottom: 1px solid var(--gc-line);
}

.gc-cat:first-child {
    padding-top: 0;
}

.gc-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 32px;
}

.gc .gc-cat-name {
    color: var(--gc-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.gc .gc-always {
    flex: 0 0 auto;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(24, 32, 28, 0.07);
    color: var(--gc-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.gc .gc-cat-desc {
    margin: 4px 0 0;
    padding: 0;
    color: var(--gc-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.gc-save-row {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    padding-top: 12px;
}

.gc .gc-btn--save {
    flex: 0 1 auto;
}

/* ---------- anahtar (role="switch" checkbox; işaretsiz başlar) ---------- */

.gc .gc-sw {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    cursor: pointer;
}

.gc .gc-sw input {
    position: absolute;
    right: 0;
    top: 50%;
    width: 44px;
    height: 26px;
    margin: -13px 0 0;
    opacity: 0;
    cursor: pointer;
}

.gc .gc-sw-track {
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: #8a918d;
    transition: background-color 0.2s ease;
    pointer-events: none;
}

.gc .gc-sw-track::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    content: "";
    transition: transform 0.2s ease;
}

.gc .gc-sw input:checked + .gc-sw-track {
    background: var(--gc-accent);
}

.gc .gc-sw input:checked + .gc-sw-track::after {
    transform: translateX(18px);
}

/* ekran okuyucu duyurusu ("tercihiniz kaydedildi") — görünmez */
.gc .gc-live {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- masaüstü (992px+): ortada, alt kenarda yatay cam şerit ---------- */

@media (min-width: 992px) {
    .gc {
        left: 0;
        right: 0;
        bottom: 18px;
        width: min(1080px, calc(100% - 160px));
        max-width: none;
        margin: 0 auto;
    }

    .gc-card {
        padding: 14px 16px 14px 24px;
        border-radius: 26px;
    }

    .gc-main {
        flex-direction: row;
        align-items: center;
        gap: 24px;
    }

    .gc-text {
        flex: 1 1 auto;
        min-width: 0;
    }

    .gc-actions {
        flex: 0 0 auto;
        flex-wrap: nowrap;
    }

    .gc .gc-btn {
        flex: 0 0 auto;
        min-width: 116px;
        padding: 0 22px;
    }

    .gc .gc-desc {
        font-size: 13.5px;
        line-height: 1.55;
    }

    .gc .gc-more {
        margin-right: 6px;
    }

    .gc.gc--reopen .gc-card {
        padding-right: 52px;
    }

    .gc.gc--reopen .gc-title {
        padding-right: 0;
    }

    /* Ayrıntılar açıkken üç kategori yan yana → bant alçak kalır */
    .gc-scroll {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0 24px;
        max-height: min(46vh, 360px);
    }

    .gc-cat,
    .gc-cat:first-child {
        padding: 0;
        border-bottom: 0;
    }
}

/* ---------- çok dar ekran ---------- */

@media (max-width: 359px) {
    .gc {
        left: 8px;
        right: 60px;
    }

    .gc-card {
        padding: 14px 12px;
    }

    .gc .gc-btn {
        padding: 0 8px;
    }
}

/* Cam efekti desteklenmiyorsa opak yüzey (okunabilirlik) */
@supports not ((-webkit-backdrop-filter: blur(18px)) or (backdrop-filter: blur(18px))) {
    .gc-card {
        background: #fff;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gc,
    .gc .gc-btn,
    .gc .gc-more,
    .gc .gc-x,
    .gc .gc-sw-track,
    .gc .gc-sw-track::after {
        transition: none;
    }

    .gc {
        transform: none;
    }
}

@media print {
    .gc {
        display: none !important;
    }
}
