/**
 * Çerez onay bandı — vitrin stilleri (masaüstü + mobil).
 */

:root {
    --cookie-consent-z: 1300;
    --cookie-consent-bg: #0f172a;
    --cookie-consent-text: #e2e8f0;
    --cookie-consent-muted: #94a3b8;
    --cookie-consent-border: rgba(148, 163, 184, 0.25);
    --cookie-consent-accent: var(--secondary-color, #008ed9);
    --cookie-consent-shadow: 0 12px 40px rgba(15, 23, 42, 0.28);
    --cookie-consent-radius: 14px;
    --cookie-consent-gap: 16px;
    --cookie-consent-pad-y: 14px;
    --cookie-consent-pad-x: 20px;
}

.cookie-consent {
    position: fixed;
    z-index: var(--cookie-consent-z);
    color: var(--cookie-consent-text);
    font-size: 14px;
    line-height: 1.45;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.cookie-consent.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.cookie-consent.is-hiding {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}

.cookie-consent__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--cookie-consent-gap);
    width: 100%;
}

.cookie-consent__content {
    flex: 1 1 auto;
    min-width: 0;
}

.cookie-consent__message {
    margin: 0;
    color: var(--cookie-consent-text);
}

.cookie-consent__policy {
    display: inline-block;
    margin-top: 6px;
    color: var(--cookie-consent-policy-color, var(--cookie-consent-accent));
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-consent__policy:hover {
    filter: brightness(1.12);
}

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
}

.cookie-consent__btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
}

.cookie-consent__btn--primary {
    background: var(--cookie-consent-btn-accept-bg, var(--cookie-consent-accent));
    color: var(--cookie-consent-btn-accept-text, #fff);
    border-color: var(--cookie-consent-btn-accept-bg, var(--cookie-consent-accent));
}

.cookie-consent__btn--primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.cookie-consent__btn--ghost {
    background: transparent;
    color: var(--cookie-consent-btn-reject-text, var(--cookie-consent-text));
    border-color: var(--cookie-consent-btn-reject-border, var(--cookie-consent-border));
}

.cookie-consent__btn--ghost:hover {
    border-color: var(--cookie-consent-btn-reject-border, var(--cookie-consent-border));
    background: rgba(255, 255, 255, 0.06);
    filter: brightness(1.08);
}

/* —— Alt çizgi (bar) —— */
.cookie-consent--bar,
.cookie-consent--bar_accent,
.cookie-consent--minimal,
.cookie-consent--stacked {
    left: 0;
    right: 0;
    bottom: 0;
}

.cookie-consent--bar .cookie-consent__inner,
.cookie-consent--bar_accent .cookie-consent__inner,
.cookie-consent--stacked .cookie-consent__inner {
    background: var(--cookie-consent-bg);
    border-top: 1px solid var(--cookie-consent-border);
    padding: var(--cookie-consent-pad-y) var(--cookie-consent-pad-x);
    max-width: 1280px;
    margin: 0 auto;
}

.cookie-consent--bar_accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cookie-consent-accent), transparent 70%);
}

/* —— Minimal —— */
.cookie-consent--minimal .cookie-consent__inner {
    background: var(--cookie-consent-bg);
    border-top: 1px solid var(--cookie-consent-border);
    padding: 10px var(--cookie-consent-pad-x);
    max-width: 1280px;
    margin: 0 auto;
}

.cookie-consent--minimal .cookie-consent__message {
    font-size: 13px;
}

.cookie-consent--minimal .cookie-consent__btn {
    padding: 7px 14px;
    font-size: 12px;
}

.cookie-consent--minimal .cookie-consent__policy {
    margin-top: 4px;
    font-size: 12px;
}

/* —— Yığılmış —— */
.cookie-consent--stacked .cookie-consent__inner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
}

.cookie-consent--stacked .cookie-consent__actions {
    justify-content: flex-start;
}

@media (min-width: 768px) {
    .cookie-consent--stacked .cookie-consent__inner {
        flex-direction: row;
        align-items: center;
    }

    .cookie-consent--stacked .cookie-consent__actions {
        justify-content: flex-end;
    }
}

