/* Ovuloom Assessment Tools - CSS Framework
 * Modern, premium design for health assessments
 * Consistent with Ovuloom brand identity
 */

/* ===== CSS Variables ===== */
:root {
    /* Brand Colors */
    --primary: #E91E8C;
    --primary-light: #FF6B9D;
    --primary-dark: #C2185B;
    --primary-gradient: linear-gradient(135deg, #FF6B9D, #E91E8C);

    /* Secondary Colors */
    --coral: #FF7F7F;
    --lavender: #E6E0FF;
    --mint: #D4F5E9;
    --peach: #FFE5D9;

    /* Neutral Colors */
    --text-primary: #1A1A2E;
    --text-secondary: #4A4A68;
    --text-muted: #8888A0;
    --background: #FAFBFF;
    --surface: #FFFFFF;
    --border: #E8E8F0;

    /* Semantic Colors */
    --success: #00C853;
    --warning: #FFB300;
    --error: #FF5252;
    --info: #448AFF;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 4px 30px rgba(233, 30, 140, 0.25);

    /* Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    background: var(--background);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== Header ===== */
.assessment-header {
    background: var(--surface);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.assessment-header .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-light);
}

.assessment-header .logo img {
    height: 36px;
}

.assessment-header nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.assessment-header nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.assessment-header nav a:hover {
    color: var(--primary);
}

.btn-pro {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.4rem;
    background: var(--primary-gradient);
    color: white !important;
    border-radius: var(--radius-xl);
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-pro:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ===== Assessment Container ===== */
.assessment-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== Hero Section ===== */
.assessment-hero {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(180deg, var(--lavender) 0%, var(--background) 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.assessment-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.assessment-hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.assessment-hero .meta-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.assessment-hero .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.assessment-hero .meta-item svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary);
}

/* ===== Progress Bar ===== */
.progress-container {
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.progress-bar-wrapper {
    background: var(--border);
    border-radius: var(--radius-xl);
    height: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-xl);
    transition: width var(--transition-slow);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Question Card ===== */
.question-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.4s ease forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-card.exiting {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.question-number {
    display: inline-block;
    background: var(--lavender);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-xl);
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.question-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* ===== Answer Options ===== */
.answer-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.answer-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--background);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.answer-option:hover {
    background: var(--lavender);
    border-color: var(--primary-light);
}

.answer-option.selected {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(233, 30, 140, 0.1));
    border-color: var(--primary);
}

.answer-option input {
    position: absolute;
    opacity: 0;
}

.answer-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.answer-option:hover .answer-radio {
    border-color: var(--primary-light);
}

.answer-option.selected .answer-radio {
    border-color: var(--primary);
    background: var(--primary);
}

.answer-option.selected .answer-radio::before {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.answer-text {
    font-size: 1rem;
    color: var(--text-primary);
}

/* Likert Scale (Horizontal) */
.answer-options.likert {
    flex-direction: row;
    justify-content: space-between;
    gap: 0.5rem;
}

.answer-options.likert .answer-option {
    flex: 1;
    flex-direction: column;
    text-align: center;
    padding: 1rem 0.5rem;
}

.answer-options.likert .answer-radio {
    margin-bottom: 0.5rem;
}

.likert-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== Navigation Buttons ===== */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary {
    background: var(--background);
    color: var(--text-secondary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
}

/* ===== Results Section ===== */
.results-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.results-score {
    margin-bottom: 2rem;
}

.score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-glow);
}

.score-value {
    font-size: 3rem;
    font-weight: 800;
    color: white;
}

.score-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.result-category {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.result-category.low-risk {
    background: var(--mint);
    color: #00695C;
}

.result-category.moderate-risk {
    background: var(--peach);
    color: #E65100;
}

.result-category.high-risk {
    background: #FFCDD2;
    color: #C62828;
}

.result-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 2rem;
}

/* ===== Email Capture ===== */
.email-capture {
    background: linear-gradient(135deg, var(--lavender), #F3E5F5);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
}

.email-capture h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.email-capture p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.email-form {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.email-input {
    width: 100%;
    height: auto;
    max-height: 60px;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color var(--transition-fast);
}

.email-input:focus {
    outline: none;
    border-color: var(--primary);
}

.email-input::placeholder {
    color: var(--text-muted);
}

/* Consent Checkbox Styling */
.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 0.5rem 0;
}

.consent-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    flex-shrink: 0;
    cursor: pointer;
}

.consent-checkbox span {
    flex: 1;
}

.consent-checkbox a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.consent-checkbox a:hover {
    text-decoration: underline;
}

.email-form .btn-primary {
    width: 100%;
    height: auto;
    max-height: 60px;
    padding: 1rem 2rem;
    box-sizing: border-box;
}

/* ===== PRO Locked Content ===== */
.pro-locked {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
}

.pro-locked-content {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

.pro-locked-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.pro-locked-overlay .lock-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-glow);
}

.pro-locked-overlay .lock-icon svg {
    width: 28px;
    height: 28px;
    stroke: white;
}

.pro-locked-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.pro-locked-overlay p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 400px;
}

.pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--primary-gradient);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* ===== Domain Breakdown ===== */
.domain-breakdown {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
}

.domain-breakdown h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.domain-item {
    margin-bottom: 1.5rem;
}

.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.domain-name {
    font-weight: 600;
    color: var(--text-primary);
}

.domain-score {
    font-weight: 700;
    color: var(--primary);
}

.domain-bar {
    height: 10px;
    background: var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.domain-bar-fill {
    height: 100%;
    border-radius: var(--radius-xl);
    transition: width var(--transition-slow);
}

.domain-bar-fill.low {
    background: var(--success);
}

.domain-bar-fill.moderate {
    background: var(--warning);
}

.domain-bar-fill.high {
    background: var(--error);
}

/* ===== Recommendations ===== */
.recommendations {
    background: var(--mint);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
}

.recommendations h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.recommendation-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
}

.recommendation-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.recommendation-icon svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

.recommendation-text {
    color: var(--text-primary);
    line-height: 1.5;
}

/* ===== Disclaimer ===== */
.disclaimer {
    background: #E3F2FD;
    border-left: 4px solid #1976D2;
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    margin: 2rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.disclaimer strong {
    color: #1565C0;
}

.disclaimer.wellness {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border-left-color: #4CAF50;
}

.disclaimer.wellness strong {
    color: #2E7D32;
}

/* Wellness Badge */
.wellness-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    color: #1565C0;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.wellness-banner {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    border-left: 4px solid #1976D2;
}

.wellness-banner p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.wellness-banner strong {
    color: #1565C0;
}

/* ===== Assessment Cards (Hub Page) ===== */
.assessment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.assessment-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    text-decoration: none;
    color: inherit;
    display: block;
}

.assessment-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.assessment-card-icon {
    width: 56px;
    height: 56px;
    background: var(--lavender);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.assessment-card-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--primary);
}

.assessment-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.assessment-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.assessment-card-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.assessment-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ===== Footer ===== */
.assessment-footer {
    background: #1A1A2E;
    color: white;
    padding: 3rem 2rem;
    margin-top: 4rem;
    text-align: center;
}

.assessment-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin: 0 1rem;
    transition: color var(--transition-fast);
}

.assessment-footer a:hover {
    color: white;
}

.footer-links {
    margin-top: 1rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .assessment-header {
        flex-direction: column;
        gap: 1rem;
    }

    .assessment-hero h1 {
        font-size: 2rem;
    }

    .question-text {
        font-size: 1.2rem;
    }

    .answer-options.likert {
        flex-wrap: wrap;
    }

    .answer-options.likert .answer-option {
        flex: 0 0 calc(33.33% - 0.5rem);
    }

    /* Removed - now applied globally above */

    .navigation-buttons {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
    }

    .assessment-hero .meta-info {
        gap: 1rem;
    }

    .score-circle {
        width: 130px;
        height: 130px;
    }

    .score-value {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .assessment-container {
        padding: 1rem;
    }

    .question-card {
        padding: 1.5rem;
    }

    .answer-options.likert .answer-option {
        flex: 0 0 calc(50% - 0.5rem);
    }
}

/* ===== Loading States ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== Animations ===== */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ===== Tabbed Interface ===== */
.tabs-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.tab-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: rgba(233, 30, 140, 0.05);
}

.tab-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(233, 30, 140, 0.3);
}

.tab-content {
    display: none;
    animation: fadeUp 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

/* Featured Card Highlights */
.assessment-card.featured {
    border: 2px solid var(--primary-light);
    background: linear-gradient(135deg, white, #FFF0F5);
    position: relative;
    overflow: hidden;
}

.assessment-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}