/* Fælles portal-navigation */
.portal-nav {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto 1rem;
    padding: 0.5rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.portal-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    min-height: 44px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--primary-color, #2c3e50);
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.portal-nav a:hover {
    border-color: var(--secondary-color, #3498db);
    background: #f8fafc;
    transform: translateY(-1px);
}

.portal-nav a.portal-nav-home {
    background: linear-gradient(135deg, var(--secondary-color, #3498db), var(--primary-color, #2c3e50));
    color: #fff;
    border: none;
}

.portal-nav a.portal-nav-home:hover {
    background: linear-gradient(135deg, #2980b9, #1a252f);
    color: #fff;
}

/* Sticky navigation på mobil */
@media (max-width: 768px) {
    .portal-nav.portal-nav-sticky {
        position: sticky;
        top: 0;
        z-index: 100;
        margin: 0;
        padding: 0.5rem 0.75rem;
        padding-top: max(0.5rem, env(safe-area-inset-top));
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .portal-nav.portal-nav-sticky a {
        font-size: 0.95rem;
        padding: 0.6rem 1rem;
        min-height: 48px;
    }
}

/* Horisontal scroll til tabeller på små skærme */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    border-radius: var(--border-radius, 8px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.table-scroll table {
    min-width: 520px;
}

/* iOS: undgå auto-zoom ved fokus (16px minimum) */
@media (max-width: 768px) {
    input,
    select,
    textarea,
    .btn,
    .chip,
    .tab {
        font-size: 16px !important;
    }
}

/* Safe area til footer/indhold i bunden */
body {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Træningsprogram: én tempo-oversigt */
.pace-overview-intro {
    margin: 0 0 1rem;
    color: #555;
    font-size: 0.95rem;
}

.pace-overview-intro a {
    color: var(--secondary-color, #3498db);
    font-weight: 600;
}

.pace-overview-table {
    width: 100%;
    max-width: 520px;
    margin: 0 auto 1.5rem;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--border-radius, 8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.pace-overview-caption {
    caption-side: top;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 1rem;
    text-align: left;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.pace-overview-table thead th {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
    background: #f1f3f5;
    text-align: left;
}

.pace-overview-table tbody th {
    padding: 0.65rem 1rem;
    font-weight: 600;
    color: var(--primary-color, #2c3e50);
    text-align: left;
    vertical-align: middle;
    border-top: 1px solid #eee;
}

.pace-overview-table tbody td {
    padding: 0.65rem 1rem;
    font-weight: 700;
    font-size: 1.05rem;
    text-align: right;
    border-top: 1px solid #eee;
    white-space: nowrap;
}

.pace-overview-row--goal th,
.pace-overview-row--goal td {
    background: #eef9f0;
}

.pace-overview-row--program th,
.pace-overview-row--program td {
    background: #fff8f0;
}

.pace-overview-badge {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: #888;
    text-transform: none;
    letter-spacing: 0;
}

.zone-guide-note {
    margin: 0 0 1.5rem;
    padding: 0.85rem 1rem;
    background: #f0f7ff;
    border-left: 4px solid var(--secondary-color, #3498db);
    border-radius: var(--border-radius, 8px);
    font-size: 0.95rem;
    color: #444;
    line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
