/* Jultidningsförlaget - egen cookiebanner (se js/cookie-consent.js).
   Röd #e2001a som webbplatsen, länkar #006ab3, Arial. */
.jtf-cc-overlay {
    --jtf-cc-green: #e2001a;
    --jtf-cc-green-dark: #b80015;
    --jtf-cc-red: #555555;
    --jtf-cc-link: #006ab3;
    --jtf-cc-text: #333;
    --jtf-cc-muted: #666;
    --jtf-cc-border: #e3e3e3;
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0);
    font-family: Arial, Helvetica, sans-serif;
    color: var(--jtf-cc-text);
    transition: background 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
    box-sizing: border-box;
}
.jtf-cc-overlay *,
.jtf-cc-overlay *::before,
.jtf-cc-overlay *::after {
    box-sizing: border-box;
}
.jtf-cc-overlay.jtf-cc-open {
    background: rgba(30, 20, 20, 0.45);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.jtf-cc-overlay [hidden] {
    display: none !important;
}
html.jtf-cc-noscroll,
html.jtf-cc-noscroll body {
    overflow: hidden;
}

.jtf-cc-dialog {
    position: relative;
    width: 100%;
    max-width: 820px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    border-top: 6px solid var(--jtf-cc-green);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.jtf-cc-open .jtf-cc-dialog {
    opacity: 1;
    transform: none;
}
.jtf-cc-view {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* --- logo, rubrik, text --- */
.jtf-cc-logo {
    text-align: center;
    margin: 0 0 16px;
}
.jtf-cc-logo img {
    display: inline-block;
    height: 120px;
    width: auto;
}
.jtf-cc-logo-small {
    margin: 0;
}
.jtf-cc-logo-small img {
    height: 44px;
}
.jtf-cc-title {
    margin: 0 0 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    color: #222;
    letter-spacing: 0;
    text-transform: none;
}
.jtf-cc-text {
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--jtf-cc-text);
}
.jtf-cc-small {
    margin: 16px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--jtf-cc-muted);
}
.jtf-cc-overlay a {
    color: var(--jtf-cc-link);
    text-decoration: underline;
}

/* --- knappar --- */
.jtf-cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 10px 22px;
    border-radius: 30px;
    border: 2px solid var(--jtf-cc-green);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.jtf-cc-btn-primary {
    background: var(--jtf-cc-green);
    color: #fff;
}
.jtf-cc-btn-primary:hover {
    background: var(--jtf-cc-green-dark);
    border-color: var(--jtf-cc-green-dark);
}
.jtf-cc-btn-outline {
    background: #fff;
    color: var(--jtf-cc-green);
}
.jtf-cc-btn-outline:hover {
    background: #fdecee;
}
.jtf-cc-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--jtf-cc-link);
    text-decoration: underline;
    padding-left: 8px;
    padding-right: 8px;
}
.jtf-cc-btn-ghost:hover {
    color: #004f86;
}
.jtf-cc-btn:focus-visible,
.jtf-cc-choice:focus-visible,
.jtf-cc-bulk-btn:focus-visible,
.jtf-cc-expand:focus-visible,
.jtf-cc-close:focus-visible {
    outline: 3px solid rgba(0, 106, 179, 0.5);
    outline-offset: 2px;
}

/* --- första vyn --- */
.jtf-cc-notice {
    padding: 44px 52px 36px;
    overflow-y: auto;
}
.jtf-cc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}
.jtf-cc-actions .jtf-cc-btn-ghost {
    margin-right: auto;
}

/* --- inställningar --- */
.jtf-cc-preferences {
    max-height: calc(100vh - 32px);
}
.jtf-cc-pref-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 56px 16px 24px;
    border-bottom: 1px solid var(--jtf-cc-border);
}
.jtf-cc-pref-header .jtf-cc-title {
    margin: 0;
    text-align: left;
}
.jtf-cc-close {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 36px;
    height: 36px;
    margin-top: -18px;
    padding: 8px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    fill: #555;
}
.jtf-cc-close:hover {
    background: #f1f1f1;
}
.jtf-cc-close svg {
    width: 20px;
    height: 20px;
    display: block;
}
.jtf-cc-pref-body {
    padding: 20px 24px;
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
}
.jtf-cc-pref-footer {
    display: flex;
    justify-content: flex-end;
    padding: 14px 24px;
    border-top: 1px solid var(--jtf-cc-border);
    background: #fafafa;
}

