/* Custom Variables & Theme Tokens */
:root {
    --primary: #2563EB;
    --primary-hover: #1d4ed8;
    --secondary: #14B8A6;
    --bg-light: #F8FAFC;
    --text-dark: #0F172A;
    --text-muted: #475569;
    --border-color: rgba(15, 23, 42, 0.08);
    --card-bg: rgba(255, 255, 255, 0.8);
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Manrope', sans-serif;
    --success: #10b981;
}

/* Base Styles & Typography */
body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-heading {
    font-family: var(--font-heading);
}

/* Linear/Stripe/Apple Inspired Card Styling */
.premium-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 1px 5px rgba(15, 23, 42, 0.03);
    border-color: rgba(37, 99, 235, 0.15);
}

/* Gradients */
.gradient-text-blue-teal {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-bg-soft {
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05) 0%, rgba(20, 184, 166, 0.03) 50%, transparent 100%);
}

.glow-btn {
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.3);
}
.glow-btn:hover {
    box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.45);
}

/* Navigation Links */
.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.925rem;
    transition: color 0.2s ease;
}
.nav-link:hover {
    color: var(--primary);
}

/* Custom Workflow Diagram / Timeline Animation */
@keyframes dash {
    to {
        stroke-dashoffset: -40;
    }
}

.animated-line {
    stroke-dasharray: 8, 4;
    animation: dash 3s linear infinite;
}

/* Horizontal timeline custom bullets */
.timeline-step-badge {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.05);
}

/* Patient Dashboard Mockup UI styling */
.mockup-header {
    background: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid var(--border-color);
}

.timeline-dot {
    position: relative;
}
.timeline-dot::before {
    content: '';
    position: absolute;
    top: 6px;
    left: -19px;
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.timeline-line {
    border-left: 2px solid rgba(15, 23, 42, 0.06);
}

/* Spinner & Progress indicator styles */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-bar-container {
    background: rgba(15, 23, 42, 0.04);
    border-radius: 8px;
    height: 6px;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.4s ease;
}

.loading-indicator {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(15, 23, 42, 0.3);
    border-bottom: 2px solid rgba(15, 23, 42, 0.04);
    padding-bottom: 6px;
    transition: all 0.3s ease;
}

.loading-indicator.active {
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
}

.loading-indicator.done {
    color: var(--success);
    border-color: var(--success);
    font-weight: 600;
}

.btn-copy {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-copy:hover {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.15);
}

/* Form Input Focus Ring */
.form-input {
    border: 1px solid var(--border-color);
    background: #ffffff;
    transition: all 0.2s ease;
}
.form-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Custom animations */
.fade-in-slide {
    animation: fadeInSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Mobile fixes ─────────────────────────────────────────────────────────── */

/* Force nav to exactly viewport width — immune to document-width inflation */
#main-nav {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* On mobile: absolutely pin the Sign In / Sign Up buttons to the right edge,
   exactly 1.5rem (24px) from the viewport right — matching body px-6 padding.
   This is viewport-relative, so chat widget overflow cannot push them off screen. */
@media (max-width: 767px) {
    #main-nav-buttons {
        position: absolute !important;
        right: 1.5rem !important;   /* matches px-6 = 24px */
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
}

/* Prevent the collect.chat launcher iframe/button from overflowing the
   right edge of the screen on narrow viewports.                              */
@media (max-width: 768px) {
    iframe[id^="collectchat"],
    iframe[src*="collectcdn"],
    iframe[src*="collect.chat"] {
        max-width: calc(100vw - 16px) !important;
        right: 8px !important;
        left: auto !important;
    }

    div[id^="collectchat"],
    div[class*="collectchat"] {
        right: 8px !important;
        left: auto !important;
        max-width: calc(100vw - 16px) !important;
    }
}

/* Prevent horizontal overflow at html/body level */
html {
    overflow-x: hidden;
}

