:root {
    --apex-navy: #0B2545;
    --apex-blue: #1F6FEB;
    --apex-gray-50: #F9FAFB;
    --apex-gray-100: #F3F4F6;
    --apex-gray-200: #E5E7EB;
    --apex-gray-300: #D1D5DB;
    --apex-gray-400: #9CA3AF;
    --apex-gray-500: #6B7280;
    --apex-gray-600: #4B5563;
    --apex-pink: #E91E8C;
}

.apex-quiz-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 600px;
}

.apex-quiz-container * {
    box-sizing: border-box;
}

.apex-quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.apex-quiz-logo {
    height: 40px;
    width: auto;
}

.apex-quiz-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--apex-gray-500);
}

.apex-quiz-progress-bar {
    width: 120px;
    height: 6px;
    background: var(--apex-gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.apex-quiz-progress-fill {
    height: 100%;
    background: var(--apex-blue);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.apex-quiz-step {
    animation: fadeIn 0.3s ease;
}

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

.apex-quiz-step h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--apex-navy);
    margin-bottom: 0.75rem;
    font-family: 'Libre Baskerville', Georgia, serif;
}

.apex-quiz-step p {
    font-size: 1.125rem;
    color: var(--apex-gray-600);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.apex-quiz-options {
    display: grid;
    gap: 1rem;
}

.apex-quiz-options.two-col {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 640px) {
    .apex-quiz-options.two-col {
        grid-template-columns: 1fr;
    }
}

.apex-quiz-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 256px;
    background: white;
    border: 2px solid var(--apex-gray-100);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 
                0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.apex-quiz-option:hover {
    border-color: var(--apex-blue);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 
                0 10px 20px -5px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.apex-quiz-option.selected {
    border-color: var(--apex-blue);
    background: rgba(31, 111, 235, 0.05);
}

.apex-quiz-option-icon {
    width: 64px;
    height: 64px;
    background: rgba(31, 111, 235, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.apex-quiz-option.women .apex-quiz-option-icon {
    background: rgba(233, 30, 140, 0.08);
}

.apex-quiz-option:hover .apex-quiz-option-icon,
.apex-quiz-option.selected .apex-quiz-option-icon {
    background: var(--apex-blue);
}

.apex-quiz-option:hover .apex-quiz-option-icon svg,
.apex-quiz-option.selected .apex-quiz-option-icon svg {
    stroke: white;
}

.apex-quiz-option.women:hover .apex-quiz-option-icon,
.apex-quiz-option.women.selected .apex-quiz-option-icon {
    background: var(--apex-pink);
}

.apex-quiz-option h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--apex-navy);
    margin-bottom: 0.5rem;
}

.apex-quiz-option .desc {
    font-size: 0.875rem;
    color: var(--apex-gray-500);
    margin-bottom: 0.75rem;
}

.apex-quiz-option .price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--apex-blue);
}

.apex-quiz-checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: white;
    border: 2px solid var(--apex-gray-200);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-weight: 500;
    color: var(--apex-gray-600);
}

.apex-quiz-checkbox-option:hover {
    border-color: var(--apex-gray-300);
}

.apex-quiz-checkbox-option.selected {
    border-color: #EF4444;
    background: #FEF2F2;
    color: #B91C1C;
}

.apex-quiz-checkbox-option.positive.selected {
    border-color: #22C55E;
    background: #F0FDF4;
    color: #15803D;
}

.apex-quiz-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--apex-gray-300);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.apex-quiz-checkbox-option.selected .apex-quiz-checkbox {
    background: #EF4444;
    border-color: #EF4444;
}

.apex-quiz-checkbox-option.positive.selected .apex-quiz-checkbox {
    background: #22C55E;
    border-color: #22C55E;
}

.apex-quiz-none-wrapper {
    background: #F9FAFB;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-top: 1.5rem;
    border: 1px solid var(--apex-gray-100);
}

.apex-quiz-checkbox-option.full-width {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    font-weight: 700;
}

.apex-quiz-age-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .apex-quiz-age-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

