﻿/* --- PALLETTER --- */
:root {
    /* JULETEMA VARM PALLETT (default) */
    --jul-rød: #8A1F1F;
    --jul-rød-mørk: #5A1212;
    --jul-rød-lys: #C75858;
    --jul-gull: #E5B35C;
    --jul-grønn: #2E6B3E;
    /* TRØNDERTAXI BLÅ PALLETT (dark-mode) */
    --tt-bla: #002478;
    --tt-bla-dyp: #0033ab;
    --tt-bla-lys: #0049f5;
    /* Felles tekstfarge-variabler */
    --text-light: #fff8f0;
    --text-light-soft: #f3e0d5;
}

/* Bakgrunn: varm julegradient (default / light-mode) */
body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--text-light);
    background: radial-gradient(circle at top left, rgba(229,179,92,0.25) 0, transparent 45%), radial-gradient(circle at bottom right, rgba(138,31,31,0.35) 0, transparent 55%), linear-gradient(180deg, var(--jul-rød-mørk) 0%, #330B0B 70%);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.card {
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.card-body {
    color: #fff;
}

.hero-badge {
    display: inline-block;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 999px;
    padding: 0.25rem 0.9rem;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 248, 240, 0.6);
}

.hero-subtitle {
    max-width: 650px;
    margin: 0 auto;
}

.small-text-muted {
    font-size: 0.85rem;
    color: var(--text-light-soft);
}

.section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.required-star {
    color: var(--jul-gull);
}


/* Kort – burgunder og gullkant */
.card-taxinisse {
    border-radius: 1.5rem;
    border: 1px solid rgba(229,179,92,0.4);
    background: radial-gradient(circle at top left, rgba(229,179,92,0.06), var(--jul-rød-mørk));
    box-shadow: 0 22px 45px rgba(0,0,0,0.55);
    backdrop-filter: blur(10px);
}

/* Tidsrom-kort */
.slot-card {
    border-radius: 1rem;
    border: 1px solid rgba(229,179,92,0.25);
    background: radial-gradient(circle at top left, rgba(229,179,92,0.1), rgba(0,0,0,0.5));
    transition: 0.2s ease;
}

    .slot-card:hover {
        border-color: var(--jul-gull);
        background: radial-gradient(circle at top left, rgba(229,179,92,0.2), rgba(0,0,0,0.6));
    }

    .slot-card.active {
        border-color: var(--jul-gull);
        box-shadow: 0 0 0 2px rgba(229,179,92,0.4);
        background: radial-gradient(circle at top left, rgba(229,179,92,0.25), rgba(0,0,0,0.7));
    }

/* Pris-brikke */
.badge-price {
    background: var(--jul-gull);
    color: #4A2606;
    font-weight: 700;
}

/* Knapper */
.btn-taxinisse {
    background: var(--jul-gull);
    color: #4A2606;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.75rem 2.5rem;
    border: none;
}

    .btn-taxinisse:hover {
        filter: brightness(1.08);
    }

.form-check-input {
    margin-top: 0; /* fjern Bootstrap sin lille dytt nedover */
}


/* Overskrift-dekor */
.taxi-navn {
    color: var(--jul-gull);
}

/* Jule-pynt-prikker */
.section-title-pill {
    background: var(--jul-grønn);
    box-shadow: 0 0 0 4px rgba(46,107,62,0.3);
}

    .section-title-pill.red {
        background: var(--jul-rød-lys);
        box-shadow: 0 0 0 4px rgba(199,88,88,0.3);
    }

/* Snøfnugg – gjør dem litt mykere og kremete */
.snowflake {
    color: rgba(255, 245, 230, 0.75);
    text-shadow: 0 0 5px rgba(255, 230, 200, 0.5);
}


