/* =============================================================================
   WALIIN ROUTING SCREEN — Split-Panel Design
   =============================================================================
   Redesigned to match the provided mockup: 
   - Split-panel: Social (purple/left) + Learn (green/right)
   - Top "Social | Learn" tab toggle pill
   - Feature lists with emoji icons
   - CTA speech bubbles with close buttons
   - Floating emojis & geometric SVG backgrounds
   - Mobile: stacks vertically, tab toggles views
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body.routing-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background: #f0f0ff;
}

/* ── Top Navigation Pill ──────────────────────────────────────────────────── */
.rt-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 24px;
    z-index: 100;
}

.rt-tab-pill {
    display: flex;
    background: #1e1e3f;
    border-radius: 20px;
    padding: 4px;
    gap: 2px;
}

.rt-tab-pill__btn {
    padding: 8px 24px;
    border: none;
    border-radius: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: rgba(255,255,255,0.5);
}

.rt-tab-pill__btn.active {
    color: #fff;
}

.rt-tab-pill__btn[data-tab="social"].active {
    background: #4a4de7;
}

.rt-tab-pill__btn[data-tab="learn"].active {
    background: #0d9668;
}

/* Device toggle (top right) */
.rt-device-toggle {
    position: fixed;
    top: 16px;
    right: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1e1e3f;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 8px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.rt-device-toggle:hover {
    background: #2a2a5a;
}

/* ── Main Split Layout ────────────────────────────────────────────────────── */
.rt-split {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.rt-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px 60px;
    position: relative;
    overflow: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.rt-panel--social {
    background: #f0f0ff;
}

.rt-panel--learn {
    background: #ecfdf5;
    border-left: 1px solid rgba(13,150,104,0.1);
}

/* ── OR Divider ───────────────────────────────────────────────────────────── */
.rt-or-divider {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1e1e3f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* ── Panel Content ────────────────────────────────────────────────────────── */
.rt-panel__icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.rt-panel--social .rt-panel__icon {
    background: #4a4de7;
}

.rt-panel--learn .rt-panel__icon {
    background: #0d9668;
}

.rt-panel__title {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.rt-panel--social .rt-panel__title {
    color: #1e1e3f;
}

.rt-panel--learn .rt-panel__title {
    color: #064e3b;
}

.rt-panel__subtitle {
    font-size: 15px;
    max-width: 340px;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 32px;
}

.rt-panel--social .rt-panel__subtitle {
    color: #6366a0;
}

.rt-panel--learn .rt-panel__subtitle {
    color: #047857;
}

/* ── Feature List ─────────────────────────────────────────────────────────── */
.rt-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 380px;
    margin-bottom: 28px;
}

.rt-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.rt-feature:hover {
    transform: translateX(4px);
}

.rt-panel--social .rt-feature {
    background: #fff;
    border: 1px solid #e0e0f0;
    color: #1e1e3f;
}

.rt-panel--social .rt-feature:hover {
    box-shadow: 0 4px 16px rgba(74,77,231,0.1);
}

.rt-panel--learn .rt-feature {
    background: #fff;
    border: 1px solid #d1fae5;
    color: #064e3b;
}

.rt-panel--learn .rt-feature:hover {
    box-shadow: 0 4px 16px rgba(13,150,104,0.1);
}

.rt-feature__emoji {
    font-size: 22px;
    flex-shrink: 0;
}

/* ── CTA Buttons ──────────────────────────────────────────────────────────── */
.rt-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #fff;
}

.rt-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.rt-panel--social .rt-cta-btn {
    background: #4a4de7;
}

.rt-panel--learn .rt-cta-btn {
    background: #0d9668;
}

.rt-cta-btn__arrow {
    transition: transform 0.3s ease;
}

.rt-cta-btn:hover .rt-cta-btn__arrow {
    transform: translateX(4px);
}

/* ── Speech Bubble (CTA callout) ──────────────────────────────────────────── */
.rt-bubble {
    position: absolute;
    bottom: 40px;
    padding: 14px 20px;
    border-radius: 16px;
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    max-width: 280px;
    animation: rtBubbleBounce 3s ease-in-out infinite;
}

.rt-bubble::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
}

.rt-bubble--social {
    left: 10%;
    background: #4a4de7;
}

.rt-bubble--social::before {
    border-bottom: 8px solid #4a4de7;
}

.rt-bubble--learn {
    right: 10%;
    left: auto;
    background: #0d9668;
}

.rt-bubble--learn::before {
    border-bottom: 8px solid #0d9668;
}

.rt-bubble__title {
    font-weight: 700;
    margin-bottom: 2px;
}

.rt-bubble__close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.rt-bubble__close:hover {
    color: #fff;
}

.rt-bubble__arrow-down {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    animation: rtArrowBob 1.5s ease-in-out infinite;
}

@keyframes rtArrowBob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

@keyframes rtBubbleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ── Floating Emojis ──────────────────────────────────────────────────────── */
.rt-emoji {
    position: absolute;
    font-size: 28px;
    animation: rtEmojiFloat 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes rtEmojiFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-12px) rotate(5deg); }
    75% { transform: translateY(-8px) rotate(-3deg); }
}

/* ── Geometric SVG Decorations ────────────────────────────────────────────── */
.rt-geo {
    position: absolute;
    pointer-events: none;
    z-index: 5;
}

.rt-geo svg {
    width: 100%;
    height: 100%;
}

.rt-geo--circle {
    width: 80px;
    height: 80px;
    top: 40px;
    left: 20px;
}

.rt-geo--square {
    width: 60px;
    height: 60px;
    top: 50px;
    right: 30px;
}

.rt-geo--triangle {
    width: 60px;
    height: 60px;
    bottom: 120px;
    left: 40px;
}

.rt-geo--wave {
    width: 100px;
    height: 60px;
    bottom: 160px;
    right: 50px;
}

/* Rotate animation for shapes */
.rt-geo--circle svg {
    animation: rtGeoRotate 20s linear infinite;
}

.rt-geo--square svg {
    animation: rtGeoRotate 25s linear infinite reverse;
}

.rt-geo--triangle svg {
    animation: rtGeoPulse 3s ease-in-out infinite;
}

@keyframes rtGeoRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rtGeoPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

/* ── Page Transition ──────────────────────────────────────────────────────── */
.rt-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.rt-transition.active {
    opacity: 1;
    pointer-events: all;
}

.rt-transition--social {
    background: linear-gradient(135deg, #4a4de7 0%, #1e1e3f 100%);
}

.rt-transition--learn {
    background: linear-gradient(135deg, #0d9668 0%, #064e3b 100%);
}

/* ── Mobile Responsive ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .rt-split {
        flex-direction: column;
    }

    .rt-or-divider {
        display: none;
    }

    .rt-panel {
        padding: 100px 24px 60px;
        min-height: 100vh;
    }

    /* Only show active tab panel on mobile */
    .rt-panel.rt-hidden {
        display: none;
    }

    .rt-device-toggle {
        display: none;
    }

    .rt-bubble {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
        bottom: 24px;
    }

    .rt-geo--circle {
        width: 50px;
        height: 50px;
    }

    .rt-geo--square {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .rt-panel__title {
        font-size: 26px;
    }

    .rt-panel__subtitle {
        font-size: 14px;
    }

    .rt-tab-pill__btn {
        padding: 7px 18px;
        font-size: 13px;
    }

    .rt-cta-btn {
        padding: 14px 32px;
        font-size: 15px;
        width: 100%;
        justify-content: center;
    }

    .rt-features {
        max-width: 100%;
    }
}
