/* ==========================================================================
   RENIVO UI COMPONENTS — toggle, bottom sheet, trust, readability
   ========================================================================== */

/* — Readability: darker muted text on light surfaces — */
body,
.surface-readable {
    color: var(--text-main);
}

.surface-readable .text-muted,
.section-sub,
.step-desc,
.highlight-card p,
.value-card p,
.how-card p,
.portal-empty p,
.empty-state p {
    color: var(--readable-muted, #5C5969);
}

/* — Typography scale (applied globally) — */
.section-title { font-size: var(--text-h2); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.step-title, .editorial-layout h1 { font-size: var(--text-h3); font-weight: 800; letter-spacing: -0.02em; }
body, p, .step-desc, .section-sub { font-size: var(--text-body); line-height: var(--leading-body); }
small, .text-small { font-size: var(--text-small); }

/* — Layout shell — */
.layout-container {
    width: min(var(--layout-max), calc(100% - 48px));
    margin-inline: auto;
}

.section-pad {
    padding-top: var(--section-pad-y);
    padding-bottom: var(--section-pad-y);
}

@media (min-width: 900px) {
    .section-pad {
        padding-top: var(--section-pad-y-lg);
        padding-bottom: var(--section-pad-y-lg);
    }
}

/* — Service highlight cards — */
.highlight-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    border-radius: var(--radius-card);
    border: 1px solid var(--border-soft);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.highlight-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.service-card-icon {
    position: absolute;
    top: 140px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--pink-base);
    font-size: 24px;
    line-height: 1;
    border: 3px solid #fff;
    box-shadow: var(--shadow-soft);
}

.service-card-icon img {
    width: 28px;
    height: 28px;
    display: block;
}

.highlight-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    padding: 12px 16px 6px;
    color: var(--text-main);
}

.highlight-price {
    display: inline-flex;
    margin: 8px 16px 20px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--gradient-secondary);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(255, 95, 162, 0.22);
}

/* — Toggle pills (frequency etc.) — */
.toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.toggle-pill {
    flex: 1 1 auto;
    min-height: 48px;
    min-width: 120px;
    padding: 10px 14px;
    border-radius: var(--radius-control);
    border: 1px solid var(--border-soft);
    background: #fff;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.2s ease, background 0.2s ease;
}

.toggle-pill:hover {
    border-color: rgba(255, 95, 162, 0.35);
    background: var(--pink-base);
}

.toggle-pill.active {
    border-color: transparent;
    background: var(--gradient-secondary);
    color: #fff;
    box-shadow: 0 12px 28px rgba(255, 95, 162, 0.25);
    transform: scale(1.03);
}

.toggle-pill:active {
    transform: scale(0.97);
}

/* — Bottom sheet (mobile nav) — */
@media (max-width: 991px) {
    .mobile-drawer-panel {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        max-height: min(88vh, 640px);
        border-radius: var(--radius-card) var(--radius-card) 0 0;
        transform: translateY(100%);
        box-shadow: var(--shadow-floating);
    }

    .mobile-drawer.open .mobile-drawer-panel {
        transform: translateY(0);
    }

    .mobile-drawer-head::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        margin: 0 auto 16px;
        border-radius: 999px;
        background: var(--border-soft);
    }
}

/* — Trust badges — */
.trust-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 24px;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border-soft);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    box-shadow: var(--shadow-soft);
}

.trust-badge::before {
    content: '✓';
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(85, 229, 164, 0.2);
    color: #08724E;
    font-size: 12px;
    font-weight: 800;
}

.worker-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(85, 229, 164, 0.15);
    color: #08724E;
    font-size: 12px;
    font-weight: 800;
    margin-top: 8px;
}

/* — Before / after — */
.before-after-section {
    background: linear-gradient(180deg, #fff 0%, var(--surface-muted) 100%);
}

.before-after-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--card-gap);
}