/* Diskré snø-animasjon i toppen */
.snow-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.snowflake {
    position: absolute;
    top: -10%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    animation-name: snowfall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

    .snowflake:nth-child(odd) {
        font-size: 1rem;
        opacity: 0.8;
    }

@keyframes snowfall {
    0% {
        transform: translate3d(0, -10%, 0);
    }

    100% {
        transform: translate3d(0, 120vh, 0);
    }
}

/* Plasser noen snøfnugg litt tilfeldig */
.snowflake.s1 {
    left: 5%;
    animation-duration: 16s;
    animation-delay: 0s;
}

.snowflake.s2 {
    left: 15%;
    animation-duration: 22s;
    animation-delay: 3s;
}

.snowflake.s3 {
    left: 28%;
    animation-duration: 18s;
    animation-delay: 1s;
}

.snowflake.s4 {
    left: 40%;
    animation-duration: 24s;
    animation-delay: 4s;
}

.snowflake.s5 {
    left: 55%;
    animation-duration: 19s;
    animation-delay: 2s;
}

.snowflake.s6 {
    left: 68%;
    animation-duration: 21s;
    animation-delay: 5s;
}

.snowflake.s7 {
    left: 80%;
    animation-duration: 17s;
    animation-delay: 1.5s;
}

.snowflake.s8 {
    left: 92%;
    animation-duration: 23s;
    animation-delay: 3.5s;
}

/* NY JULETEMA-SEKSJON – «Slik fungerer det» */
.howto-card {
    background: radial-gradient(circle at top left, rgba(255, 200, 150, 0.08), var(--jul-rød-mørk));
}

.howto-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(229,179,92,0.15);
}

    .howto-step:last-child {
        border-bottom: none;
    }

.howto-icon {
    font-size: 1.5rem;
    line-height: 1;
    background: rgba(229,179,92,0.15);
    color: #fff5eb;
    border-radius: 0.75rem;
    padding: 0.4rem 0.6rem;
    min-width: 72px;
    text-align: center;
    border: 1px solid rgba(229,179,92,0.3);
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.howto-text strong {
    font-size: 1rem;
    color: #ffe9d3;
}

.howto-text p {
    margin: 0.2rem 0 0;
    color: #fceadd;
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Klikkbar link */
.vilkar-link {
    color: var(--jul-gull);
    text-decoration: none;
    font-weight: 600;
}

    .vilkar-link:hover {
        text-decoration: underline;
    }

.personvern-link {
    color: var(--jul-gull);
    text-decoration: none;
    font-weight: 600;
}

    .personvern-link:hover {
        text-decoration: underline;
    }


/* Selve modalen – Mye mer solid */
.vilkar-modal-content {
    background: linear-gradient(180deg, rgba(90,18,18,0.97) 0%, rgba(60,12,12,0.97) 100%);
    color: #fff8f0;
    border: 2px solid rgba(229,179,92,0.45);
    border-radius: 1.2rem;
    box-shadow: 0 25px 60px rgba(0,0,0,0.75);
    position: relative;
    overflow: hidden;
}

    /* Mer subtil juleglød – mindre gjennomsiktig */
    .vilkar-modal-content::before {
        content: "";
        position: absolute;
        top: -40px;
        left: -40px;
        width: 250px;
        height: 250px;
        background: radial-gradient(circle, rgba(229,179,92,0.18) 0%, rgba(90,18,18,0) 70%);
        filter: blur(25px);
        z-index: 0;
        opacity: 0.9;
    }

/* Sikre at teksten ligger over gløden */
.modal-header,
.modal-body,
.modal-footer {
    position: relative;
    z-index: 2;
}

/* Modal-tittel */
.modal-title {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--jul-gull);
    text-shadow: 0 0 6px rgba(0,0,0,0.8);
}

/* Seksjonsoverskrifter */
.vilkar-section h6 {
    margin-top: 1.4rem;
    font-weight: 700;
    color: var(--jul-gull);
    text-shadow: 0 0 6px rgba(0,0,0,0.8);
}

/* Brødtekst */
.vilkar-section p {
    margin-bottom: 0.4rem;
    line-height: 1.55;
    color: #fff0e6;
    font-size: 1rem;
}

/* --- Gullramme --- */
.vilkar-modal-content {
    border: 2px solid rgba(229,179,92,0.65); /* litt kraftigere gullramme */
    box-shadow: 0 0 0 3px rgba(229,179,92,0.18), /* subtil ytre glød */
    0 18px 45px rgba(0,0,0,0.75); /* eksisterende skygge */
}

    /* --- Ornament i øvre høyre hjørne --- */
    .vilkar-modal-content::after {
        content: "✧";
        position: absolute;
        top: 14px;
        right: 18px;
        font-size: 1.6rem;
        color: rgba(229,179,92,0.55);
        text-shadow: 0 0 6px rgba(229,179,92,0.35), 0 0 12px rgba(0,0,0,0.4);
        pointer-events: none;
        transform: rotate(12deg);
        opacity: 0.9;
    }

    /* Nederste venstre ornament */
    .vilkar-modal-content::before {
        content: "✧";
        position: absolute;
        bottom: 12px;
        left: 18px;
        font-size: 1.8rem;
        color: rgba(229,179,92,0.55);
        text-shadow: 0 0 6px rgba(229,179,92,0.35), 0 0 12px rgba(0,0,0,0.4);
        transform: rotate(-15deg);
        opacity: 0.85;
        pointer-events: none;
    }

/* Gull-dekorlinje under tittelen */
.modal-title {
    position: relative;
    display: inline-block;
    padding-bottom: 4px;
    margin-bottom: 6px;
}

    .modal-title::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -4px;
        width: 85%;
        height: 2px;
        background: linear-gradient(90deg, rgba(229,179,92,0.85), rgba(229,179,92,0.25));
        border-radius: 999px;
    }

