/* Cookie Consent — Maraş 18 */

.cookie-consent {
    --cc-green: #16351C;
    --cc-green-soft: #254D2A;
    --cc-walnut: #8A4F20;
    --cc-accent: #B8661A;
    --cc-cream: #F7F3EA;
    --cc-cream-2: #F5F1E8;
    --cc-white: #ffffff;
    --cc-text: #1b241d;
    --cc-muted: #6d655b;
    --cc-border: #e6dfd3;
    --cc-shadow: 0 -10px 40px rgba(22, 53, 28, 0.14);
    --cc-radius: 14px;
    font-family: "Manrope", system-ui, sans-serif;
    z-index: 99990;
    color: var(--cc-text);
}

.cookie-consent[hidden] {
    display: none !important;
}

.cookie-consent__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 38, 26, 0.42);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cookie-consent.is-open .cookie-consent__backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* Bottom banner */
.cookie-consent--bottom .cookie-consent__banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    transform: translateY(110%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.cookie-consent--bottom.is-open .cookie-consent__banner {
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-consent--bottom .cookie-consent__card {
    max-width: 980px;
    margin: 0 auto;
    border-radius: var(--cc-radius);
    box-shadow: var(--cc-shadow);
}

.cookie-consent--bottom.is-open .cookie-consent__backdrop {
    opacity: 0;
    pointer-events: none;
}

/* Center modal style */
.cookie-consent--modal .cookie-consent__banner {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cookie-consent--modal.is-open .cookie-consent__banner {
    opacity: 1;
    pointer-events: auto;
}

.cookie-consent--modal.is-open .cookie-consent__backdrop {
    opacity: 1;
    pointer-events: auto;
}

.cookie-consent--modal .cookie-consent__card {
    width: 100%;
    max-width: 540px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(22, 53, 28, 0.22);
}

/* Card */
.cookie-consent__card {
    background: var(--cc-white);
    border: 1px solid var(--cc-border);
    padding: 20px 22px;
}

.cookie-consent__head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.65rem;
}

.cookie-consent__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--cc-cream);
    color: var(--cc-green);
    border: 1px solid var(--cc-border);
}

.cookie-consent__icon .m18-icon {
    display: block;
}

.cookie-consent__title {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cc-green);
    line-height: 1.3;
}

.cookie-consent__text {
    font-size: 0.875rem;
    color: var(--cc-muted);
    line-height: 1.65;
    margin: 0 0 14px;
}

.cookie-consent__legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    font-size: 0.75rem;
    margin-bottom: 16px;
}

.cookie-consent__legal a {
    color: var(--cc-walnut);
    text-decoration: none;
    font-weight: 600;
}

.cookie-consent__legal a:hover {
    color: var(--cc-accent);
    text-decoration: underline;
}

.cookie-consent__legal span {
    color: #c9bfb0;
}

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cookie-consent__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 700;
    font-family: inherit;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
    white-space: nowrap;
}

.cookie-consent__btn:active {
    transform: translateY(1px);
}

.cookie-consent__btn--primary {
    background: var(--cc-green);
    color: #fff;
}

.cookie-consent__btn--primary:hover {
    background: var(--cc-green-soft);
}

.cookie-consent__btn--secondary {
    background: var(--cc-walnut);
    color: #fff;
}

.cookie-consent__btn--secondary:hover {
    background: var(--cc-accent);
}

.cookie-consent__btn--outline {
    background: var(--cc-cream);
    color: var(--cc-green);
    border: 1.5px solid var(--cc-border);
}

.cookie-consent__btn--outline:hover {
    background: #fff;
    border-color: #d5c9b6;
}

.cookie-consent__btn--link {
    background: transparent;
    color: var(--cc-muted);
    padding-left: 8px;
    padding-right: 8px;
    font-weight: 600;
}

.cookie-consent__btn--link:hover {
    color: var(--cc-green);
}

/* Preferences modal */
.cookie-consent__prefs {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.cookie-consent__prefs.is-visible {
    opacity: 1;
    pointer-events: auto;
    background: rgba(20, 38, 26, 0.45);
    backdrop-filter: blur(2px);
}

.cookie-consent__prefs[hidden] {
    display: none !important;
}

.cookie-consent__prefs-card {
    background: var(--cc-white);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius);
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 22px;
    box-shadow: 0 24px 64px rgba(22, 53, 28, 0.22);
}

.cookie-consent__prefs-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.cookie-consent__prefs-title {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cc-green);
}

.cookie-consent__close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--cc-border);
    background: var(--cc-cream);
    color: var(--cc-green);
    border-radius: 10px;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cookie-consent__close:hover {
    background: #efe8da;
}

.cookie-consent__prefs-desc {
    font-size: 0.8125rem;
    color: var(--cc-muted);
    margin: 0 0 16px;
    line-height: 1.55;
}

.cookie-consent__categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.cookie-consent__category {
    background: var(--cc-cream);
    border: 1px solid var(--cc-border);
    border-radius: 12px;
    padding: 14px;
}

.cookie-consent__category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.cookie-consent__category-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--cc-green);
}

.cookie-consent__category-desc {
    font-size: 0.75rem;
    color: var(--cc-muted);
    margin: 0;
    line-height: 1.5;
    padding-left: 52px;
}

.cookie-consent__badge {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cc-walnut);
    background: #f3e6d5;
    padding: 3px 8px;
    border-radius: 999px;
}

.cookie-consent__legal--prefs {
    margin-bottom: 14px;
}

.cookie-consent__prefs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Toggle switch */
.cookie-consent__toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.cookie-consent__toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-consent__toggle-ui {
    position: relative;
    width: 40px;
    height: 22px;
    background: #d4c9b8;
    border-radius: 999px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.cookie-consent__toggle-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cookie-consent__toggle input:checked + .cookie-consent__toggle-ui {
    background: var(--cc-green);
}

.cookie-consent__toggle input:checked + .cookie-consent__toggle-ui::after {
    transform: translateX(18px);
}

.cookie-consent__toggle input:disabled + .cookie-consent__toggle-ui {
    background: var(--cc-green-soft);
    opacity: 0.9;
}

/* Mobile */
@media (max-width: 639px) {
    .cookie-consent__card {
        padding: 16px;
    }

    .cookie-consent__actions {
        flex-direction: column;
    }

    .cookie-consent__btn {
        width: 100%;
    }

    .cookie-consent__btn--link {
        width: 100%;
        text-align: center;
    }

    .cookie-consent--bottom .cookie-consent__banner {
        padding: 10px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    .cookie-consent__category-desc {
        padding-left: 0;
        margin-top: 4px;
    }

    .cookie-consent__prefs-actions {
        flex-direction: column;
    }

    .cookie-consent__prefs-actions .cookie-consent__btn {
        width: 100%;
    }
}

@media (min-width: 640px) {
    .cookie-consent__card {
        padding: 24px 28px;
    }

    .cookie-consent__title {
        font-size: 1.35rem;
    }
}
