/**
 * Rosetta Wellness - Questionnaire Styles
 * Inspired by Bath & Body Works aesthetic
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Color Palette */
    --background-cream: #FFF8F0;
    --primary-dark: #581c87;
    --primary-medium: #7c3aed;
    --accent-light: #C4B5FD;
    --accent-gold: #D97706;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --white: #ffffff;
    --success-green: #10b981;
    --error-red: #ef4444;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(88, 28, 135, 0.15);
    --shadow-lg: 0 8px 24px rgba(88, 28, 135, 0.2);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--background-cream);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: linear-gradient(135deg, #581c87 0%, #7c3aed 100%);
    padding: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(88, 28, 135, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.site-name {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: white;
    margin: 0;
    font-weight: 600;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* ============================================
   SCREEN MANAGEMENT
   ============================================ */
.screen {
    display: none;
    animation: fadeIn var(--transition-medium);
}

.screen.active {
    display: block;
}

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

/* ============================================
   WELCOME/LANDING PAGE
   ============================================ */
.welcome-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.welcome-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.welcome-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

/* Value Proposition Box */
.value-box {
    background: linear-gradient(135deg, #f3e8ff 0%, #fdf4ff 100%);
    border: 2px solid var(--accent-light);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.value-heading {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    text-align: center;
}

.value-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.value-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.value-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    font-weight: bold;
    font-size: 1.3rem;
}

.value-list li strong {
    color: var(--primary-dark);
}

/* How It Works Section */
.how-it-works {
    margin: 3rem 0;
}

.section-subtitle {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 2rem;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-dark);
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 12px rgba(88, 28, 135, 0.3);
}

.step-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.step-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Trust Badges */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--accent-light);
    border-bottom: 1px solid var(--accent-light);
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.badge-icon {
    font-size: 2rem;
}

.badge-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Embedded Question */
.embedded-question {
    margin: 2rem 0;
}

.embedded-q-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 1.5rem;
}

.question-box {
    background: white;
    border: 2px solid var(--accent-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.question-text {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.question-helper {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary,
.btn-secondary {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-medium);
    text-align: center;
    display: inline-block;
}

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

.btn-primary:hover {
    background: var(--primary-medium);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.3);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

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

.btn-secondary:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-large {
    font-size: 1.2rem;
    padding: 1rem 2.5rem;
    margin: 2rem auto;
    display: block;
    min-width: 300px;
}

/* ============================================
   DISCLAIMER BOX
   ============================================ */
.disclaimer-box {
    background: #fff7ed;
    border: 2px solid #fed7aa;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.disclaimer-text {
    font-size: 0.95rem;
    color: #92400e;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.disclaimer-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.disclaimer-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.disclaimer-checkbox span {
    font-weight: 600;
    color: #92400e;
}

/* Privacy Note */
.privacy-note {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    font-style: italic;
}

/* ============================================
   QUESTIONNAIRE SCREEN
   ============================================ */

/* Progress Header */
.progress-header {
    margin-bottom: 2rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.section-name,
.question-counter {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 50px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-light) 0%, var(--primary-dark) 100%);
    border-radius: 50px;
    transition: width var(--transition-medium);
}

/* Question Card */
.question-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

/* Answer Types */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--background-cream);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.radio-label:hover,
.checkbox-label:hover {
    border-color: var(--accent-light);
    background: #fdf4ff;
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    cursor: pointer;
    accent-color: var(--primary-dark);
}

.radio-label span,
.checkbox-label span {
    font-size: 1rem;
    color: var(--text-primary);
}

/* Scale Input */
.scale-container {
    margin: 2rem 0;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.scale-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 100px;
}

.scale-input {
    width: 100%;
    height: 8px;
    border-radius: 50px;
    background: linear-gradient(90deg, var(--accent-light) 0%, var(--primary-dark) 100%);
    outline: none;
    -webkit-appearance: none;
}

.scale-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-dark);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.scale-input::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-dark);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
}

.scale-value {
    text-align: center;
    margin-top: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-dark);
}

/* Textarea */
textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    resize: vertical;
    transition: border-color var(--transition-fast);
}

textarea:focus {
    outline: none;
    border-color: var(--accent-light);
}

/* Button Group */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: space-between;
}

.button-group .btn-secondary,
.button-group .btn-primary {
    flex: 1;
}

/* ============================================
   LOADING SCREEN
   ============================================ */
.loading-container {
    text-align: center;
    padding: 3rem 1rem;
}

.loading-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.loading-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 2rem;
}

/* Spinner */
.loading-spinner {
    margin: 2rem auto;
}

.spinner {
    animation: rotate 2s linear infinite;
    width: 80px;
    height: 80px;
}

.spinner .path {
    stroke: var(--primary-dark);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Countdown */
.countdown-container {
    margin: 2rem 0;
}

.countdown-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--primary-dark);
    font-weight: bold;
}

.countdown-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Loading Message */
.loading-message {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 2rem 0;
    min-height: 60px;
    animation: fadeMessage var(--transition-medium);
}

@keyframes fadeMessage {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Loading Progress Bar */
.loading-progress-container {
    max-width: 400px;
    margin: 2rem auto;
    height: 6px;
    background: #e5e7eb;
    border-radius: 50px;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-light) 0%, var(--primary-dark) 100%);
    border-radius: 50px;
    transition: width 0.5s ease;
}

/* ============================================
   RESULTS SCREEN
   ============================================ */
.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.results-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.results-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Report Content */
.report-content {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.report-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin: 2rem 0 1rem 0;
}

.report-content h2:first-child {
    margin-top: 0;
}

.report-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--primary-medium);
    margin: 1.5rem 0 0.75rem 0;
}

.report-content p {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.report-content ul,
.report-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.report-content li {
    margin-bottom: 0.5rem;
}

.report-content strong {
    color: var(--primary-dark);
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

/* Results Disclaimer */
.results-disclaimer {
    background: #fff7ed;
    border: 2px solid #fed7aa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.results-disclaimer p {
    font-size: 0.9rem;
    color: #92400e;
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: linear-gradient(135deg, #2d1b45 0%, #581c87 100%);
    padding: 3rem 2rem 2rem;
    margin-top: 4rem;
    color: white;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.footer-text {
    font-size: 1rem;
    margin: 1rem 0;
    opacity: 0.9;
}

.footer-disclaimer {
    font-size: 0.85rem;
    opacity: 0.7;
    font-style: italic;
    margin-top: 1rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .welcome-title {
        font-size: 1.8rem;
    }
    
    .welcome-subtitle {
        font-size: 1rem;
    }
    
    .welcome-logo {
        width: 90px;
        height: 90px;
    }
    
    .value-box {
        padding: 1.5rem;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
    }
    
    .trust-badges {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        min-width: 100%;
        font-size: 1.1rem;
    }
    
    .question-card {
        padding: 1.5rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .results-actions button {
        width: 100%;
    }
    
    .site-name {
        font-size: 1.4rem;
    }
    
    .header-logo {
        width: 40px;
        height: 40px;
    }
    
    .header-content {
        padding: 0 1rem;
    }
    
    .scale-labels {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .scale-label {
        max-width: 100%;
        text-align: left;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none !important;
}