/* Ornamenter på alle card-taxinisse */
.card-taxinisse {
    position: relative;
}

    /* Øvre høyre ornament */
    .card-taxinisse::after {
        content: "✦";
        position: absolute;
        top: 12px;
        right: 16px;
        font-size: 1.2rem;
        color: rgba(229,179,92,0.35);
        text-shadow: 0 0 10px rgba(229,179,92,0.25);
        transform: rotate(14deg);
        pointer-events: none;
    }

    /* Nedre venstre ornament */
    .card-taxinisse::before {
        content: "✦";
        position: absolute;
        bottom: 10px;
        left: 14px;
        font-size: 1.1rem;
        color: rgba(229,179,92,0.25);
        text-shadow: 0 0 8px rgba(229,179,92,0.2);
        transform: rotate(-10deg);
        pointer-events: none;
    }

.section-title {
    position: relative;
}

    /* Ornament venstre for tittelen */
    .section-title::before {
        content: "❄";
        position: absolute;
        left: -1.4rem;
        top: 0.05rem;
        font-size: 1rem;
        color: rgba(229,179,92,0.55);
        text-shadow: 0 0 6px rgba(0,0,0,0.35);
        transform: rotate(-8deg);
    }

    /* Ornament høyre for tittelen */
    .section-title::after {
        content: "❄";
        position: absolute;
        right: -1.4rem;
        top: 0.05rem;
        font-size: 1rem;
        color: rgba(229,179,92,0.35);
        text-shadow: 0 0 6px rgba(0,0,0,0.25);
        transform: rotate(8deg);
    }

/* --- Testmodus banner --- */
.testmode-banner {
    background: linear-gradient(90deg, #8A1F1F, #5A1212);
    color: #ffe8d2;
    border-bottom: 2px dashed var(--jul-gull);
    padding: 0.9rem 0;
    text-align: center;
    font-size: 1rem;
}

.testmode-icon {
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.5));
}

.testmode-text::after {
    content: " 🎅🧪";
}

#litDbError {
    display: block;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(0,0,0,0.65);
    color: #ffbebE;
    font-size: 0.85rem;
    white-space: pre-wrap;
}


/* =========================================================
   TRØNDERTAXI DARK-MODE (BLÅ)
   Aktiveres ved å legge class="dark-mode" på <body>
   ========================================================= */

