/* Cookiesamtykke — flyttet 1:1 fra /style.css (den nye forside loader ikke den).
   Kilden er stadig /style.css for de oevrige sider; ret begge steder. */

/* ==========================================================================
   COOKIESAMTYKKE — helt eget design, Cookiebot koerer motoren bagved
   ==========================================================================
   Cookiebots eget banner-layout (multilevel) kunne ikke gøres lille uden
   enten at skjule information eller kæmpe en tabt kamp mod dens stylesheet
   (width/max-width/left kan ikke overskrives uanset specificitet — se
   commit-historikken). Løsningen er den af Cookiebot selv officielt
   understøttede model: byg sin egen UI, lad Cookiebot.submitCustomConsent()
   sætte samtykket, og lad Cookiebot fortsat stå for blokering af scripts og
   samtykke-logning (revisionsspor). Ingen ny compliance-forpligtelse — det
   er stadig Cookiebots motor, kun skindet er vores eget.

   INGEN af Cookiebots egne skærme vises nogensinde — hverken banner,
   "vælg selv"-dialog eller genåbn-widget. Alt er erstattet:
     #cc-bar            — banneret (bund, lille)
     #cc-panel-overlay   — vores eget "vælg selv"-panel (statistik/marketing)
     #cc-dot             — vores egen genåbn-prik, bund-venstre
   Markup + aktiverings-script ligger i HTML'en, lige efter <body>.
   ========================================================================== */

#CybotCookiebotDialog,
#CybotCookiebotDialogBodyUnderlay,
#CookiebotWidget {
    display: none !important;
}

.cc-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 999999;
    max-width: 640px;
    margin: 0 auto;
    background: #FFFFFF;
    border: 1px solid var(--dark-4);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 34px rgba(17, 24, 39, 0.14);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cc-bar[hidden] {
    display: none !important;
}

.cc-bar__text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--gray-4);
}

.cc-bar__link {
    color: var(--gray-4);
    text-decoration: underline;
    white-space: nowrap;
}

.cc-bar__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cc-bar__btn {
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    border: none;
}

.cc-bar__btn--solid {
    background: var(--orange);
    color: #FFFFFF;
}

.cc-bar__btn--ghost {
    background: transparent;
    color: var(--gray-4);
    border: 1px solid var(--dark-4);
}

@media (max-width: 640px) {
    .cc-bar {
        left: 0;
        right: 0;
        bottom: 0;
        max-width: 100%;
        border-radius: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .cc-bar__actions {
        justify-content: stretch;
    }
    .cc-bar__btn {
        flex: 1 1 0;
        text-align: center;
    }
}


/* --- Genåbn-prik, bund-venstre. Erstatter Cookiebots #CookiebotWidget. --
   Vises kun EFTER en beslutning er truffet (accepteret eller afvist) —
   samme opførsel som den widget den erstatter. */
.cc-dot {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 999998;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--orange);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(17, 24, 39, 0.18);
    transition: transform 0.15s;
}

.cc-dot:hover {
    transform: scale(1.06);
}

.cc-dot[hidden] {
    display: none !important;
}

.cc-dot svg {
    width: 20px;
    height: 20px;
}

/* --- "Vælg selv"-panel. Erstatter Cookiebots fulde native dialog. --- */
.cc-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    background: rgba(17, 24, 39, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.cc-panel-overlay[hidden] {
    display: none !important;
}

.cc-panel {
    position: relative;
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    max-width: 420px;
    width: 100%;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 26px 24px 22px;
    box-shadow: 0 20px 60px rgba(17, 24, 39, 0.28);
}

.cc-panel__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--dark-3);
    color: var(--gray-4);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.cc-panel h2 {
    margin: 0 12px 8px 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--white);
}

.cc-panel__intro {
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--gray-4);
    line-height: 1.5;
}

.cc-panel__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--dark-4);
}

.cc-panel__row:first-of-type {
    border-top: none;
    padding-top: 0;
}

.cc-panel__row-text strong {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 2px;
}

.cc-panel__row-text span {
    font-size: 12.5px;
    color: var(--gray-3);
    line-height: 1.4;
}

.cc-panel__actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.cc-panel__actions .cc-bar__btn {
    flex: 1 1 0;
    text-align: center;
}

/* --- Toggle-switch, brand-farvet --- */
.cc-toggle {
    position: relative;
    display: block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.cc-toggle input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.cc-toggle__track {
    position: absolute;
    inset: 0;
    background: var(--dark-4);
    border-radius: 999px;
    transition: background 0.15s;
    pointer-events: none;
}

.cc-toggle__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s;
    pointer-events: none;
}

.cc-toggle input:checked ~ .cc-toggle__track {
    background: var(--orange);
}

.cc-toggle input:checked ~ .cc-toggle__thumb {
    transform: translateX(18px);
}

.cc-toggle input:disabled ~ .cc-toggle__track {
    background: var(--orange);
    opacity: 0.45;
}

.cc-toggle input:disabled {
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .cc-panel {
        padding: 22px 18px 18px;
    }
}
