/*
 * Filename: cookie_consent_v47d.css
 * Directory: /www/css
 * Description: Premium Matsnakk-stil for cookie- og samtykkebanner med Cookievalg i footer.
 * Language: Norwegian
 * Copyright: Webmasterinfo.no
 */

.mn-cookie-consent,
.mn-cookie-consent * {
    box-sizing: border-box;
}

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

.mn-cookie-consent {
    position: fixed;
    inset: auto 1rem 1rem 1rem;
    z-index: 9990;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.mn-cookie-consent__panel {
    width: min(1120px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    pointer-events: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
    gap: 1.15rem;
    padding: 1.15rem;
    border: 1px solid rgba(176, 128, 75, 0.34);
    border-radius: 24px;
    background:
        radial-gradient(circle at 18% 0%, rgba(203, 151, 87, 0.22), transparent 30%),
        linear-gradient(145deg, rgba(42, 29, 23, 0.98), rgba(18, 13, 11, 0.98));
    color: #fff8ec;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38), 0 8px 28px rgba(66, 34, 12, 0.28);
}

.mn-cookie-consent__eyebrow {
    margin: 0 0 0.35rem;
    color: #d7aa72;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.mn-cookie-consent h2 {
    margin: 0 0 0.65rem;
    color: #fff0d6;
    font-size: clamp(1.35rem, 2vw, 2rem);
    line-height: 1.1;
}

.mn-cookie-consent p {
    margin: 0 0 0.72rem;
    color: rgba(255, 248, 236, 0.88);
    line-height: 1.55;
}

.mn-cookie-consent__links {
    margin-bottom: 0;
}

.mn-cookie-consent a {
    color: #f0c98f;
    text-underline-offset: 0.16em;
}

.mn-cookie-consent a:hover,
.mn-cookie-consent a:focus-visible {
    color: #ffe1ad;
}

.mn-cookie-consent__choices {
    display: grid;
    gap: 0.65rem;
    align-content: start;
}

.mn-cookie-consent__choice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.82rem 0.88rem;
    border: 1px solid rgba(240, 201, 143, 0.19);
    border-radius: 16px;
    background: rgba(255, 248, 236, 0.075);
}

.mn-cookie-consent__choice-text {
    display: grid;
    gap: 0.18rem;
}

.mn-cookie-consent__choice strong {
    color: #fff3df;
    font-size: 0.98rem;
}

.mn-cookie-consent__choice small {
    color: rgba(255, 248, 236, 0.75);
    line-height: 1.35;
}

.mn-cookie-consent__always-on {
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(240, 201, 143, 0.14);
    color: #f4cf98;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.mn-cookie-consent__switch {
    position: relative;
    display: inline-flex;
    width: 48px;
    height: 28px;
    flex: 0 0 auto;
}

.mn-cookie-consent__switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.mn-cookie-consent__switch input:disabled {
    cursor: not-allowed;
}

.mn-cookie-consent__switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.16);
    transition: background 0.18s ease, border-color 0.18s ease;
}

.mn-cookie-consent__switch span::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fff8ec;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: transform 0.18s ease;
}

.mn-cookie-consent__switch input:checked + span {
    background: #b87333;
    border-color: #d19a5d;
}

.mn-cookie-consent__switch input:checked + span::after {
    transform: translateX(20px);
}

.mn-cookie-consent__actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.7rem;
    padding-top: 0.15rem;
}

.mn-cookie-consent__button,
.mn-footer-cookie-choice {
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.mn-cookie-consent__button {
    padding: 0.82rem 1.08rem;
}

.mn-cookie-consent__button:hover,
.mn-cookie-consent__button:focus-visible,
.mn-footer-cookie-choice:hover,
.mn-footer-cookie-choice:focus-visible {
    transform: translateY(-1px);
}

.mn-cookie-consent__button--primary {
    color: #24140d;
    background: linear-gradient(135deg, #ffe1ad, #c7813d);
    box-shadow: 0 10px 26px rgba(199, 129, 61, 0.25);
}

.mn-cookie-consent__button--save {
    color: #fff8ec;
    background: rgba(255, 248, 236, 0.16);
    border: 1px solid rgba(255, 248, 236, 0.2);
}

.mn-cookie-consent__button--secondary {
    color: #fff8ec;
    background: rgba(255, 248, 236, 0.08);
    border: 1px solid rgba(255, 248, 236, 0.16);
}

.mn-footer-cookie-choice {
    display: inline;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    font-weight: inherit;
    text-decoration: none;
    line-height: inherit;
}

.mn-footer-cookie-choice:hover,
.mn-footer-cookie-choice:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

@media (max-width: 820px) {
    .mn-cookie-consent__panel {
        grid-template-columns: 1fr;
        padding: 1rem;
        border-radius: 20px;
    }

    .mn-cookie-consent__actions {
        justify-content: stretch;
    }

    .mn-cookie-consent__button {
        flex: 1 1 100%;
    }
}

@media (max-width: 520px) {
    .mn-cookie-consent {
        inset: auto 0.65rem 0.65rem 0.65rem;
    }

    .mn-cookie-consent__choice {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .mn-cookie-consent__always-on {
        grid-column: 1 / -1;
        width: fit-content;
    }
}
