/* SPT kalender-overlay – se kalender.js */

.spt-kal {
    --spt-kal-accent: #4f2d63;
    --spt-kal-accent-text: #fff;
    --spt-kal-bg: #fbf9f6;
    --spt-kal-text: #1c1a1f;
    --spt-kal-muted: rgb(28 26 31 / 0.62);
    --spt-kal-line: rgb(28 26 31 / 0.12);
    font-family: var(--font-sans, system-ui, sans-serif);
}

.spt-kal[hidden],
.spt-kal [hidden] {
    display: none !important;
}

html.spt-kal-locked {
    overflow: hidden;
}

/* Fliken */
.spt-kal-tab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9000;
    display: flex;
    align-items: stretch;
    max-width: calc(100vw - 32px);
    border-radius: 10px;
    background: var(--spt-kal-accent);
    color: var(--spt-kal-accent-text);
    box-shadow: 0 10px 30px rgb(0 0 0 / 0.22);
    animation: spt-kal-in 0.4s ease-out both;
}

.spt-kal-open,
.spt-kal-hide {
    margin: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.spt-kal-open {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 6px 12px 16px;
    text-align: left;
}

.spt-kal-tab-kicker {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.75;
}

.spt-kal-tab-date {
    font-family: var(--font-serif, Georgia, serif);
    font-size: 1.8rem;
    line-height: 1.2;
}

.spt-kal-tab-cta {
    font-size: 1.3rem;
    opacity: 0.85;
}

.spt-kal-open:hover .spt-kal-tab-cta {
    text-decoration: underline;
}

.spt-kal-hide {
    align-self: flex-start;
    padding: 6px 10px;
    font-size: 1.8rem;
    line-height: 1;
    opacity: 0.6;
}

.spt-kal-hide:hover {
    opacity: 1;
}

.spt-kal-open:focus-visible,
.spt-kal-hide:focus-visible,
.spt-kal-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -4px;
    border-radius: 8px;
}

/* Dialogen */
.spt-kal-modal {
    position: fixed;
    inset: 0;
    z-index: 9001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgb(15 10 20 / 0.55);
    animation: spt-kal-fade 0.2s ease-out both;
}

.spt-kal-card {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 40px 36px 28px;
    border-top: 6px solid var(--spt-kal-accent);
    border-radius: 12px;
    background: var(--spt-kal-bg);
    color: var(--spt-kal-text);
    box-shadow: 0 20px 60px rgb(0 0 0 / 0.3);
    animation: spt-kal-in 0.25s ease-out both;
}

.spt-kal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 6px 10px;
    border: 0;
    background: none;
    color: var(--spt-kal-muted);
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
}

.spt-kal-close:hover {
    color: var(--spt-kal-text);
}

.spt-kal-kicker {
    margin: 0 0 6px;
    color: var(--spt-kal-accent);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.spt-kal-heading {
    margin: 0;
    font-family: var(--font-serif, Georgia, serif);
    font-size: 3rem;
    font-weight: 500;
    line-height: 1.15;
}

.spt-kal-name {
    margin: 4px 0 0;
    font-family: var(--font-serif, Georgia, serif);
    font-size: 1.9rem;
    font-style: italic;
    color: var(--spt-kal-muted);
}

.spt-kal-body {
    margin-top: 22px;
    font-family: var(--font-serif, Georgia, serif);
    font-size: 2.1rem;
    line-height: 1.45;
}

.spt-kal-body:empty {
    display: none;
}

.spt-kal-body p,
.spt-kal-prayer p,
.spt-kal-about p {
    margin: 0 0 0.6em;
    white-space: pre-line;
}

.spt-kal-prayer {
    margin-top: 22px;
    padding: 18px 20px 8px;
    border-left: 3px solid var(--spt-kal-accent);
    background: rgb(79 45 99 / 0.06);
    font-family: var(--font-serif, Georgia, serif);
    font-size: 1.7rem;
    line-height: 1.5;
}

.spt-kal-prayer h3 {
    margin: 0 0 10px;
    font-family: var(--font-sans, system-ui, sans-serif);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--spt-kal-accent);
}

.spt-kal-about {
    margin-top: 26px;
    padding-top: 14px;
    border-top: 1px solid var(--spt-kal-line);
    color: var(--spt-kal-muted);
    font-size: 1.45rem;
    line-height: 1.55;
}

.spt-kal-about .spt-kal-author {
    font-style: italic;
}

.spt-kal-about summary {
    margin-bottom: 8px;
    cursor: pointer;
    font-weight: 600;
}

.spt-kal-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--spt-kal-accent);
    font-size: 1.45rem;
    font-weight: 600;
    text-decoration: none;
}

.spt-kal-download::after {
    content: "↓";
    font-weight: 400;
    transition: transform 0.15s ease-out;
}

.spt-kal-download:hover::after {
    transform: translateY(2px);
}

.spt-kal-download:focus-visible {
    outline: 2px solid var(--spt-kal-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

@keyframes spt-kal-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@keyframes spt-kal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .spt-kal-tab,
    .spt-kal-modal,
    .spt-kal-card {
        animation: none;
    }
}

@media (max-width: 600px) {
    .spt-kal-tab {
        right: 16px;
        bottom: 16px;
    }

    .spt-kal-card {
        padding: 36px 22px 22px;
    }

    .spt-kal-heading {
        font-size: 2.5rem;
    }

    .spt-kal-body {
        font-size: 1.9rem;
    }
}
