/* ─────────────────────────────────────────────────────────────
   1. TOKENS & VARIABLER FÖR DOKUMENTVYER
───────────────────────────────────────────────────────────── */
:root {
    --bg-1: #ffffff;
    --bg-2: #f3f4f6;
    --bg-3: #e5e7eb;

    --ink-1: #111827;
    --ink-2: #374151;
    --ink-3: #6b7280;

    --f-main: 'Roboto', system-ui, sans-serif;
    --f-display: 'Roboto', system-ui, sans-serif;
    --f-mono: 'ui-monospace', 'SFMono-Regular', 'Menlo', 'Monaco', monospace;

    --doc-nav-h: 64px;
}

/* ─────────────────────────────────────────────────────────────
   2. UNIKA CONTAINERS FÖR DOKUMENTVYER (Ersätter .wrap)
───────────────────────────────────────────────────────────── */
.doc-wrap {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 24px;
}

.doc-mono {
    font-family: var(--f-mono);
    background-color: #e5e7eb;
    color: #374151;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

/* ─────────────────────────────────────────────────────────────
   3. NAVIGATION (Ersätter .nav-outer)
───────────────────────────────────────────────────────────── */
.doc-nav-outer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--doc-nav-h);
    background: var(--bg-1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 100;
    display: flex;
    align-items: center;
}

.doc-nav {
    display: flex;
    align-items: center;
    height: 100%;
}

.doc-nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--ink-1);
    font-weight: 600;
    font-size: 1.1rem;
}

.doc-nav-logo:hover {
    opacity: 0.8;
}

/* ─────────────────────────────────────────────────────────────
   4. KNAPPAR (Ersätter .btn för att inte ändra startsidans runda knappar)
───────────────────────────────────────────────────────────── */
.doc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: var(--f-main);
}

.doc-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.doc-btn-ghost {
    background-color: transparent;
    color: #4b5563;
    border-color: transparent;
}

.doc-btn-ghost:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.doc-btn-green {
    background-color: #10b981;
    color: #ffffff;
}

.doc-btn-green:hover {
    background-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.doc-btn-blue {
    background-color: #3b82f6;
    color: #ffffff;
}

.doc-btn-blue:hover {
    background-color: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* ─────────────────────────────────────────────────────────────
   5. PDF VIEWER & ANIMATIONER
───────────────────────────────────────────────────────────── */
iframe {
    display: block;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.tracking-group:focus-within {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ─────────────────────────────────────────────────────────────
   6. MODAL COMPONENTS (sp-modal)
───────────────────────────────────────────────────────────── */
.sp-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sp-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.sp-modal-box {
    background-color: var(--bg-1);
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 32px 24px;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.sp-modal-overlay.visible .sp-modal-box {
    transform: scale(1) translateY(0);
}

.sp-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
    background-color: var(--bg-2);
}

.sp-modal-icon .material-symbols-rounded {
    font-size: 32px;
}

.sp-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink-1);
    margin: 0;
    line-height: 1.2;
}

.sp-modal-msg {
    font-size: 1rem;
    color: var(--ink-2);
    line-height: 1.5;
    margin: 0;
}

.sp-modal-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    width: 100%;
    margin-top: 8px;
}

.sp-modal-actions .doc-btn {
    width: 100%;
    margin: 0;
    padding-block: 14px;
    font-size: 1rem;
    border-radius: 10px;
    justify-content: center;
}

.sp-modal-btn-cancel {
    background-color: transparent;
    color: var(--ink-3);
}

.sp-modal-btn-cancel:hover {
    background-color: var(--bg-2);
}