/* Diva Home — Çerez onay banner & tercih modalı */
:root {
    --dh-cookie-brand: #ca1515;
    --dh-cookie-brand-dark: #a81111;
    --dh-cookie-z-banner: 10050;
    --dh-cookie-z-modal: 10060;
}

/* Banner açıkken WhatsApp çakışmasın */
body.dh-cookie-visible .whatsapp-float {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s, visibility 0.2s;
}

body.dh-cookie-modal-open {
    overflow: hidden;
}

/* ── Banner ── */
.dh-cookie {
    position: fixed;
    inset: 0;
    z-index: var(--dh-cookie-z-banner);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    pointer-events: none;
    font-family: 'Montserrat', sans-serif;
}

.dh-cookie.is-hidden {
    display: none !important;
}

.dh-cookie__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.35);
    pointer-events: auto;
    animation: dhCookieFadeIn 0.3s ease;
}

.dh-cookie__sheet {
    position: relative;
    width: 100%;
    max-width: 960px;
    pointer-events: auto;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.12);
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    animation: dhCookieSlideUp 0.35s ease;
}

@media (min-width: 768px) {
    .dh-cookie {
        align-items: flex-end;
        padding: 0 20px 20px;
    }

    .dh-cookie__backdrop {
        background: rgba(17, 17, 17, 0.25);
    }

    .dh-cookie__sheet {
        border-radius: 16px;
        padding: 22px 28px;
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    }
}

@keyframes dhCookieFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes dhCookieSlideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dh-cookie__handle {
    width: 40px;
    height: 4px;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: #e0e0e0;
}

@media (min-width: 768px) {
    .dh-cookie__handle {
        display: none;
    }
}

.dh-cookie__inner {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

@media (min-width: 768px) {
    .dh-cookie__inner {
        flex-direction: row;
        align-items: center;
        gap: 28px;
    }
}

.dh-cookie__brand {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
}

.dh-cookie__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fdf2f2 0%, #fce8e8 100%);
    color: var(--dh-cookie-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.dh-cookie__content {
    min-width: 0;
}

.dh-cookie__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
}

.dh-cookie__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: #555;
}

.dh-cookie__text a {
    color: var(--dh-cookie-brand);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(202, 21, 21, 0.35);
}

.dh-cookie__text a:hover {
    color: var(--dh-cookie-brand-dark);
}

.dh-cookie__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

@media (min-width: 768px) {
    .dh-cookie__actions {
        width: auto;
        min-width: 280px;
        flex-shrink: 0;
    }
}

.dh-cookie__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    border: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.dh-cookie__btn:active {
    transform: scale(0.98);
}

.dh-cookie__btn--primary {
    background: var(--dh-cookie-brand);
    color: #fff;
    box-shadow: 0 4px 14px rgba(202, 21, 21, 0.28);
}

.dh-cookie__btn--primary:hover {
    background: var(--dh-cookie-brand-dark);
}

.dh-cookie__btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.dh-cookie__btn--outline {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.dh-cookie__btn--outline:hover {
    border-color: var(--dh-cookie-brand);
    color: var(--dh-cookie-brand);
}

.dh-cookie__btn--muted {
    background: #f5f5f5;
    color: #666;
}

.dh-cookie__btn--muted:hover {
    background: #eee;
    color: #333;
}

/* ── Tercih modalı ── */
.dh-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: var(--dh-cookie-z-modal);
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.dh-cookie-modal.is-open {
    display: flex;
}

.dh-cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.5);
    backdrop-filter: blur(4px);
}

.dh-cookie-modal__sheet {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: min(90vh, 640px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.18);
    animation: dhCookieSlideUp 0.3s ease;
}

@media (min-width: 768px) {
    .dh-cookie-modal {
        align-items: center;
        padding: 20px;
    }

    .dh-cookie-modal__sheet {
        border-radius: 18px;
        max-height: calc(100vh - 40px);
    }
}

.dh-cookie-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 0;
    flex-shrink: 0;
}

.dh-cookie-modal__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

.dh-cookie-modal__close {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #f5f5f5;
    color: #666;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dh-cookie-modal__close:hover {
    background: #eee;
    color: #111;
}

.dh-cookie-modal__intro {
    margin: 0;
    padding: 12px 20px 0;
    font-size: 13px;
    line-height: 1.6;
    color: #666;
    flex-shrink: 0;
}

.dh-cookie-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    -webkit-overflow-scrolling: touch;
}

.dh-cookie-option {
    padding: 16px;
    margin-bottom: 10px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 14px;
}

.dh-cookie-option:last-child {
    margin-bottom: 0;
}

.dh-cookie-option--locked {
    background: #f5f5f5;
    border-color: #e8e8e8;
}

.dh-cookie-option__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.dh-cookie-option__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.dh-cookie-option__label {
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

.dh-cookie-option__badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e8e8e8;
    color: #666;
}

.dh-cookie-option__badge--required {
    background: #fce8e8;
    color: var(--dh-cookie-brand);
}

.dh-cookie-option__desc {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: #777;
}

/* Toggle switch */
.dh-cookie-switch {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 28px;
}

.dh-cookie-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.dh-cookie-switch__track {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s;
}

.dh-cookie-switch__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.dh-cookie-switch input:checked + .dh-cookie-switch__track {
    background: var(--dh-cookie-brand);
}

.dh-cookie-switch input:checked + .dh-cookie-switch__track::after {
    transform: translateX(20px);
}

.dh-cookie-switch input:disabled + .dh-cookie-switch__track {
    background: #bbb;
    cursor: not-allowed;
    opacity: 0.85;
}

.dh-cookie-modal__footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #f0f0f0;
    background: #fff;
}

@media (min-width: 480px) {
    .dh-cookie-modal__footer {
        flex-direction: row;
        justify-content: flex-end;
    }

    .dh-cookie-modal__footer .dh-cookie__btn {
        width: auto;
        min-width: 130px;
    }
}