body.dark-mode {
    color: #e9f1ff;
    background: radial-gradient(circle at top left, rgba(0,73,245,0.25) 0, transparent 45%), radial-gradient(circle at bottom right, rgba(0,36,120,0.45) 0, transparent 55%), linear-gradient(180deg, var(--tt-bla) 0%, #000814 75%);
}

    /* Cards og slots i blått */
    body.dark-mode .card-taxinisse {
        border: 1px solid rgba(0,73,245,0.45);
        background: radial-gradient(circle at top left, rgba(0,73,245,0.1), rgba(0,36,120,0.96));
        box-shadow: 0 22px 45px rgba(0,0,0,0.75);
    }

    body.dark-mode .slot-card {
        border: 1px solid rgba(0,73,245,0.35);
        background: radial-gradient(circle at top left, rgba(0,73,245,0.12), rgba(0,0,0,0.7));
    }

        body.dark-mode .slot-card:hover {
            border-color: var(--tt-bla-lys);
            background: radial-gradient(circle at top left, rgba(0,73,245,0.22), rgba(0,0,0,0.8));
        }

        body.dark-mode .slot-card.active {
            border-color: var(--tt-bla-lys);
            box-shadow: 0 0 0 2px rgba(0,73,245,0.45);
            background: radial-gradient(circle at top left, rgba(0,73,245,0.3), rgba(0,0,0,0.85));
        }

    /* Pris og knapper – blå variant */
    body.dark-mode .badge-price {
        background: var(--tt-bla-lys);
        color: #e9f1ff;
    }

    body.dark-mode .btn-taxinisse {
        background: var(--tt-bla-lys);
        color: #e9f1ff;
    }

        body.dark-mode .btn-taxinisse:hover {
            filter: brightness(1.1);
        }

    /* Tekster og småting */
    body.dark-mode .small-text-muted {
        color: #bcc7f1;
    }

    body.dark-mode .taxi-navn {
        color: var(--tt-bla-lys);
    }

    /* Piller */
    body.dark-mode .section-title-pill {
        background: var(--tt-bla-dyp);
        box-shadow: 0 0 0 4px rgba(0,36,120,0.45);
    }

        body.dark-mode .section-title-pill.red {
            background: var(--tt-bla-lys);
            box-shadow: 0 0 0 4px rgba(0,73,245,0.4);
        }

    /* Snøfnugg litt kaldere */
    body.dark-mode .snowflake {
        color: rgba(230, 240, 255, 0.8);
        text-shadow: 0 0 6px rgba(120,160,255,0.5);
    }

    /* How-to kort i blått */
    body.dark-mode .howto-card {
        background: radial-gradient(circle at top left, rgba(0,73,245,0.15), rgba(0,24,80,0.96));
    }

    body.dark-mode .howto-step {
        border-bottom: 1px solid rgba(0,73,245,0.28);
    }

    body.dark-mode .howto-icon {
        background: rgba(0,73,245,0.25);
        border-color: rgba(0,73,245,0.4);
        color: #e9f1ff;
    }

    body.dark-mode .howto-text strong {
        color: #f4f7ff;
    }

    body.dark-mode .howto-text p {
        color: #d0dbff;
    }

    /* Lenker – behold gull som aksent */
    body.dark-mode .vilkar-link,
    body.dark-mode .personvern-link {
        color: var(--jul-gull);
    }

    /* Modal – blå variant */
    body.dark-mode .vilkar-modal-content {
        background: linear-gradient(180deg, rgba(0,36,120,0.97) 0%, rgba(0,18,55,0.98) 100%);
        border-color: rgba(0,73,245,0.6);
        box-shadow: 0 0 0 3px rgba(0,73,245,0.25), 0 22px 50px rgba(0,0,0,0.85);
        color: #e9f1ff;
    }

        body.dark-mode .vilkar-modal-content::before {
            background: radial-gradient(circle, rgba(0,73,245,0.25) 0%, rgba(0,18,55,0) 70%);
        }

        body.dark-mode .vilkar-modal-content::after,
        body.dark-mode .vilkar-modal-content::before {
            color: rgba(0,73,245,0.6);
            text-shadow: 0 0 6px rgba(0,73,245,0.4), 0 0 12px rgba(0,0,0,0.7);
        }

    body.dark-mode .modal-title,
    body.dark-mode .vilkar-section h6 {
        color: var(--jul-gull);
    }

    body.dark-mode .vilkar-section p {
        color: #e3ebff;
    }

    body.dark-mode .modal-title::after {
        background: linear-gradient(90deg, rgba(229,179,92,0.9), rgba(0,73,245,0.6));
    }

    /* Ornamenter – litt blåskjær */
    body.dark-mode .card-taxinisse::after,
    body.dark-mode .card-taxinisse::before {
        color: rgba(0,73,245,0.45);
        text-shadow: 0 0 10px rgba(0,73,245,0.35);
    }

    body.dark-mode .section-title::before,
    body.dark-mode .section-title::after {
        color: rgba(0,73,245,0.55);
    }

    /* Testmodus-banner i blå */
    body.dark-mode .testmode-banner {
        background: linear-gradient(90deg, var(--tt-bla-dyp), var(--tt-bla));
        color: #e3ebff;
        border-bottom-color: rgba(0,73,245,0.6);
    }

    body.dark-mode #litDbError {
        background: rgba(0,0,0,0.8);
        color: #ffb3c1;
    }

html.preload-dark body {
    /* Samme som body.dark-mode */
    color: #e9f1ff;
    background: radial-gradient(circle at top left, rgba(0,73,245,0.25) 0, transparent 45%), radial-gradient(circle at bottom right, rgba(0,36,120,0.45) 0, transparent 55%), linear-gradient(180deg, var(--tt-bla) 0%, #000814 75%);
}

/* Deaktiver transitions under initial load */
html.preload-dark *,
html.preload-dark *::before,
html.preload-dark *::after {
    transition: none !important;
}