@media (min-width: 768px) {
    .before-after-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.before-after-card {
    border-radius: var(--radius-card);
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.before-after-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.before-after-card figcaption {
    padding: 16px 18px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.before-after-card .ba-label {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ba-before .ba-label { background: var(--surface-muted); color: var(--readable-muted); }
.ba-after .ba-label { background: rgba(85, 229, 164, 0.2); color: #08724E; }

/* — Wizard micro-step (one panel visible) — */
.wizard-step-content[hidden] {
    display: none !important;
}

.progress-tracker-4 .progress-dot {
    width: 36px;
    height: 36px;
    font-size: 13px;
}

/* — Footer: brand-soft (not enterprise dark) — */
footer.site-footer-premium {
    background: linear-gradient(180deg, #FFF7FB 0%, #F4F1FF 48%, var(--bg-canvas) 100%);
    color: var(--text-main);
    border-top: 1px solid var(--border-soft);
}

footer.site-footer-premium .footer-column h4 {
    color: var(--accent-primary-hover);
}

footer.site-footer-premium .footer-column ul li a {
    color: var(--readable-muted);
    opacity: 1;
}

footer.site-footer-premium .footer-column ul li a:hover {
    color: var(--accent-primary-hover);
}

footer.site-footer-premium .footer-legal {
    color: var(--readable-muted);
}

/* — Onboarding overlay — */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    background: rgba(22, 20, 29, 0.45);
    backdrop-filter: blur(8px);
}

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

.onboarding-card {
    width: min(480px, 100%);
    padding: 28px 24px 24px;
    border-radius: var(--radius-modal);
    background: #fff;
    box-shadow: var(--shadow-floating);
    text-align: center;
}

.onboarding-card .renivo-mascot {
    margin: 0 auto 16px;
}

.onboarding-card h2 {
    font-size: var(--text-h3);
    font-weight: 800;
    margin-bottom: 8px;
}

.onboarding-card p {
    color: var(--readable-muted);
    margin-bottom: 20px;
}

/* — Portal empty → design system — */
.portal-empty.empty-state,
.portal-loading.empty-state {
    padding: 48px 28px;
}

.portal-loading.empty-state .skeleton-card {
    margin-bottom: 16px;
}

/* — Subpages: consistent shell — */
.page-view-premium .editorial-layout,
.page-view-premium .auth-page,
.page-view-premium #bedrift-page-content {
    max-width: var(--layout-max);
    margin-inline: auto;
    padding-inline: 24px;
}

.page-view-premium .auth-page {
    padding-block: var(--section-pad-y-lg, 120px) 80px;
}

.page-view-premium .hero-content h1 {
    font-size: var(--text-h1);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-view-premium .auth-lead,
.page-view-premium .faq-answer,
.page-view-premium .testimonial-role,
.page-view-premium .crm-muted {
    color: var(--readable-muted);
}

/* — Typography scale (fixed targets) — */
h1, .hero-content h1 { font-size: var(--text-h1); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2, .section-title { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); font-weight: 800; }

.progress-labels-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: 24px;
}

.progress-labels-4 .progress-label {
    font-size: 11px;
    text-align: center;
}

.visually-hidden-select {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* — Readability: avoid washed-out copy — */
.faq-answer,
.guarantee-inline,
.footer-meta-bar p {
    margin: 0;
}

@media (max-width: 720px) {
    .footer-bottom-brand {
        padding-top: 22px;
    }
}

.testimonial-role,
.smart-help-inner p,
.auth-lead,
.portal-sidebar p,
.dashboard-section p,
.crm-muted {
    color: var(--readable-muted) !important;
}

.home-trust-strip span {
    color: var(--text-main);
    font-weight: 600;
}

.empty-state-illus {
    font-size: 40px;
    margin-bottom: 12px;
    line-height: 1;
}

.empty-state-illus-img {
    display: block;
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
}

.empty-state h4 {
    font-size: var(--text-h3);
    margin-bottom: 8px;
    color: var(--text-main);
}