/* —— Orta kart (floating) —— */
.cookie-consent--floating {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: 720px;
    margin: 0 auto;
}

.cookie-consent--floating .cookie-consent__inner {
    background: var(--cookie-consent-bg);
    border: 1px solid var(--cookie-consent-border);
    border-radius: var(--cookie-consent-radius);
    box-shadow: var(--cookie-consent-shadow);
    padding: 18px 20px;
}

/* —— Köşe kartları —— */
.cookie-consent--corner,
.cookie-consent--corner_left {
    bottom: 16px;
    width: min(100% - 32px, 380px);
}

.cookie-consent--corner {
    right: 16px;
    left: auto;
}

.cookie-consent--corner_left {
    left: 16px;
    right: auto;
}

.cookie-consent--corner .cookie-consent__inner,
.cookie-consent--corner_left .cookie-consent__inner {
    flex-direction: column;
    align-items: stretch;
    background: var(--cookie-consent-bg);
    border: 1px solid var(--cookie-consent-border);
    border-radius: var(--cookie-consent-radius);
    box-shadow: var(--cookie-consent-shadow);
    padding: 18px;
}

.cookie-consent--corner .cookie-consent__actions,
.cookie-consent--corner_left .cookie-consent__actions {
    justify-content: stretch;
    width: 100%;
}

.cookie-consent--corner .cookie-consent__btn,
.cookie-consent--corner_left .cookie-consent__btn {
    flex: 1 1 auto;
    text-align: center;
}

/* Sayfa alt boşluğu — tam genişlik bar stilleri */
html.cookie-consent-bar-visible {
    scroll-padding-bottom: 88px;
}

html.cookie-consent-bar-visible body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Mobil */
@media (max-width: 767px) {
    .cookie-consent--bar .cookie-consent__inner,
    .cookie-consent--bar_accent .cookie-consent__inner,
    .cookie-consent--minimal .cookie-consent__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .cookie-consent--bar .cookie-consent__actions,
    .cookie-consent--bar_accent .cookie-consent__actions,
    .cookie-consent--minimal .cookie-consent__actions {
        width: 100%;
        justify-content: stretch;
    }

    .cookie-consent--bar .cookie-consent__btn,
    .cookie-consent--bar_accent .cookie-consent__btn,
    .cookie-consent--minimal .cookie-consent__btn {
        flex: 1 1 0;
        text-align: center;
    }

    .cookie-consent--floating {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .cookie-consent--floating .cookie-consent__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent--floating .cookie-consent__actions {
        justify-content: stretch;
        width: 100%;
    }

    .cookie-consent--floating .cookie-consent__btn {
        flex: 1 1 0;
        text-align: center;
    }

    /* Sağ köşe mobilde tam genişlik alt bar gibi */
    .cookie-consent--corner {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
    }

    .cookie-consent--corner .cookie-consent__inner {
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        box-shadow: none;
    }

    .cookie-consent--corner_left {
        left: 12px;
        right: 12px;
        width: auto;
        bottom: 12px;
    }
}

/* Yüzen aksiyonlar ile çakışmayı azalt */
@media (min-width: 768px) {
    .cookie-consent--corner {
        bottom: 24px;
        right: 24px;
    }

    body:has(.site-floating-actions) .cookie-consent--corner {
        bottom: 110px;
    }

    body:has(.site-floating-actions) .cookie-consent--floating {
        bottom: 24px;
    }
}

/* Cam / şeffaf görünüm */
.cookie-consent--glass .cookie-consent__inner {
    backdrop-filter: blur(var(--cookie-consent-blur, 12px));
    -webkit-backdrop-filter: blur(var(--cookie-consent-blur, 12px));
}

.cookie-consent--glass.cookie-consent--floating .cookie-consent__inner,
.cookie-consent--glass.cookie-consent--corner .cookie-consent__inner,
.cookie-consent--glass.cookie-consent--corner_left .cookie-consent__inner {
    box-shadow: var(--cookie-consent-shadow);
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent {
        transition: none;
    }

    .cookie-consent__btn:hover {
        transform: none;
    }
}

@media print {
    .cookie-consent {
        display: none !important;
    }
}
