/* ═══════════════════════════════════════════════════════════════
   HEALTHION ROLE SELECTION — PREMIUM ONBOARDING
   Design: Apple Health + Stripe + Notion Hybrid
   Theme: Luxury Healthcare + AI Assistant
═══════════════════════════════════════════════════════════════ */

:root {
    --rs-teal: #0FA3A3;
    --rs-teal-light: #12BFBF;
    --rs-teal-dark: #0B8585;
    --rs-teal-glow: rgba(15, 163, 163, 0.15);
    --rs-neon-grad: linear-gradient(135deg, #0FA3A3, #8B5CF6, #EC4899);
    --rs-white: #FFFFFF;
    --rs-bg: #F8FAFB;
    --rs-text: #1A1A1A;
    --rs-text-sec: #5A7A82;
    --rs-text-muted: #8FABB3;
    --rs-glass: rgba(255, 255, 255, 0.85);
    --rs-border: rgba(15, 163, 163, 0.12);
    --rs-radius: 24px;
    --rs-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    --rs-shadow-active: 0 20px 40px rgba(15, 163, 163, 0.12);
    --rs-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background-color: var(--rs-bg);
    color: var(--rs-text);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    padding-bottom: 120px; /* Space for sticky CTA */
}

/* ── HEADER & NAV ── */
.rs-nav {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 100;
}

.rs-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--rs-glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    text-decoration: none;
    color: var(--rs-text-sec);
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--rs-shadow);
    transition: all 0.3s var(--rs-ease);
}

.rs-back-btn:active { transform: scale(0.95); }

/* ── CENTERED LOGO ── */
.rs-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0 8px;
}

.rs-logo {
    width: 140px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px var(--rs-teal-glow));
}

.rs-header-blur {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(15, 163, 163, 0.15) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
    animation: rs-float-bg 10s ease-in-out infinite;
}

@keyframes rs-float-bg {
    0%, 100% { transform: translate(-50%, 0) scale(1); }
    50% { transform: translate(-40%, 20px) scale(1.1); }
}

/* ── HERO ── */
.rs-hero {
    text-align: center;
    padding: 40px 24px 20px;
    position: relative;
    z-index: 1;
}

.rs-hero h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    background: linear-gradient(to bottom, #1A1A1A, #4A4A4A);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.rs-hero p {
    font-size: 16px;
    color: var(--rs-text-sec);
    line-height: 1.5;
}

.rs-ai-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 10px 18px;
    background: rgba(15, 163, 163, 0.08);
    border-radius: 50px;
    border: 1px solid rgba(15, 163, 163, 0.1);
}

.rs-ai-icon {
    width: 14px;
    height: 14px;
    background: var(--rs-teal);
    border-radius: 50%;
    position: relative;
}

.rs-ai-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid var(--rs-teal);
    border-radius: 50%;
    opacity: 0.4;
    animation: rs-pulse 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes rs-pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(2); opacity: 0; }
}

.rs-ai-hint span {
    font-size: 13px;
    font-weight: 500;
    color: var(--rs-teal-dark);
}

/* ── CARDS ── */
.rs-container {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rs-card {
    background: var(--rs-glass);
    backdrop-filter: blur(12px);
    border-radius: var(--rs-radius);
    padding: 24px;
    border: 1px solid var(--rs-border);
    box-shadow: var(--rs-shadow);
    transition: all 0.5s var(--rs-ease);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.rs-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--rs-neon-grad);
    opacity: 0;
    z-index: 0;
    transition: opacity 0.5s var(--rs-ease);
}

.rs-card.active {
    transform: scale(1.02) translateY(-4px);
    border-color: transparent;
    box-shadow: var(--rs-shadow-active);
}

.rs-card.active::before {
    opacity: 0.04;
}

.rs-card.inactive {
    opacity: 0.6;
    transform: scale(0.98);
}

.rs-card-content {
    position: relative;
    z-index: 1;
}

.rs-role-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 0;
    transition: margin 0.5s var(--rs-ease);
}

.rs-card.active .rs-role-header {
    margin-bottom: 20px;
}

.rs-role-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: var(--rs-white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(15, 163, 163, 0.1);
    transition: all 0.5s var(--rs-ease);
    position: relative;
}

.rs-role-icon-box i {
    font-size: 24px;
    color: var(--rs-teal);
    transition: all 0.5s var(--rs-ease);
}

.rs-card.active .rs-role-icon-box {
    background: var(--rs-teal);
    transform: rotate(-5deg);
    box-shadow: 0 8px 25px rgba(15, 163, 163, 0.3);
}

.rs-card.active .rs-role-icon-box i {
    color: var(--rs-white);
    transform: scale(1.1);
}

.rs-role-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.rs-role-info p {
    font-size: 14px;
    color: var(--rs-text-sec);
}

/* ── EXPANDABLE SECTION ── */
.rs-expandable {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.5s var(--rs-ease);
}

.rs-card.active .rs-expandable {
    max-height: 400px;
    opacity: 1;
}

.rs-req-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--rs-text-muted);
    margin-bottom: 16px;
    display: block;
}

.rs-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rs-checklist li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--rs-text-sec);
    transform: translateX(10px);
    opacity: 0;
    transition: all 0.4s var(--rs-ease);
}

.rs-card.active .rs-checklist li {
    transform: translateX(0);
    opacity: 1;
}

.rs-card.active .rs-checklist li:nth-child(1) { transition-delay: 0.1s; }
.rs-card.active .rs-checklist li:nth-child(2) { transition-delay: 0.2s; }
.rs-card.active .rs-checklist li:nth-child(3) { transition-delay: 0.3s; }
.rs-card.active .rs-checklist li:nth-child(4) { transition-delay: 0.4s; }

.rs-check-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* ── STICKY BOTTOM CTA ── */
.rs-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px 24px 40px;
    background: linear-gradient(to top, var(--rs-bg) 80%, transparent);
    z-index: 100;
    transform: translateY(100%);
    transition: transform 0.5s var(--rs-ease);
}

.rs-cta-bar.show {
    transform: translateY(0);
}

.rs-cta-btn {
    width: 100%;
    padding: 18px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #0FA3A3 0%, #0B8585 100%);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    box-shadow: 0 10px 30px rgba(15, 163, 163, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s var(--rs-ease);
}

.rs-cta-btn:active {
    transform: scale(0.97);
}

.rs-cta-btn i {
    font-size: 14px;
    transition: transform 0.3s var(--rs-ease);
}

.rs-cta-btn:hover i {
    transform: translateX(4px);
}

/* ── PRELOADER / SKELETON ── */
.rs-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    background-size: 200% 100%;
    animation: rs-shimmer 2s infinite;
}

@keyframes rs-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── RESPONSIVE ── */
@media (min-width: 481px) {
    body {
        display: flex;
        justify-content: center;
    }
    .main-wrapper {
        max-width: 480px;
        width: 100%;
    }
    .rs-cta-bar {
        max-width: 480px;
        left: 50%;
        transform: translate(-50%, 100%);
    }
    .rs-cta-bar.show {
        transform: translate(-50%, 0);
    }
}
