/* =====================================================================================================
   KVKK / Çerez onayı (cookie-consent.blade.php + assets/js/cookie-consent.js), yasal sayfalar, form notu
   ===================================================================================================== */
:root {
    --erca-cc-height: 0px;
    --erca-cc-bottom: 16px;
}

.erca-cc {
    font-family: var(--body-font-family, "Poppins", sans-serif);
}

/* --- Bant ------------------------------------------------------------------------------------------ */
.erca-cc__banner {
    position: fixed;
    left: 50%;
    bottom: calc(var(--erca-cc-bottom) + env(safe-area-inset-bottom, 0px));
    z-index: 1090;
    width: min(1040px, calc(100% - 32px));
    transform: translate(-50%, 24px);
    opacity: 0;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .35s ease;
}

.erca-cc__banner.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.erca-cc__banner-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px 22px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid rgba(3, 114, 193, .14);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(16, 38, 64, .18), 0 2px 6px rgba(16, 38, 64, .06);
}

.erca-cc__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(3, 114, 193, .1);
    color: var(--dominant-font-color, #0372C1);
    font-size: 26px;
}

.erca-cc__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: #12263a;
}

.erca-cc__text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: #4f5f70;
}

.erca-cc__links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 6px 0 0;
    font-size: 13px;
    color: #8a97a5;
}