.apex-quiz-age-btn {
    padding: 1rem;
    border: 2px solid var(--apex-gray-200);
    border-radius: 0.75rem;
    font-weight: 700;
    color: var(--apex-navy);
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.apex-quiz-age-btn:hover {
    border-color: var(--apex-blue);
}

.apex-quiz-age-btn.selected {
    background: var(--apex-blue);
    border-color: var(--apex-blue);
    color: white;
}

.apex-quiz-symptom {
    background: var(--apex-gray-50);
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.apex-quiz-symptom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.apex-quiz-symptom-label {
    font-weight: 500;
    color: var(--apex-navy);
}

.apex-quiz-symptom-value {
    font-size: 0.875rem;
    color: var(--apex-gray-500);
}

.apex-quiz-rating-btns {
    display: flex;
    gap: 0.5rem;
}

.apex-quiz-rating-btn {
    flex: 1;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    border: 1px solid var(--apex-gray-200);
    background: white;
    color: var(--apex-gray-400);
    cursor: pointer;
    transition: all 0.2s ease;
}

.apex-quiz-rating-btn:hover {
    border-color: var(--apex-blue);
}

.apex-quiz-rating-btn.selected {
    background: var(--apex-blue);
    border-color: var(--apex-blue);
    color: white;
}

.apex-quiz-rating-btn.filled {
    background: rgba(31, 111, 235, 0.2);
    border-color: var(--apex-blue);
    color: var(--apex-blue);
}

.apex-quiz-lifestyle-question {
    margin-bottom: 1.5rem;
}

.apex-quiz-lifestyle-question label {
    display: block;
    font-weight: 500;
    color: var(--apex-navy);
    margin-bottom: 0.75rem;
}

.apex-quiz-lifestyle-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .apex-quiz-lifestyle-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

.apex-quiz-lifestyle-btn {
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    background: var(--apex-gray-50);
    color: var(--apex-navy);
    cursor: pointer;
    transition: all 0.2s ease;
}

.apex-quiz-lifestyle-btn:hover {
    background: var(--apex-gray-100);
}

.apex-quiz-lifestyle-btn.selected {
    background: var(--apex-blue);
    color: white;
}

.apex-quiz-testing-option {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--apex-gray-200);
    border-radius: 0.75rem;
    background: white;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.75rem;
}

.apex-quiz-testing-option:hover {
    border-color: var(--apex-blue);
}

.apex-quiz-testing-option.selected {
    border-color: var(--apex-blue);
    background: rgba(31, 111, 235, 0.05);
}

.apex-quiz-testing-option strong {
    display: block;
    color: var(--apex-navy);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.apex-quiz-testing-option span {
    font-size: 0.875rem;
    color: var(--apex-gray-500);
}

.apex-quiz-goal-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--apex-gray-200);
    border-radius: 0.75rem;
    background: white;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--apex-gray-600);
}

.apex-quiz-goal-option:hover {
    border-color: var(--apex-blue);
}

.apex-quiz-goal-option.selected {
    border-color: var(--apex-blue);
    background: rgba(31, 111, 235, 0.05);
    color: var(--apex-navy);
}

.apex-quiz-goal-check {
    width: 24px;
    height: 24px;
    border: 2px solid var(--apex-gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.apex-quiz-goal-option.selected .apex-quiz-goal-check {
    background: var(--apex-blue);
    border-color: var(--apex-blue);
}

.apex-quiz-input-group {
    margin-bottom: 1rem;
}

.apex-quiz-input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--apex-navy);
    margin-bottom: 0.5rem;
}

.apex-quiz-input-group label span {
    color: var(--apex-gray-400);
    font-weight: 400;
}

.apex-quiz-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--apex-gray-200);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.apex-quiz-input:focus {
    outline: none;
    border-color: var(--apex-blue);
}

/* Validation error styles */
.apex-quiz-input-group.has-error .apex-quiz-input {
    border-color: #dc2626;
}

.apex-quiz-error {
    display: block;
    color: #dc2626;
    font-size: 0.8125rem;
    margin-top: 0.375rem;
}

.apex-quiz-guarantee {
    background: rgba(31, 111, 235, 0.05);
    border: 1px solid rgba(31, 111, 235, 0.1);
    border-radius: 0.5rem;
    padding: 0.875rem;
    margin: 0.75rem auto;
    max-width: 320px;
}

.apex-quiz-guarantee-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.apex-quiz-guarantee-header svg {
    color: var(--apex-blue);
    width: 16px;
    height: 16px;
}

.apex-quiz-guarantee-header strong {
    color: var(--apex-navy);
    font-size: 0.875rem;
}

.apex-quiz-guarantee p {
    font-size: 0.8125rem;
    color: var(--apex-gray-600);
    margin: 0;
    text-align: center;
}

.apex-quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--apex-gray-100);
}

.apex-quiz-back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: var(--apex-gray-500);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.apex-quiz-back-btn:hover {
    color: var(--apex-navy);
}

.apex-quiz-next-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--apex-blue);
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(31, 111, 235, 0.3);
}

.apex-quiz-next-btn:hover {
    background: #1a5fd4;
}

.apex-quiz-next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.apex-quiz-submit-btn {
    background: var(--apex-navy);
}

.apex-quiz-submit-btn:hover {
    background: #0a1e38;
}

.apex-quiz-privacy {
    text-align: center;
    font-size: 0.75rem;
    color: var(--apex-gray-400);
    margin-top: 1rem;
}

.apex-quiz-result {
    text-align: center;
    padding: 1rem 0;
}

.apex-quiz-result-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.apex-quiz-result-icon svg {
    width: 24px;
    height: 24px;
}

.apex-quiz-result-icon.success {
    background: #DCFCE7;
}

.apex-quiz-result-icon.success svg {
    color: #22C55E;
}

.apex-quiz-result-icon.decline {
    background: var(--apex-gray-100);
}

.apex-quiz-result-icon.decline svg {
    color: var(--apex-gray-400);
}

