/* ============================================================
   Çerez rıza çubuğu + tercih merkezi modalı
   Aybuge Frontend
   ============================================================ */

/* ── Ortak buton ── */
.cc-btn {
    padding: 10px 18px;
    border-radius: 7px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}

.cc-btn--ghost {
    border: 1px solid #dce7f0;
    background: rgba(255, 255, 255, .7);
    color: #33475a;
}

.cc-btn--ghost:hover { border-color: #0e9faa; color: #0e9faa; background: #fff; }

.cc-btn--primary {
    border: 1px solid rgba(110, 231, 222, .5);
    background: linear-gradient(135deg, #12b1bd 0%, #0e9faa 55%, #0c8991 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(14, 159, 170, .3), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.cc-btn--primary:hover {
    background: linear-gradient(135deg, #17c2cf 0%, #12b1bd 55%, #0e9faa 100%);
    box-shadow: 0 12px 26px rgba(14, 159, 170, .4), inset 0 1px 0 rgba(255, 255, 255, .28);
    transform: translateY(-1px);
}

.cc-btn:active { transform: translateY(0); }

.cc-btn:focus-visible,
.cc-modal__x:focus-visible,
.cc-switch input:focus-visible + .cc-switch__track {
    outline: 3px solid rgba(14, 159, 170, .24);
    outline-offset: 2px;
}

/* ── Alt çubuk ── */
.cookie-notice {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
    transform: translateY(110%);
    transition: transform .32s ease;
    pointer-events: none;
}

.cookie-notice.is-visible { transform: translateY(0); pointer-events: auto; }
.cookie-notice[hidden] { display: block; }

.cookie-notice__box {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 980px;
    margin: 0 auto;
    padding: 18px 22px;
    border: 1px solid #dce7f0;
    border-radius: 14px;
    overflow: hidden;
    background:
        radial-gradient(520px 160px at 100% 0%, rgba(14, 159, 170, .08), transparent 65%),
        #fff;
    box-shadow: 0 18px 46px rgba(10, 37, 64, .16);
}

.cookie-notice__box::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(14, 159, 170, .75) 50%, transparent 100%);
}

.cookie-notice__icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(155deg, rgba(14, 159, 170, .14), rgba(14, 159, 170, .05));
    color: #0e9faa;
}

.cookie-notice__icon svg { width: 20px; height: 20px; }

.cookie-notice__text {
    flex: 1 1 320px;
    margin: 0;
    color: #33475a;
    font-size: 12.5px;
    line-height: 1.6;
}

.cookie-notice__text a { color: #0e9faa; font-weight: 650; text-decoration: none; }
.cookie-notice__text a:hover { text-decoration: underline; }

.cookie-notice__actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }

/* ── Tercih merkezi modalı ── */
.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 9995;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cc-modal.is-open { display: flex; }

.cc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 37, 64, .38);
    backdrop-filter: blur(4px);
}

.cc-modal__box {
    position: relative;
    width: min(480px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 26px;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 30px 80px rgba(10, 37, 64, .28);
}

.cc-modal__box::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #12b1bd, #0e9faa 50%, #0c8991);
}

.cc-modal__box > * { position: relative; }

.cc-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding-top: 4px;
}

.cc-modal__eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #0e9faa;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.cc-modal__head h2 { margin: 0; color: #0a2540; font-size: 18px; font-weight: 750; }

.cc-modal__x {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid #dce7f0;
    border-radius: 7px;
    background: #fff;
    color: #5a6f86;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    transition: border-color .16s ease, color .16s ease;
}

.cc-modal__x:hover { border-color: #0e9faa; color: #0e9faa; }

.cc-modal__intro { margin: 0 0 18px; color: #5a6f86; font-size: 12.5px; line-height: 1.6; }

.cc-category {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid #edf1f6;
}

.cc-category__icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-top: 1px;
    border-radius: 9px;
    background: linear-gradient(155deg, rgba(14, 159, 170, .14), rgba(14, 159, 170, .05));
    color: #0e9faa;
}

.cc-category__icon svg { width: 17px; height: 17px; }
.cc-category__icon--locked { background: linear-gradient(155deg, rgba(90, 111, 134, .14), rgba(90, 111, 134, .05)); color: #5a6f86; }

.cc-category__body { flex: 1 1 auto; min-width: 0; }
.cc-category__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-category__head strong { color: #0a2540; font-size: 13px; }
.cc-category p { margin: 6px 0 0; color: #5a6f86; font-size: 11.5px; line-height: 1.6; }

.cc-modal__footnote {
    margin: 2px 0 0;
    padding-top: 14px;
    border-top: 1px solid #edf1f6;
    color: #8294a8;
    font-size: 11px;
    line-height: 1.6;
}

.cc-modal__footnote a { color: #0e9faa; font-weight: 650; text-decoration: none; }
.cc-modal__footnote a:hover { text-decoration: underline; }

.cc-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #edf1f6;
}

/* ── Açma/kapama anahtarı ── */
.cc-switch { position: relative; flex: 0 0 auto; width: 40px; height: 23px; }
.cc-switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cc-switch input:disabled { cursor: not-allowed; }

.cc-switch__track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #c7d3dc;
    box-shadow: inset 0 1px 2px rgba(10, 37, 64, .12);
    transition: background .18s ease;
}

.cc-switch__track::after {
    content: "";
    position: absolute;
    top: 2.5px;
    left: 2.5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(10, 37, 64, .3);
    transition: transform .18s ease;
}

.cc-switch input:checked + .cc-switch__track { background: linear-gradient(135deg, #12b1bd, #0e9faa); }
.cc-switch input:checked + .cc-switch__track::after { transform: translateX(17px); }
.cc-switch input:disabled + .cc-switch__track { opacity: .55; }

@media (max-width: 640px) {
    .cookie-notice { padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
    /* flex-direction:column, flex-basis degerlerini yukseklik tabanina donusturup
       metni gereksiz yere sisiriyordu (bkz. genis gorunumdeki yatay ipuclari) —
       grid'e gecerek ikon+metni bir satirda, eylemleri ayri tam genislik satirda
       tutuyoruz, boylece flex-axis kaymasi riski kalmiyor. */
    .cookie-notice__box {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 12px;
        row-gap: 14px;
        padding: 16px;
    }
    .cookie-notice__icon { grid-row: 1; grid-column: 1; }
    .cookie-notice__text { grid-row: 1; grid-column: 2; flex: none; }
    .cookie-notice__actions { grid-column: 1 / -1; justify-content: stretch; }
    .cookie-notice__actions .cc-btn { flex: 1 1 0; text-align: center; padding-left: 8px; padding-right: 8px; }
    .cc-modal__box { padding: 22px 20px; }
}