.erca-cc__links a,
.erca-cc__modal-sub a {
    color: var(--dominant-font-color, #0372C1);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Mobilde "Tercihleri yönet" düğmesi yerine bağlantı satırındaki kısa "Tercihler" gösterilir. */
.erca-cc__inline-pref,
.erca-cc__inline-pref-sep {
    display: none;
}

.erca-cc__inline-pref {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: var(--dominant-font-color, #0372C1);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.erca-cc__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(132px, 1fr));
    gap: 8px;
}

.erca-cc__actions .erca-cc__btn--link {
    grid-column: 1 / -1;
}

/* Düğmeler: "Reddet" ve "Kabul et" aynı boyut ve ağırlıkta (eşit görünürlük). */
.erca-cc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1.5px solid transparent;
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.erca-cc__btn:focus-visible,
.erca-cc__close:focus-visible,
.erca-footer-copy__cookie:focus-visible,
.erca-legal__btn:focus-visible {
    outline: 3px solid rgba(3, 114, 193, .35);
    outline-offset: 2px;
}

.erca-cc__btn--primary {
    background: var(--dominant-font-color, #0372C1);
    border-color: var(--dominant-font-color, #0372C1);
    color: #fff;
}

.erca-cc__btn--primary:hover {
    background: #025a99;
    border-color: #025a99;
    color: #fff;
}

.erca-cc__btn--solid {
    background: #12263a;
    border-color: #12263a;
    color: #fff;
}

.erca-cc__btn--solid:hover {
    background: #233a52;
    border-color: #233a52;
    color: #fff;
}

.erca-cc__btn--outline {
    background: #fff;
    border-color: rgba(3, 114, 193, .45);
    color: var(--dominant-font-color, #0372C1);
}

.erca-cc__btn--outline:hover {
    background: rgba(3, 114, 193, .06);
}

.erca-cc__btn--link {
    min-height: 36px;
    padding: 6px 10px;
    background: transparent;
    color: #4f5f70;
    font-weight: 500;
}

.erca-cc__btn--link:hover {
    color: var(--dominant-font-color, #0372C1);
}

/* --- Tercih penceresi ------------------------------------------------------------------------------- */
.erca-cc__overlay {
    position: fixed;
    inset: 0;
    z-index: 1095;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(10, 24, 40, .48);
    opacity: 0;
    transition: opacity .25s ease;
}

.erca-cc__overlay.is-visible {
    opacity: 1;
}

.erca-cc__overlay[hidden],
.erca-cc__banner[hidden] {
    display: none !important;
}

body.erca-cc-modal-open {
    overflow: hidden;
}

.erca-cc__modal {
    display: flex;
    flex-direction: column;
    width: min(560px, 100%);
    max-height: calc(100vh - 32px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(10, 24, 40, .3);
    outline: none;
    transform: translateY(12px);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.erca-cc__overlay.is-visible .erca-cc__modal {
    transform: none;
}

.erca-cc__modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 14px;
    border-bottom: 1px solid #eef2f6;
}

.erca-cc__modal-title {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 600;
    color: #12263a;
}

.erca-cc__modal-sub {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: #5b6b7c;
}

.erca-cc__close {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: #f2f5f8;
    color: #33475b;
    font-size: 20px;
    cursor: pointer;
}

.erca-cc__close:hover {
    background: #e6ecf2;
}

.erca-cc__modal-body {
    padding: 8px 24px;
    overflow-y: auto;
}

.erca-cc__category {
    padding: 16px 0;
}

.erca-cc__category + .erca-cc__category {
    border-top: 1px solid #eef2f6;
}

.erca-cc__category-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.erca-cc__category-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: #12263a;
}

.erca-cc__category-title label {
    margin: 0;
    cursor: pointer;
}

.erca-cc__category-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #5b6b7c;
}

.erca-cc__badge {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e8f6ee;
    color: #1d7a46;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.erca-cc__switch {
    position: relative;
    flex: 0 0 auto;
    width: 50px;
    height: 28px;
}

.erca-cc__switch input {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.erca-cc__switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #c9d3dd;
    transition: background-color .2s ease;
}

.erca-cc__switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .2s ease;
}

.erca-cc__switch input:checked + .erca-cc__switch-track {
    background: var(--dominant-font-color, #0372C1);
}

.erca-cc__switch input:checked + .erca-cc__switch-track .erca-cc__switch-thumb {
    transform: translateX(22px);
}

.erca-cc__switch input:focus-visible + .erca-cc__switch-track {
    box-shadow: 0 0 0 3px rgba(3, 114, 193, .35);
}

.erca-cc__modal-foot {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 16px 24px 22px;
    border-top: 1px solid #eef2f6;
}

/* Bant açıkken sabit düğmeler (WhatsApp, yukarı çık) bandın üstüne kayar. */
body.erca-cc-visible .erca-whatsapp-float,
body.erca-cc-visible a#top {
    bottom: calc(var(--erca-cc-height) + var(--erca-cc-bottom) + 16px) !important;
    transition: bottom .3s ease;
}

/* --- Footer "Çerez Tercihleri" ---------------------------------------------------------------------- */
.erca-footer-copy__cookie {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13px;
    color: rgba(232, 244, 246, .72);
    cursor: pointer;
}

.erca-footer-copy__cookie:hover {
    color: #fff;
}

/* --- Form KVKK notu ------------------------------------------------------------------------------- */
.erca-kvkk-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 12.5px;
    line-height: 1.55;
    color: #6a7887;
}

.erca-kvkk-notice i {
    flex: 0 0 auto;
    margin-top: 1px;
    color: var(--dominant-font-color, #0372C1);
    font-size: 15px;
}

.erca-kvkk-notice a {
    color: var(--dominant-font-color, #0372C1);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.erca-kvkk-notice--modal {
    margin: 4px 24px 0;
}

/* --- Yasal metin sayfaları (site/page/legal.blade.php) --------------------------------------------- */
.erca-legal__head {
    max-width: 820px;
    margin-bottom: 28px;
}

.erca-legal__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(3, 114, 193, .08);
    color: var(--dominant-font-color, #0372C1);
    font-size: 13px;
    font-weight: 600;
}

.erca-legal__title {
    margin: 14px 0 6px;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.2;
}

.erca-legal__meta {
    margin: 0;
    font-size: 14px;
    color: #7a8896;
}

.erca-legal__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    gap: 32px;
}

.erca-legal__body {
    padding: 32px 36px;
    background: #fff;
    border: 1px solid #e8eef4;
    border-radius: 20px;
    color: #3d4c5c;
    font-size: 15px;
    line-height: 1.8;
}

.erca-legal__body > :first-child {
    margin-top: 0;
}

.erca-legal__body h2 {
    margin: 30px 0 10px;
    font-size: 20px;
    color: #12263a;
}

.erca-legal__body h3 {
    margin: 22px 0 8px;
    font-size: 16.5px;
    color: #12263a;
}

.erca-legal__body p {
    margin: 0 0 14px;
}

.erca-legal__body ul,
.erca-legal__body ol {
    margin: 0 0 16px;
    padding-left: 22px;
    list-style: disc;
}

.erca-legal__body ol {
    list-style: decimal;
}

.erca-legal__body li {
    margin-bottom: 6px;
}

.erca-legal__body ul li::marker {
    color: var(--dominant-font-color, #0372C1);
}

.erca-legal__body a {
    color: var(--dominant-font-color, #0372C1);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.erca-legal__body table {
    display: block;
    width: 100%;
    margin: 6px 0 20px;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 13.5px;
    line-height: 1.5;
}

.erca-legal__body th,
.erca-legal__body td {
    padding: 10px 12px;
    border-bottom: 1px solid #e8eef4;
    text-align: left;
    vertical-align: top;
}

.erca-legal__body th {
    background: #f4f8fb;
    color: #12263a;
    font-weight: 600;
    white-space: nowrap;
}

.erca-legal__aside {
    position: sticky;
    top: calc(var(--site-header-offset, 0px) + 20px);
    display: grid;
    gap: 14px;
}

.erca-legal__card {
    padding: 20px;
    background: #fff;
    border: 1px solid #e8eef4;
    border-radius: 16px;
}

.erca-legal__card--accent {
    background: linear-gradient(150deg, rgba(3, 114, 193, .08), rgba(35, 182, 168, .08));
    border-color: rgba(3, 114, 193, .18);
}

.erca-legal__card-title {
    margin: 0 0 6px;
    font-size: 15px;
    color: #12263a;
}

.erca-legal__card p {
    margin: 0 0 12px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #5b6b7c;
}

.erca-legal__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--dominant-font-color, #0372C1);
    font-size: 14px;
    font-weight: 600;
    word-break: break-word;
    text-decoration: none;
}

.erca-legal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 12px;
    background: var(--dominant-font-color, #0372C1);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.erca-legal__btn:hover {
    background: #025a99;
}

/* --- Duyarlı düzen -------------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .erca-cc__banner-inner {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .erca-cc__actions {
        grid-column: 1 / -1;
    }

    .erca-legal__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .erca-legal__aside {
        position: static;
    }
}

@media (max-width: 575.98px) {
    /* Mobilde alttaki sabit menünün (bottom-menu) üstünde durur. */
    :root {
        --erca-cc-bottom: 72px;
    }

    .erca-cc__banner {
        width: calc(100% - 20px);
    }

    .erca-cc__banner-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 16px;
        border-radius: 16px;
    }

    .erca-cc__icon {
        display: none;
    }

    .erca-cc__title {
        font-size: 15px;
    }

    .erca-cc__text {
        font-size: 12.5px;
        line-height: 1.55;
    }

    .erca-cc__links {
        font-size: 12.5px;
    }

    .erca-cc__inline-pref,
    .erca-cc__inline-pref-sep {
        display: inline;
    }

    .erca-cc__actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erca-cc__actions .erca-cc__btn--link {
        display: none;
    }

    /* Tercih penceresi mobilde alttan açılan sayfa. */
    .erca-cc__overlay {
        align-items: flex-end;
        padding: 0;
    }

    .erca-cc__modal {
        width: 100%;
        max-height: 88vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(40px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .erca-cc__modal-head,
    .erca-cc__modal-body,
    .erca-cc__modal-foot {
        padding-left: 18px;
        padding-right: 18px;
    }

    .erca-cc__modal-foot {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erca-cc__modal-foot .erca-cc__btn--outline {
        grid-column: 1 / -1;
        order: -1;
    }

    .erca-legal__body {
        padding: 22px 18px;
        font-size: 14.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .erca-cc__banner,
    .erca-cc__overlay,
    .erca-cc__modal {
        transition: none;
    }
}