.apex-quiz-result h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.apex-quiz-result p {
    text-align: center;
    max-width: 360px;
    margin: 0 auto 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.apex-quiz-pricing-box {
    background: rgba(31, 111, 235, 0.05);
    border: 1px solid rgba(31, 111, 235, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    max-width: 320px;
    margin: 1rem auto;
    text-align: center;
}

.apex-quiz-pricing-box h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--apex-navy);
    margin-bottom: 0.25rem;
    text-align: center;
}

.apex-quiz-pricing-box .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--apex-blue);
    text-align: center;
}

.apex-quiz-pricing-box .price span {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--apex-gray-500);
}

.apex-quiz-pricing-box .desc {
    font-size: 0.8125rem;
    color: var(--apex-gray-600);
    margin-top: 0.5rem;
    margin-bottom: 0;
    text-align: center;
}

.apex-quiz-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 320px;
    padding: 0.75rem 1.5rem;
    background: var(--apex-navy);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(11, 37, 69, 0.2);
    text-decoration: none;
    margin-top: 0.75rem;
}

.apex-quiz-cta-btn:hover {
    background: #0a1e38;
    color: white;
}

.apex-quiz-help-text {
    font-size: 0.6875rem;
    color: var(--apex-gray-400);
    margin-top: 0.5rem;
    text-align: center;
}

.apex-quiz-info-box {
    background: var(--apex-gray-50);
    border: 1px solid var(--apex-gray-100);
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 400px;
    margin: 1.5rem auto;
}

.apex-quiz-info-box strong {
    color: var(--apex-navy);
}

.apex-quiz-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.apex-quiz-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.apex-quiz-packages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.apex-quiz-package-card {
    background: white;
    border: 2px solid var(--apex-gray-200);
    border-radius: 1rem;
    padding: 1.25rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    position: relative;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.apex-quiz-package-card:hover {
    border-color: var(--apex-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.apex-quiz-package-card.selected {
    border-color: var(--apex-blue);
    background: #f0f7ff;
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

.apex-quiz-package-card.featured {
    border-color: var(--apex-blue);
}

.apex-quiz-package-card.featured.women {
    border-color: #7c3aed;
}

.apex-quiz-package-card.featured.women.selected,
.apex-quiz-package-card.women.selected {
    border-color: #7c3aed;
    background: #f5f0ff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.apex-quiz-package-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--apex-navy) 0%, var(--apex-blue) 100%);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    white-space: nowrap;
}

.apex-quiz-package-badge.women {
    background: linear-gradient(135deg, #5b21b6 0%, #a855f7 100%);
}

.apex-quiz-package-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--apex-navy);
    margin-bottom: 0.25rem;
    margin-top: 0.25rem;
}

.apex-quiz-package-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--apex-navy);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.apex-quiz-package-desc {
    font-size: 0.75rem;
    color: var(--apex-gray-500);
    margin-bottom: 0.75rem;
}

.apex-quiz-package-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    flex: 1;
}

.apex-quiz-package-features li {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--apex-gray-600);
    padding: 0.2rem 0;
    line-height: 1.3;
}

.apex-quiz-package-features li svg {
    flex-shrink: 0;
    color: #22c55e;
}

@media (max-width: 640px) {
    .apex-quiz-packages {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .apex-quiz-package-card.featured {
        order: -1;
    }
}

.apex-quiz-signup-card {
    border: 2px solid var(--apex-blue);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.apex-quiz-signup-header {
    background: var(--apex-navy);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.apex-quiz-signup-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: 0.02em;
}

.apex-quiz-signup-price {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.1;
}

.apex-quiz-signup-period {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.apex-quiz-signup-section {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--apex-gray-200);
}

.apex-quiz-signup-section:first-of-type {
    border-top: none;
}

.apex-quiz-signup-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--apex-navy);
    margin-bottom: 0.5rem;
}

.apex-quiz-signup-section-desc {
    font-size: 0.875rem;
    color: var(--apex-gray-500);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.apex-quiz-signup-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.apex-quiz-signup-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.9rem;
    color: var(--apex-gray-600);
    line-height: 1.4;
}

.apex-quiz-signup-features li svg {
    flex-shrink: 0;
    color: #22c55e;
    margin-top: 0.1rem;
}

.apex-quiz-name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .apex-quiz-name-row {
        grid-template-columns: 1fr;
    }
}

.apex-quiz-validation-msg {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #FEF2F2;
    color: #DC2626;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 1rem;
    border: 1px solid #FECACA;
}

.apex-quiz-validation-msg svg {
    flex-shrink: 0;
}

.apex-quiz-required-dot {
    color: #DC2626;
    font-weight: 700;
}

.apex-quiz-required-label {
    color: #DC2626;
    font-size: 0.75rem;
    font-weight: 600;
}

.apex-quiz-symptom.unrated {
    border: 1px solid #FECACA;
    border-radius: 0.5rem;
    padding: 0.75rem;
    background: #FEF2F2;
}

.apex-quiz-lifestyle-question.unanswered {
    border: 1px solid #FECACA;
    border-radius: 0.5rem;
    padding: 0.75rem;
    background: #FEF2F2;
}