.jtf-cc-bulk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: #fdf3f4;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
}
.jtf-cc-bulk-buttons {
    display: flex;
    gap: 8px;
}
.jtf-cc-bulk-btn {
    padding: 7px 14px;
    border: 1px solid #bbb;
    border-radius: 20px;
    background: #fff;
    color: #444;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.jtf-cc-bulk-btn:hover {
    border-color: var(--jtf-cc-red);
    color: var(--jtf-cc-red);
}
.jtf-cc-bulk-agree {
    border-color: var(--jtf-cc-green);
    color: var(--jtf-cc-green);
}
.jtf-cc-bulk-agree:hover {
    background: var(--jtf-cc-green);
    border-color: var(--jtf-cc-green);
    color: #fff;
}

.jtf-cc-purposes {
    border: 1px solid var(--jtf-cc-border);
    border-radius: 8px;
}
.jtf-cc-purpose + .jtf-cc-purpose {
    border-top: 1px solid var(--jtf-cc-border);
}
.jtf-cc-purpose-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
}
.jtf-cc-expand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 4px 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
}
.jtf-cc-chevron {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    fill: #777;
    transition: transform 0.2s ease;
    transform: rotate(-90deg);
}
.jtf-cc-chevron svg {
    display: block;
    width: 18px;
    height: 18px;
}
.jtf-cc-expand[aria-expanded="true"] .jtf-cc-chevron {
    transform: none;
}
.jtf-cc-purpose-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}
.jtf-cc-purpose-body {
    padding: 0 12px 12px 38px;
}
.jtf-cc-purpose-body p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--jtf-cc-muted);
}
.jtf-cc-always {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--jtf-cc-green);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Avvisa / Godkänn - som Didomis kryss och bock */
.jtf-cc-switch {
    flex-shrink: 0;
    display: flex;
    border: 1px solid #ccc;
    border-radius: 20px;
    overflow: hidden;
}
.jtf-cc-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 32px;
    padding: 0;
    border: 0;
    background: #fff;
    cursor: pointer;
    fill: #999;
    transition: background 0.15s ease, fill 0.15s ease;
}
.jtf-cc-choice + .jtf-cc-choice {
    border-left: 1px solid #ccc;
}
.jtf-cc-choice svg {
    width: 16px;
    height: 16px;
}
.jtf-cc-choice span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
.jtf-cc-deny:hover {
    fill: var(--jtf-cc-red);
}
.jtf-cc-agree:hover {
    fill: #1e8e3e;
}
.jtf-cc-deny[aria-checked="true"] {
    background: var(--jtf-cc-red);
    fill: #fff;
}
.jtf-cc-agree[aria-checked="true"] {
    background: #1e8e3e;
    fill: #fff;
}

/* --- mobil --- */
@media (max-width: 576px) {
    .jtf-cc-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .jtf-cc-dialog {
        max-height: 92vh;
        border-radius: 12px 12px 0 0;
    }
    .jtf-cc-preferences {
        max-height: 92vh;
    }
    .jtf-cc-notice {
        padding: 24px 18px 18px;
    }
    .jtf-cc-logo img {
        height: 64px;
    }
    .jtf-cc-logo-small img {
        height: 36px;
    }
    .jtf-cc-title {
        font-size: 19px;
    }
    .jtf-cc-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .jtf-cc-actions .jtf-cc-btn {
        width: 100%;
    }
    .jtf-cc-actions .jtf-cc-btn-ghost {
        margin-right: 0;
    }
    .jtf-cc-pref-header {
        padding: 12px 52px 12px 16px;
    }
    .jtf-cc-pref-body {
        padding: 16px;
    }
    .jtf-cc-pref-footer {
        padding: 12px 16px;
    }
    .jtf-cc-pref-footer .jtf-cc-btn {
        width: 100%;
    }
}

/* Cookiepolicy-sidan */
.jtf-cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 20px;
    font-size: 13px;
}
.jtf-cookie-table th,
.jtf-cookie-table td {
    border: 1px solid #ddd;
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
}
.jtf-cookie-table th {
    background: #fdf3f4;
}
.jtf-cookie-table-wrap {
    overflow-x: auto;
}
