/**
 * Avatar Math Assessment - Frontend Styles
 */

/* ==========================================================================
   CSS Custom Properties - Avatar Brand Colors
   ========================================================================== */
:root {
    /* Primary Colors */
    --ama-primary: #2E68A1;
    --ama-primary-light: #5AACCF;
    --ama-primary-dark: #1a4171;

    /* Secondary Colors */
    --ama-danger: #f53a33;
    --ama-success: #81c171;
    --ama-warning: #fddd54;
    --ama-orange: #ff9130;
    --ama-pink: #ec90b7;
    --ama-teal: #8bccc8;
    --ama-purple: #b587b8;
    --ama-mint: #c8ffdd;

    /* Semantic Colors (derived from brand) */
    --ama-success-bg: rgba(129, 193, 113, 0.15);
    --ama-success-text: #4a7a3d;
    --ama-warning-bg: rgba(253, 221, 84, 0.3);
    --ama-warning-text: #8a6d00;
    --ama-danger-bg: rgba(245, 58, 51, 0.1);
    --ama-danger-text: #c22922;
    --ama-info-bg: rgba(90, 172, 207, 0.15);
    --ama-info-text: #1a4171;

    /* Neutral Colors */
    --ama-text-primary: #1a1a2e;
    --ama-text-secondary: #666666;
    --ama-text-muted: #999999;
    --ama-border: #e0e0e0;
    --ama-border-light: #f0f0f0;
    --ama-background: #ffffff;
    --ama-background-hover: #f8fafc;
    --ama-background-alt: #f5f7fa;

    /* Shadows */
    --ama-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --ama-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --ama-shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --ama-radius-sm: 4px;
    --ama-radius: 8px;
    --ama-radius-lg: 12px;

    /* Transitions */
    --ama-transition: 0.2s ease;
}

/* Container */
.ama-container {
    max-width: 680px;
    margin: 10px auto 20px;
    padding: 0 16px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: left;
    float: none;
}

/* Screens */
.ama-screen {
    display: none;
}

.ama-screen.ama-active {
    display: block;
}

/* Cards */
.ama-card {
    background: var(--ama-background);
    border-radius: var(--ama-radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

/* Shared Blue Header (assessment, consultation, enrollment) */
.ama-header,
.ama-consultation-header,
.ama-enrollment-header {
    text-align: center;
    margin: -20px -20px 18px -20px;
    padding: 22px 20px;
    background: linear-gradient(135deg, var(--ama-primary) 0%, var(--ama-primary-dark) 100%);
    border-radius: var(--ama-radius-lg) var(--ama-radius-lg) 0 0;
    color: #fff;
}

.ama-header h1,
.ama-header h2,
.ama-consultation-header h1,
.ama-enrollment-header h1,
.ama-enrollment-header h2 {
    font-size: 22px !important;
    font-weight: 600 !important;
    margin: 0 0 8px !important;
    color: #fff !important;
    letter-spacing: -0.02em;
}

.ama-header p,
.ama-consultation-header p,
.ama-enrollment-header p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin: 0 auto;
    max-width: 500px;
}

/* Forms */
.ama-form h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ama-border-light);
    color: var(--ama-text-primary);
}

.ama-form h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--ama-text-primary);
}

.ama-form-row {
    display: flex;
    gap: 24px;
}

.ama-form-row .ama-form-group {
    flex: 0 1 auto;
    min-width: 0;
}

.ama-form-group {
    margin-bottom: 12px;
}

.ama-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 13px;
    color: var(--ama-text-primary);
}

.ama-form-group input:not([type="checkbox"]):not([type="radio"]),
.ama-form-group select,
.ama-form-group textarea {
    width: 180px;
    padding: 10px 12px;
    border: 1px solid var(--ama-border);
    border-radius: var(--ama-radius);
    font-size: 14px;
    transition: border-color var(--ama-transition), box-shadow var(--ama-transition);
    background: var(--ama-background);
    box-sizing: border-box;
}

.ama-form-group input[type="email"] {
    width: 240px;
}

.ama-form-group textarea {
    width: 100%;
}

.ama-form-group select {
    width: auto;
    min-width: 150px;
}

.ama-form-group input:focus,
.ama-form-group select:focus {
    outline: none;
    border-color: var(--ama-primary);
    box-shadow: 0 0 0 3px rgba(46, 104, 161, 0.1);
}

.ama-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.ama-checkbox input {
    width: auto;
}

/* Buttons */
.ama-btn {
    padding: 10px 18px;
    border: none;
    border-radius: var(--ama-radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--ama-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.01em;
}

.ama-btn-primary {
    background: var(--ama-primary);
    color: var(--ama-background);
}

.ama-btn-primary:hover {
    background: var(--ama-primary-dark);
    transform: translateY(-1px);
}

.ama-btn-secondary {
    background: var(--ama-border-light);
    color: var(--ama-text-primary);
}

.ama-btn-secondary:hover {
    background: var(--ama-border);
}

.ama-btn-large {
    padding: 12px 24px;
    font-size: 14px;
    width: 100%;
    flex-direction: column;
}

.ama-btn-large small {
    font-weight: normal;
    opacity: 0.7;
    font-size: 12px;
}

.ama-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ama-btn-success {
    background: var(--ama-success);
    color: var(--ama-background);
}

.ama-btn-success:hover {
    background: var(--ama-success-text);
}

/* Progress Bar */
.ama-progress-bar {
    height: 6px;
    background: var(--ama-border-light);
    border-radius: 3px;
    margin-bottom: 8px;
    overflow: hidden;
}

.ama-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ama-primary), var(--ama-success));
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.ama-progress-text {
    text-align: right;
    color: var(--ama-text-muted);
    font-size: 12px;
    margin-bottom: 16px;
}

/* Question Content */
#ama-question-content {
    min-height: 260px;
    padding: 16px 0;
}

.ama-question-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--ama-text-primary);
    font-weight: 400;
}

/* Multiple Choice Options */
.ama-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ama-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid var(--ama-border);
    border-radius: var(--ama-radius);
    cursor: pointer;
    transition: all var(--ama-transition);
    background: var(--ama-background);
}

.ama-option:hover {
    border-color: var(--ama-primary-light);
    background: var(--ama-background-hover);
}

.ama-option.selected {
    border-color: var(--ama-primary);
    background: var(--ama-info-bg);
}

.ama-option input {
    margin-right: 10px;
}

.ama-option label {
    cursor: pointer;
    flex: 1;
    font-size: 14px;
}

/* Numerical Input */
.ama-numerical-input {
    text-align: center;
    padding: 16px;
}

.ama-numerical-input label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--ama-text-secondary);
}

/* Center the wrapper and size it nicely */
.ama-numerical-input .ama-math-input-wrapper {
    display: inline-block;
    max-width: 360px;
    width: 100%;
    position: relative;
}

/* Override math-input.css sizing for the student view */
.ama-numerical-input math-field {
    font-size: 22px;
    min-height: 52px;
    padding: 10px 44px 10px 14px;
    border: 2px solid var(--ama-border);
    border-radius: var(--ama-radius);
    text-align: center;
}

.ama-numerical-input math-field:focus-within {
    border-color: var(--ama-primary);
    box-shadow: 0 0 0 3px rgba(46, 104, 161, 0.1);
}

.ama-numerical-input .ama-math-toggle {
    top: 10px;
    right: 8px;
}

.ama-numerical-hint {
    margin-top: 10px;
    color: var(--ama-text-secondary);
    font-size: 13px;
    background: #f0f9ff;
    padding: 8px 14px;
    border-radius: 6px;
    display: inline-block;
}

/* Question Navigation */
.ama-question-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--ama-border-light);
}

#ama-timer {
    color: var(--ama-text-muted);
    font-size: 13px;
}

/* Results */
.ama-results-header {
    text-align: center;
    margin-bottom: 24px;
}

.ama-results-header h1 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.ama-results-header p {
    font-size: 14px;
    color: var(--ama-text-secondary);
    margin: 0;
}

.ama-result-box {
    background: linear-gradient(135deg, var(--ama-background-hover), var(--ama-info-bg));
    border-radius: var(--ama-radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.ama-result-box h2 {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ama-text-muted);
}

.ama-level {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.ama-level-name {
    font-size: 15px;
    color: var(--ama-text-secondary);
    margin-bottom: 12px;
}

.ama-score {
    font-size: 14px;
    color: var(--ama-text-primary);
}

/* Level Colors */
.ama-level-a {
    color: var(--ama-success);
}

.ama-level-b {
    color: var(--ama-primary);
}

.ama-level-c {
    color: var(--ama-orange);
}

/* Classes Section */
.ama-classes-section {
    margin-bottom: 24px;
}

.ama-classes-section h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--ama-text-primary);
}

.ama-classes-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--ama-text-primary);
}

.ama-class-card {
    border: 1px solid var(--ama-border);
    border-radius: var(--ama-radius);
    padding: 16px;
    margin-bottom: 12px;
    transition: box-shadow var(--ama-transition);
}

.ama-class-card:hover {
    box-shadow: var(--ama-shadow-hover);
}

.ama-class-card h4 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ama-text-primary);
}

.ama-class-card p {
    margin: 4px 0;
    font-size: 13px;
    color: var(--ama-text-secondary);
}

.ama-class-card .ama-btn {
    margin-top: 12px;
    width: 100%;
}

.ama-equivalency-note {
    background: var(--ama-warning-bg);
    color: var(--ama-warning-text);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-top: 8px;
    display: inline-block;
}

/* No Classes / Lead Capture */
.ama-no-classes {
    background: var(--ama-warning-bg);
    border-radius: var(--ama-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.ama-no-classes h2 {
    color: var(--ama-warning-text);
    margin: 0 0 8px;
    font-size: 16px;
}

.ama-lead-capture {
    background: var(--ama-background);
    border-radius: var(--ama-radius);
    padding: 16px;
    margin-top: 16px;
}

.ama-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0 16px;
}

.ama-radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}

/* Contact Info */
.ama-contact-info {
    text-align: center;
    color: var(--ama-text-secondary);
    padding-top: 16px;
    border-top: 1px solid var(--ama-border-light);
    font-size: 13px;
}

.ama-contact-info p {
    margin: 4px 0;
}

/* Loading */
.ama-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ama-loading p {
    font-size: 13px;
    color: var(--ama-text-secondary);
    margin-top: 12px;
}

.ama-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--ama-border-light);
    border-top-color: var(--ama-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Info Box (Pre-assessment instructions) */
.ama-info-box {
    background: var(--ama-info-bg);
    border: 1px solid rgba(46, 104, 161, 0.2);
    border-radius: var(--ama-radius);
    padding: 14px 16px;
    margin-bottom: 16px;
}

.ama-info-box p {
    margin: 0 0 6px;
    color: var(--ama-primary-dark);
    font-size: 13px;
}

.ama-info-box ul {
    margin: 0;
    padding-left: 18px;
    color: var(--ama-primary-dark);
    font-size: 13px;
}

.ama-info-box li {
    margin-bottom: 4px;
}

.ama-info-box li:last-child {
    margin-bottom: 0;
}

/* Enrollment Info Box (Success/green variant) */
.ama-enrollment-info {
    margin-top: 20px;
    padding: 16px;
    background: var(--ama-success-bg);
    border: 1px solid rgba(129, 193, 113, 0.3);
    border-radius: var(--ama-radius);
}

.ama-enrollment-info h3 {
    margin: 0 0 12px;
    color: var(--ama-success-text);
    font-size: 14px;
    font-weight: 600;
}

.ama-enrollment-info ul {
    margin: 0;
    padding-left: 18px;
    color: var(--ama-success-text);
    font-size: 13px;
}

.ama-enrollment-info li {
    margin-bottom: 8px;
}

.ama-enrollment-info li:last-child {
    margin-bottom: 0;
}

/* Field Tooltip (info icon on labels) */
.ama-field-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--ama-primary);
    cursor: help;
    vertical-align: middle;
    line-height: 1;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    justify-content: center;
    flex-shrink: 0;
    overflow: visible;
    user-select: none;
}

.ama-field-tooltip .ama-tooltip-text {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    white-space: normal;
    width: 240px;
    padding: 9px 12px;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 9999;
}

/* Arrow */
.ama-field-tooltip .ama-tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
}

.ama-field-tooltip:hover .ama-tooltip-text,
.ama-field-tooltip:focus .ama-tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Alternative Schedule Box */
.ama-alternative-schedule {
    margin-top: 16px;
    padding: 16px;
    background: var(--ama-info-bg);
    border-radius: var(--ama-radius);
    text-align: center;
}

.ama-alternative-schedule p {
    margin: 0 0 12px;
    color: var(--ama-primary-dark);
    font-size: 13px;
}

/* No Classes Recommendation Box */
.ama-recommendation-box {
    padding: 20px;
    background: var(--ama-warning-bg);
    border-radius: var(--ama-radius);
    margin-bottom: 16px;
}

.ama-recommendation-box h2 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--ama-warning-text);
    font-size: 15px;
    font-weight: 600;
}

.ama-recommendation-box p {
    font-size: 14px;
    margin-bottom: 0;
}

/* Contact Follow-up Box */
.ama-followup-box {
    padding: 16px;
    background: var(--ama-info-bg);
    border-radius: var(--ama-radius);
}

.ama-followup-box p {
    margin: 0 0 8px;
    font-size: 13px;
}

.ama-followup-box p:last-child {
    margin-bottom: 0;
}

/* Consultation CTA */
.ama-consultation {
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, var(--ama-primary-light) 0%, var(--ama-primary) 100%);
    border-radius: var(--ama-radius);
    text-align: center;
    color: var(--ama-background);
}

.ama-consultation p {
    margin: 0 0 10px;
    font-size: 13px;
}

.ama-consultation .ama-btn {
    display: inline-block;
    background: var(--ama-background);
    color: var(--ama-primary-dark);
    padding: 10px 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}

.ama-consultation .ama-btn:hover {
    background: var(--ama-background-hover);
}

/* Results Header Link */
.ama-results-header a {
    color: var(--ama-primary);
}

.ama-results-header a:hover {
    color: var(--ama-primary-dark);
}

/* View Answers Button Margin */
.ama-result-box .ama-view-answers-wrap {
    margin-top: 12px;
}

/* Contact Info - Small Text Variant */
.ama-contact-info .ama-text-small {
    font-size: 11px;
    color: var(--ama-text-muted);
}

/* No Classes Wrapper */
.ama-no-classes-wrapper {
    display: none;
    margin-bottom: 30px;
}

/* Equivalent Section (hidden by default) */
.ama-equivalent-section {
    display: none;
}

/* Text Utilities */
.ama-text-muted {
    color: var(--ama-text-secondary);
}

/* Contact Info - Link Styling */
.ama-contact-info a {
    color: var(--ama-primary);
}

.ama-contact-info a:hover {
    color: var(--ama-primary-dark);
}

/* Skip Button */
.ama-btn-skip {
    font-size: 13px;
    padding: 8px 16px;
    color: var(--ama-text-muted);
    background: transparent;
    border: 1px solid var(--ama-border);
}

.ama-btn-skip:hover {
    color: var(--ama-text-secondary);
    border-color: var(--ama-text-muted);
    background: var(--ama-background-hover);
}

/* Nav Buttons Container */
.ama-nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Insight Box */
.ama-insight-box {
    margin: 20px 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0f9ff, #eff6ff);
    border-left: 4px solid var(--ama-primary);
    border-radius: var(--ama-radius);
    text-align: center;
}

.ama-insight-box p {
    margin: 0;
    font-size: 15px;
    font-style: italic;
    color: var(--ama-primary-dark);
    line-height: 1.6;
}

/* Responsive */
/* Responsive — Assessment Form */
@media (max-width: 600px) {
    .ama-container {
        padding: 12px;
    }

    .ama-card {
        padding: 16px;
    }

    /* Stack form rows */
    .ama-form-row {
        flex-direction: column;
        gap: 10px;
    }

    /* Full-width inputs — exclude checkboxes */
    .ama-form-group input:not([type="checkbox"]):not([type="radio"]),
    .ama-form-group select,
    .ama-form-group textarea {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    /* Checkbox sizing */
    input[type="checkbox"],
    input[type="radio"] {
        width: auto !important;
        height: auto !important;
        flex-shrink: 0;
    }

    /* Checkbox label text wraps */
    .ama-checkbox {
        align-items: flex-start;
        gap: 10px;
        line-height: 1.5;
    }

    /* Headers */
    .ama-header h1 {
        font-size: 18px;
    }
    .ama-header h2 {
        font-size: 16px;
    }
    .ama-results-header h1 {
        font-size: 18px;
    }

    /* Assessment UI */
    .ama-level {
        font-size: 24px;
    }
    .ama-question-text {
        font-size: 15px;
    }
    .ama-question-nav {
        flex-direction: column;
        gap: 12px;
    }
    #ama-timer {
        order: -1;
    }

    /* Nav buttons: full width on mobile */
    .ama-nav-buttons {
        display: flex;
        gap: 10px;
        width: 100%;
    }
    .ama-nav-buttons .ama-btn {
        flex: 1;
        text-align: center;
    }

    /* Answer choices: single column on very small screens */
    .ama-choices {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Consultation Scheduling Form Styles
   ========================================================================== */

/* Wide container override for consultation page */
.ama-container.ama-container-wide {
    max-width: 960px;
}

/* Two-column layout: form + sidebar */
.ama-consultation-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.ama-consultation-layout > .ama-card {
    flex: 1 1 55%;
    min-width: 0;
}

/* Description sidebar */
.ama-consultation-sidebar {
    flex: 1 1 40%;
    min-width: 0;
    background: var(--ama-background);
    border-radius: var(--ama-radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 20px;
    position: sticky;
    top: 40px;
}

.ama-consultation-sidebar h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--ama-primary-dark);
    margin: 0 0 8px;
}

.ama-consultation-sidebar > p {
    font-size: 13px;
    color: var(--ama-text-muted);
    margin: 0 0 20px;
}

/* Sidebar step items */
.ama-sidebar-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ama-sidebar-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ama-sidebar-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ama-primary) 0%, var(--ama-primary-dark) 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.ama-sidebar-step strong {
    display: block;
    font-size: 14px;
    color: var(--ama-text-primary);
    margin-bottom: 4px;
}

.ama-sidebar-step p {
    font-size: 13px;
    color: var(--ama-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Sidebar contact block */
/* Sidebar intro text */
.ama-sidebar-intro h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--ama-primary-dark);
    margin: 0 0 10px;
}

.ama-sidebar-intro p {
    font-size: 13px;
    color: var(--ama-text-secondary);
    margin: 0 0 18px;
    line-height: 1.6;
}

/* Highlight box (free assessment callout) */
.ama-sidebar-highlight {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06) 0%, rgba(37, 99, 235, 0.12) 100%);
    border-left: 3px solid var(--ama-primary);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 20px;
}

.ama-sidebar-highlight-icon {
    font-size: 20px;
    color: var(--ama-primary);
    flex-shrink: 0;
    margin-top: 1px;
}

.ama-sidebar-highlight strong {
    display: block;
    font-size: 14px;
    color: var(--ama-text-primary);
    margin-bottom: 4px;
}

.ama-sidebar-highlight p {
    font-size: 12px;
    color: var(--ama-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Section label divider */
.ama-sidebar-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ama-text-muted);
    margin-bottom: 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ama-border-light);
}

/* CTA block */
.ama-sidebar-cta {
    margin-top: 20px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(37, 99, 235, 0.08) 100%);
    border-radius: 6px;
    text-align: center;
}

.ama-sidebar-cta p {
    font-size: 13px;
    font-weight: 600;
    color: var(--ama-primary-dark);
    margin: 0;
    line-height: 1.5;
}

/* Contact block */
.ama-sidebar-contact {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--ama-border-light);
    font-size: 13px;
    color: var(--ama-text-secondary);
    text-align: center;
}

.ama-sidebar-contact p {
    margin: 0 0 4px;
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
    .ama-container.ama-container-wide,
    .ama-enrollment-page {
        max-width: 580px;
    }

    .ama-consultation-layout {
        flex-direction: column;
    }

    .ama-consultation-sidebar {
        position: static;
    }
}

/* Form Sections */
.ama-consultation-form .ama-form-section {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ama-border-light);
}

.ama-consultation-form .ama-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.ama-consultation-form .ama-form-section h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--ama-text-primary);
    margin: 0 0 10px;
}

.ama-form-hint {
    font-size: 13px;
    color: var(--ama-text-muted);
    margin: -8px 0 16px;
}

/* Required Field Indicator */
.ama-consultation-form .required,
.ama-container .required,
.ama-enrollment-page .required {
    color: var(--ama-danger);
    font-weight: bold;
}

/* Checkbox Group (Programs of Interest) */
.ama-checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.ama-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: var(--ama-background-hover);
    border-radius: var(--ama-radius);
    cursor: pointer;
    transition: background var(--ama-transition);
    font-size: 13px;
    font-weight: normal;
}

.ama-checkbox-label:hover {
    background: var(--ama-info-bg);
}

.ama-checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 2px;
}

.ama-checkbox-label span {
    flex: 1;
    line-height: 1.4;
}

/* Multi-select dropdown with checkboxes */
.ama-multi-select {
    position: relative;
    width: fit-content;
    min-width: 240px;
}

.ama-multi-select-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid var(--ama-border);
    border-radius: var(--ama-radius);
    background: var(--ama-background);
    cursor: pointer;
    font-size: 14px;
    color: var(--ama-text-primary);
    transition: border-color var(--ama-transition), box-shadow var(--ama-transition);
    box-sizing: border-box;
}

.ama-multi-select-toggle:hover,
.ama-multi-select-toggle:focus {
    border-color: var(--ama-primary);
    outline: none;
}

.ama-multi-select.open .ama-multi-select-toggle {
    border-color: var(--ama-primary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.ama-multi-select-text {
    flex: 1;
    line-height: 1.4;
}

.ama-multi-select-text.placeholder {
    color: var(--ama-text-muted);
}

.ama-multi-select-arrow {
    font-size: 11px;
    color: var(--ama-text-muted);
    margin-left: 8px;
    transition: transform 0.2s;
}

.ama-multi-select.open .ama-multi-select-arrow {
    transform: rotate(180deg);
}

.ama-multi-select-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    width: max-content;
    background: #fff;
    border: 1px solid var(--ama-primary);
    border-top: none;
    border-radius: 0 0 var(--ama-radius) var(--ama-radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ama-multi-select.open .ama-multi-select-menu {
    display: block;
}

.ama-multi-select-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: normal;
    white-space: nowrap;
    transition: background 0.15s;
    margin: 0;
}

.ama-multi-select-item:hover {
    background: var(--ama-background-hover);
}

.ama-multi-select-item input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

.ama-multi-select-item span {
    flex: 1;
    line-height: 1.4;
}

/* Time Slots */
.ama-slots-container {
    margin-top: 16px;
}

.ama-slots-container>label {
    display: block;
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 10px;
    color: var(--ama-text-primary);
}

.ama-slots-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.ama-slot-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: var(--ama-background);
    border: 2px solid var(--ama-border);
    border-radius: var(--ama-radius);
    cursor: pointer;
    transition: all var(--ama-transition);
    text-align: center;
}

.ama-slot-btn:hover {
    border-color: var(--ama-primary-light);
    background: var(--ama-background-hover);
}

.ama-slot-btn.selected {
    border-color: var(--ama-primary);
    background: var(--ama-info-bg);
}

.ama-slot-time {
    font-size: 15px;
    font-weight: 600;
    color: var(--ama-text-primary);
}

.ama-slot-range {
    font-size: 12px;
    color: var(--ama-text-muted);
}

.ama-slot-spots {
    font-size: 11px;
    color: var(--ama-success-text);
    background: var(--ama-success-bg);
    padding: 2px 6px;
    border-radius: 10px;
    margin-top: 6px;
}

.ama-slots-loading,
.ama-slots-empty {
    padding: 20px;
    text-align: center;
    color: var(--ama-text-muted);
    font-size: 13px;
}

.ama-spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--ama-border);
    border-top-color: var(--ama-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

/* Submit Section */
.ama-form-submit {
    text-align: center;
    padding-top: 8px;
}

.ama-form-disclaimer {
    font-size: 11px;
    color: var(--ama-text-muted);
    margin-top: 12px;
}

/* Error Message */
.ama-form-error {
    background: var(--ama-danger-bg);
    border: 1px solid rgba(245, 58, 51, 0.3);
    color: var(--ama-danger-text);
    padding: 12px 16px;
    border-radius: var(--ama-radius);
    margin-top: 16px;
    font-size: 13px;
}

/* Success Message */
.ama-consultation-success {
    text-align: center;
    padding: 20px 0;
}

.ama-success-icon {
    width: 60px;
    height: 60px;
    background: var(--ama-success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
}

.ama-consultation-success h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--ama-text-primary);
    margin: 0 0 8px;
}

.ama-consultation-success p {
    font-size: 14px;
    color: var(--ama-text-secondary);
    margin: 8px 0;
}

.ama-success-details {
    background: var(--ama-background-alt);
    border-radius: var(--ama-radius);
    padding: 16px;
    margin: 20px 0;
    text-align: left;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

.ama-success-details p {
    margin: 6px 0;
    font-size: 13px;
}

/* ===== Timezone Selector ===== */
#ama-tz-selector {
    position: relative;
    display: inline-block;
}
#ama-tz-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    line-height: 1.4;
}
#ama-tz-btn:hover {
    background: #e8eef5;
}
.ama-tz-icon {
    font-size: 13px;
    line-height: 1;
}
.ama-tz-arrow {
    font-size: 10px;
    color: #94a3b8;
}
#ama-tz-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 999;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    min-width: 220px;
    overflow: hidden;
}
#ama-tz-dropdown.open {
    display: block;
}
.ama-tz-opt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    gap: 12px;
}
.ama-tz-opt:hover {
    background: #f8fafc;
}
.ama-tz-opt-active {
    background: #eff6ff;
    color: #1a4171;
    font-weight: 600;
}
.ama-tz-opt-time {
    color: #94a3b8;
    white-space: nowrap;
}

/* ===== Booking Success Modal ===== */
.ama-booking-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 99999;
    padding: 24px 16px;
    overflow-y: auto;
}

.ama-booking-modal {
    background: #fff;
    border-radius: 12px;
    padding: 40px 32px 32px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: ama-modal-in 0.22s ease;
}

@keyframes ama-modal-in {
    from { opacity: 0; transform: scale(0.93); }
    to   { opacity: 1; transform: scale(1); }
}

.ama-booking-modal .ama-success-icon {
    margin-bottom: 18px;
}

.ama-booking-modal h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--ama-text-primary);
    margin: 0 0 8px;
}

.ama-booking-modal > p {
    font-size: 14px;
    color: var(--ama-text-secondary);
    margin: 6px 0;
    line-height: 1.5;
}

.ama-booking-modal .ama-success-details {
    margin: 16px auto;
    text-align: left;
}

.ama-booking-modal .ama-modal-actions {
    margin-top: 24px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Textarea */
.ama-consultation-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ama-border);
    border-radius: var(--ama-radius);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: border-color var(--ama-transition), box-shadow var(--ama-transition);
}

.ama-consultation-form textarea:focus {
    outline: none;
    border-color: var(--ama-primary);
    box-shadow: 0 0 0 3px rgba(46, 104, 161, 0.1);
}

/* ==========================================================================
   Step Indicator (Multi-step form)
   ========================================================================== */
.ama-step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ama-border-light);
}

.ama-step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: opacity var(--ama-transition);
}

.ama-step.ama-step-active {
    opacity: 1;
}

.ama-step.ama-step-completed {
    opacity: 0.7;
}

.ama-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ama-border);
    color: var(--ama-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--ama-transition);
}

.ama-step-active .ama-step-number {
    background: var(--ama-primary);
    color: #fff;
}

.ama-step-completed .ama-step-number {
    background: var(--ama-success);
    color: #fff;
}

.ama-step-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ama-text-secondary);
}

.ama-step-active .ama-step-label {
    color: var(--ama-text-primary);
}

.ama-step-divider {
    width: 40px;
    height: 2px;
    background: var(--ama-border);
    margin: 0 16px;
}

/* Step Navigation Buttons */
.ama-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 4px;
}

.ama-step-nav-top {
    margin-bottom: 16px;
    padding-top: 0;
    margin-top: 0;
}

/* Field Error Highlight */
.ama-field-error {
    border-color: var(--ama-danger) !important;
    box-shadow: 0 0 0 3px rgba(245, 58, 51, 0.1) !important;
}

/* Responsive — Consultation Form */
@media (max-width: 600px) {
    /* Checkbox group: single column */
    .ama-checkbox-group {
        grid-template-columns: 1fr;
    }

    /* Checkbox labels: constrain width, prevent overflow */
    .ama-checkbox-label {
        width: 100%;
        box-sizing: border-box;
        align-items: flex-start;
    }

    /* Ensure checkboxes stay small */
    .ama-checkbox-label input[type="checkbox"] {
        width: 16px !important;
        height: 16px !important;
        flex-shrink: 0;
        margin-top: 2px;
    }

    /* Multi-select: full width */
    .ama-multi-select {
        width: 100% !important;
        min-width: 0 !important;
    }
    .ama-multi-select-toggle {
        width: 100%;
        box-sizing: border-box;
    }
    .ama-multi-select-menu {
        width: 100% !important;
    }
    .ama-multi-select-item {
        white-space: normal;
    }

    /* Time slots: 2-column grid */
    .ama-slots-list {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Headers */
    .ama-header h1,
    .ama-header h2,
    .ama-consultation-header h1,
    .ama-enrollment-header h2 {
        font-size: 18px;
    }

    /* Step indicator */
    .ama-step-label {
        display: none;
    }
    .ama-step-divider {
        width: 20px;
        margin: 0 6px;
    }

    /* Consultation form inputs: full width */
    .ama-consultation-form .ama-form-group input:not([type="checkbox"]):not([type="radio"]),
    .ama-consultation-form .ama-form-group select {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    /* Consultation sidebar collapses */
    .ama-consultation-sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Consultation layout: no horizontal padding waste */
    .ama-consultation-form {
        padding: 0;
    }
}

/* ==========================================================================
   ENROLLMENT FORM STYLES
   ========================================================================== */

/* Enrollment page wide container */
.ama-enrollment-page {
    max-width: 960px;
    margin: 10px auto 20px;
    padding: 0 16px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.ama-enrollment-wrap {
    flex: 1 1 55%;
    min-width: 0;
    padding: 20px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: left;
    float: none;
    background: var(--ama-background);
    border-radius: var(--ama-radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Enrollment header styles are in the shared blue header rule above */

/* Enrollment step nav sits outside .ama-form-section — remove bottom border from last section */
.ama-enrollment-step .ama-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Form Rows & Fields */
.ama-enrollment-wrap .ama-form-row {
    display: flex;
    gap: 24px;
    margin-bottom: 10px;
}

.ama-form-field {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ama-form-field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ama-text-primary);
    margin-bottom: 5px;
}

.ama-form-field input:not([type="checkbox"]):not([type="radio"]),
.ama-form-field select,
.ama-form-field textarea {
    width: 180px;
    padding: 10px 12px;
    border: 1px solid var(--ama-border);
    border-radius: var(--ama-radius);
    font-size: 14px;
    transition: border-color var(--ama-transition), box-shadow var(--ama-transition);
    background: var(--ama-background);
    box-sizing: border-box;
}

.ama-form-field input[type="email"] {
    width: 240px;
}

.ama-form-field textarea {
    width: 100%;
}

.ama-form-field select {
    width: auto;
    min-width: 150px;
}

.ama-form-field input:focus,
.ama-form-field select:focus,
.ama-form-field textarea:focus {
    outline: none;
    border-color: var(--ama-primary);
    box-shadow: 0 0 0 3px rgba(46, 104, 161, 0.1);
}

.ama-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.ama-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Enrollment buttons: slightly larger than consultation for longer labels */
.ama-enrollment-wrap .ama-btn {
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--ama-radius);
}

.ama-enrollment-wrap .ama-btn-large {
    padding: 13px 30px;
    font-size: 15px;
}

/* Step Navigation */
.ama-enrollment-wrap .ama-step-nav {
    margin-top: 16px;
    padding-top: 12px;
}

/* Step Indicator (reusing consultation styles + enrollment-specific) */
.ama-enrollment-wrap .ama-step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    gap: 0;
}

.ama-enrollment-wrap .ama-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: #999;
    transition: all 0.3s;
}

.ama-enrollment-wrap .ama-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e9ecef;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
}

.ama-enrollment-wrap .ama-step.active {
    color: var(--ama-primary);
    font-weight: 600;
}

.ama-enrollment-wrap .ama-step.active .ama-step-number {
    background: var(--ama-primary);
    color: #fff;
}

.ama-enrollment-wrap .ama-step.completed .ama-step-number {
    background: var(--ama-success);
    color: #fff;
}

.ama-enrollment-wrap .ama-step.completed {
    color: var(--ama-success-text);
}

.ama-step-line,
.ama-enrollment-wrap .ama-step-divider {
    width: 40px;
    height: 2px;
    background: #dee2e6;
    margin: 0 5px;
}

/* Products Grid */
.ama-products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.ama-product-card {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    background: #fff;
    transition: all 0.2s;
}

.ama-product-card:hover {
    border-color: var(--ama-primary-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ama-product-card.selected {
    border-color: var(--ama-primary);
    background: rgba(46, 104, 161, 0.03);
    box-shadow: 0 2px 12px rgba(46, 104, 161, 0.15);
}

.ama-product-image {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.ama-product-image img {
    max-width: 72px;
    max-height: 72px;
    object-fit: contain;
}

.ama-product-info h4 {
    margin: 0 0 6px;
    font-size: 16px;
    color: #333;
}

.ama-product-info p {
    margin: 0 0 12px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.ama-product-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

.ama-product-card.selected .ama-product-select {
    border-color: var(--ama-primary);
}

/* Coupon Section */
.ama-coupon-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ama-coupon-section h4 {
    margin: 0 0 10px;
    font-size: 14px;
}

/* Order Summary */
.ama-order-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.ama-order-summary h4 {
    margin: 0 0 15px;
    color: #333;
}

.ama-order-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
    font-size: 14px;
}

.ama-order-totals {
    margin-top: 12px;
}

.ama-order-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.ama-order-total {
    font-size: 18px;
    font-weight: bold;
    color: var(--ama-primary);
    border-top: 2px solid #dee2e6;
    padding-top: 10px;
    margin-top: 6px;
}

/* Terms Section */
.ama-terms-section {
    background: #fff;
    border: 1px solid var(--ama-border);
    border-radius: var(--ama-radius);
    padding: 20px;
    margin-bottom: 20px;
}

/* Hide sidebar and center content on enrollment completion */
.ama-consultation-layout.ama-enrollment-done .ama-consultation-sidebar {
    display: none;
}
.ama-consultation-layout.ama-enrollment-done .ama-enrollment-wrap {
    max-width: 560px;
    margin: 0 auto;
    float: none;
}

/* Enrollment Success — matches .ama-consultation-success pattern */
.ama-enrollment-success {
    text-align: center;
    padding: 20px 0;
}

.ama-enrollment-success .ama-success-icon {
    width: 60px;
    height: 60px;
    background: var(--ama-success);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
}

.ama-enrollment-success h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--ama-text-primary);
    margin: 0 0 8px;
}

.ama-enrollment-success p {
    font-size: 14px;
    color: var(--ama-text-secondary);
    margin: 8px 0;
}

/* Responsive — Enrollment & Shared Forms */
@media (max-width: 600px) {
    /* Stack all form rows */
    .ama-form-row {
        flex-direction: column;
        gap: 10px;
    }

    /* Full-width inputs/selects — exclude checkboxes & radios */
    .ama-form-group input:not([type="checkbox"]):not([type="radio"]),
    .ama-form-group select,
    .ama-form-field input:not([type="checkbox"]):not([type="radio"]),
    .ama-form-field select,
    .ama-form-field textarea {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    /* Ensure checkboxes & radios are never stretched */
    input[type="checkbox"],
    input[type="radio"] {
        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        flex-shrink: 0;
    }

    /* Explicit checkbox size */
    .ama-checkbox-label input[type="checkbox"],
    .ama-checkbox-group .ama-checkbox-label input[type="checkbox"] {
        width: 18px !important;
        height: 18px !important;
    }

    /* Checkbox group: single column */
    .ama-checkbox-group {
        grid-template-columns: 1fr !important;
    }

    /* Checkbox label: don't overflow */
    .ama-checkbox-label {
        width: 100%;
        box-sizing: border-box;
        flex-wrap: nowrap;
        align-items: flex-start;
    }

    .ama-checkbox-label span {
        flex: 1;
        min-width: 0;
        word-break: break-word;
    }

    /* Products: single column */
    .ama-products-grid {
        grid-template-columns: 1fr;
    }

    /* Coupon input: full width, stack button below */
    .ama-coupon-section > div[style] {
        flex-wrap: wrap !important;
    }
    #coupon-code-input {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
    #btn-apply-coupon {
        width: 100%;
    }

    /* Multi-select: full width on mobile */
    .ama-multi-select {
        width: 100% !important;
        min-width: 0 !important;
    }
    .ama-multi-select-toggle {
        width: 100%;
        box-sizing: border-box;
    }
    .ama-multi-select-menu {
        width: 100% !important;
        min-width: 0 !important;
    }
    .ama-multi-select-item {
        white-space: normal;
    }

    /* Hide step labels, shrink dividers */
    .ama-enrollment-wrap .ama-step-label {
        display: none;
    }
    .ama-step-line,
    .ama-enrollment-wrap .ama-step-divider {
        width: 20px;
        margin: 0 4px;
    }

    /* Enrollment wrap: remove padding overhead */
    .ama-enrollment-wrap {
        padding: 14px;
    }

    /* Full-width primary action buttons */
    .ama-btn-large,
    .ama-enrollment-wrap .ama-btn-large,
    .ama-step-nav .ama-btn-primary {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    /* Step nav: stack buttons */
    .ama-step-nav {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .ama-step-nav .ama-btn {
        width: 100%;
        text-align: center;
    }

    /* Order summary: comfortable padding */
    .ama-order-summary {
        padding: 14px;
    }

    /* Terms section */
    .ama-terms-section {
        padding: 14px;
    }

    /* Agreement checkbox label: wrap text properly */
    .ama-terms-section .ama-checkbox-label,
    #agree-terms-label {
        align-items: flex-start;
        gap: 10px;
        line-height: 1.5;
    }

    /* Selected items list: wrap */
    #selected-items-list .ama-order-item {
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* ==========================================================================
   Detailed Results Popup (Draggable, Resizable, Minimizable)
   ========================================================================== */
.ama-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99998;
}

.ama-popup-overlay.active {
    display: block;
}

.ama-popup {
    display: none;
    position: fixed;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    max-width: 92vw;
    height: 78vh;
    min-width: 320px;
    min-height: 200px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.08);
    z-index: 99999;
    overflow: hidden;
    flex-direction: column;
    resize: both;
}

.ama-popup.active {
    display: flex;
}

.ama-popup.minimized {
    height: 44px !important;
    min-height: 44px !important;
    width: 320px !important;
    min-width: 320px !important;
    top: auto !important;
    bottom: 16px !important;
    left: 16px !important;
    right: auto !important;
    transform: none !important;
    border-radius: 10px;
    resize: none;
}

.ama-popup.minimized .ama-popup-body,
.ama-popup.minimized .ama-popup-resize {
    display: none;
}

/* Titlebar */
.ama-popup-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px 0 16px;
    height: 44px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #fff;
    cursor: move;
    user-select: none;
    flex-shrink: 0;
    border-radius: 12px 12px 0 0;
}

.ama-popup.minimized .ama-popup-titlebar {
    border-radius: 10px;
}

.ama-popup-titlebar .ama-popup-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ama-popup-controls {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.ama-popup-controls button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.ama-popup-controls button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ama-popup-controls .ama-popup-close:hover {
    background: #ef4444;
}

/* Body */
.ama-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

/* Resize handle */
.ama-popup-resize {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    z-index: 10;
}

.ama-popup-resize::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
}

/* Reuse detailed results styles inside popup */
.ama-popup-body .ama-question-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #e2e8f0;
}

.ama-popup-body .ama-question-card.correct {
    border-left-color: #22c55e;
}

.ama-popup-body .ama-question-card.incorrect {
    border-left-color: #ef4444;
}

.ama-popup-body .ama-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.ama-popup-body .ama-question-number {
    font-weight: 600;
    font-size: 14px;
    color: #64748b;
}

.ama-popup-body .ama-question-status {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.ama-popup-body .ama-question-status.correct {
    background: #dcfce7;
    color: #166534;
}

.ama-popup-body .ama-question-status.incorrect {
    background: #fee2e2;
    color: #991b1b;
}

.ama-popup-body .ama-question-text {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    color: #1f2937;
}

.ama-popup-body .ama-question-text img {
    max-width: 100%;
    margin: 8px 0;
    border-radius: 6px;
}

.ama-popup-body .ama-options-list {
    margin: 8px 0;
}

.ama-popup-body .ama-option-item {
    padding: 8px 10px;
    margin: 4px 0;
    border-radius: 5px;
    background: #f1f5f9;
    font-size: 13px;
}

.ama-popup-body .ama-option-item.selected {
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

.ama-popup-body .ama-option-item.selected.correct-selection {
    background: #dcfce7;
    border: 1px solid #86efac;
}

.ama-popup-body .ama-option-item.correct-answer {
    background: #dcfce7;
    border: 1px solid #86efac;
}

.ama-popup-body .ama-answer-section {
    background: #f8fafc;
    padding: 12px;
    border-radius: 6px;
    margin-top: 12px;
}

.ama-popup-body .ama-answer-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 13px;
}

.ama-popup-body .ama-answer-row:last-child {
    margin-bottom: 0;
}

.ama-popup-body .ama-answer-label {
    min-width: 110px;
    font-weight: 500;
    color: #64748b;
}

.ama-popup-body .ama-answer-value.student-correct {
    color: #166534;
}

.ama-popup-body .ama-answer-value.student-incorrect {
    color: #991b1b;
}

.ama-popup-body .ama-correct-answer {
    color: #166534;
    font-weight: 500;
}

.ama-popup-body .ama-explanation {
    margin-top: 12px;
    padding: 12px;
    background: #e0f2fe;
    border-radius: 6px;
    border-left: 3px solid #0284c7;
    font-size: 13px;
}

.ama-popup-body .ama-explanation-title {
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 4px;
}

.ama-popup-body .ama-popup-summary {
    text-align: center;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
}

.ama-popup-body .ama-popup-summary .stat-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.ama-popup-body .ama-popup-summary .stat-item {
    text-align: center;
}

.ama-popup-body .ama-popup-summary .stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #1e3a5f;
}

.ama-popup-body .ama-popup-summary .stat-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.05em;
}

.ama-popup-body .ama-popup-print-row {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 600px) {
    .ama-popup {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100vw;
        border-radius: 0;
        transform: none !important;
        resize: none;
    }

    .ama-popup-titlebar {
        border-radius: 0;
    }

    .ama-popup.minimized {
        width: 260px !important;
        bottom: 8px !important;
        left: 8px !important;
        border-radius: 10px;
        height: 44px !important;
    }

    .ama-popup-resize {
        display: none;
    }
}

/* ==========================================================================
   Methodology Page  [avatar_methodology]
   ========================================================================== */

.ama-methodology-page {
    --meth-level-a:      #22c55e;
    --meth-level-a-bg:   #dcfce7;
    --meth-level-a-dark: #166534;
    --meth-level-b:      #3b82f6;
    --meth-level-b-bg:   #dbeafe;
    --meth-level-b-dark: #1e40af;
    --meth-level-c:      #f59e0b;
    --meth-level-c-bg:   #fef3c7;
    --meth-level-c-dark: #92400e;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ama-text-primary);
    max-width: 720px;
    margin: 10px auto 20px;
    box-sizing: border-box;
}

.ama-methodology-page * {
    box-sizing: border-box;
}

/* Header */
.ama-methodology-page .ama-meth-header {
    background: linear-gradient(135deg, var(--ama-primary) 0%, var(--ama-primary-dark) 100%);
    color: #fff;
    padding: 22px 20px;
    text-align: center;
    border-radius: var(--ama-radius-lg) var(--ama-radius-lg) 0 0;
}

.ama-methodology-page .ama-meth-header h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: #fff;
}

.ama-methodology-page .ama-meth-header p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    max-width: 650px;
    margin: 0 auto;
}

/* Main content card */
.ama-methodology-page main {
    background: var(--ama-background);
    border-radius: 0 0 var(--ama-radius-lg) var(--ama-radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ama-methodology-page section {
    padding: 36px 40px;
    border-bottom: 1px solid var(--ama-border);
}

.ama-methodology-page section:last-child {
    border-bottom: none;
}

/* Headings */
.ama-methodology-page h2 {
    color: var(--ama-primary);
    font-size: 1.6em;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--ama-primary-light);
}

.ama-methodology-page h3 {
    color: var(--ama-primary-dark);
    font-size: 1.2em;
    margin: 24px 0 12px;
}

.ama-methodology-page p {
    margin-bottom: 14px;
    color: var(--ama-text-secondary);
    font-size: 1.02em;
}

/* Highlight boxes */
.ama-methodology-page .highlight-box {
    padding: 20px 24px;
    margin: 20px 0;
    border-radius: var(--ama-radius);
}

.ama-methodology-page .highlight-green  { background: var(--meth-level-a-bg); border-left: 4px solid var(--meth-level-a); }
.ama-methodology-page .highlight-green p { color: var(--meth-level-a-dark); margin: 0; }

.ama-methodology-page .highlight-blue  { background: var(--meth-level-b-bg); border-left: 4px solid var(--meth-level-b); }
.ama-methodology-page .highlight-blue p { color: var(--meth-level-b-dark); margin: 0; }

.ama-methodology-page .highlight-amber  { background: var(--meth-level-c-bg); border-left: 4px solid var(--meth-level-c); }
.ama-methodology-page .highlight-amber p { color: var(--meth-level-c-dark); margin: 0; }

.ama-methodology-page .highlight-neutral { background: var(--ama-background-alt); border-left: 4px solid var(--ama-primary-light); }
.ama-methodology-page .highlight-neutral p { color: var(--ama-primary-dark); margin: 0; }

/* Level badges */
.ama-methodology-page .level-badge {
    display: inline-block;
    padding: 5px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.92em;
    color: #fff;
    margin-right: 6px;
}

.ama-methodology-page .level-a { background: var(--meth-level-a); }
.ama-methodology-page .level-b { background: var(--meth-level-b); }
.ama-methodology-page .level-c { background: var(--meth-level-c); }

/* Numbered steps list */
.ama-methodology-page .steps {
    counter-reset: step;
    list-style: none;
    margin: 20px 0;
    padding-left: 0;
}

.ama-methodology-page .steps li {
    counter-increment: step;
    margin-bottom: 16px;
    padding-left: 48px;
    position: relative;
    color: var(--ama-text-secondary);
}

.ama-methodology-page .steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -2px;
    width: 34px;
    height: 34px;
    background: var(--ama-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95em;
}

/* Example / info boxes */
.ama-methodology-page .meth-example-box {
    margin: 25px 0;
    padding: 20px;
    background: var(--ama-background-alt);
    border-radius: var(--ama-radius);
}

.ama-methodology-page .meth-example-label {
    font-weight: 700;
    color: var(--ama-text-primary);
    margin-bottom: 12px;
}

.ama-methodology-page .meth-example-note {
    font-size: 0.9em;
    margin-top: 10px;
    color: var(--ama-text-secondary);
}

/* Score placement bar wrapper */
.ama-methodology-page .meth-score-bar-wrap {
    margin: 16px 0 20px;
}

/* Student example cards */
.ama-methodology-page .student-card {
    border: 2px solid var(--ama-border);
    border-radius: 14px;
    margin: 20px 0;
    overflow: hidden;
}

.ama-methodology-page .student-card-header {
    padding: 16px 24px;
    color: #fff;
    font-weight: 700;
    font-size: 1.05em;
}

.ama-methodology-page .student-card-body {
    padding: 24px;
}

.ama-methodology-page .student-gle {
    font-size: 2.8em;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
}

.ama-methodology-page .student-score {
    font-size: 1.1em;
    color: var(--ama-text-secondary);
    font-weight: 600;
    text-align: center;
    margin-top: 4px;
}

.ama-methodology-page .student-note {
    font-size: 0.95em;
    text-align: center;
    font-weight: 600;
    margin-top: 4px;
}

.ama-methodology-page .student-summary {
    margin-top: 30px;
    padding: 16px;
    border-radius: var(--ama-radius);
}

/* Bar chart */
.ama-methodology-page .bar-chart {
    margin: 20px 0 12px;
    position: relative;
}

.ama-methodology-page .bar-track {
    display: flex;
    height: 36px;
    border-radius: var(--ama-radius);
    overflow: hidden;
    border: 2px solid var(--ama-border);
}

.ama-methodology-page .bar-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78em;
}

.ama-methodology-page .bar-marker {
    position: absolute;
    top: -10px;
    transform: translateX(-50%);
}

.ama-methodology-page .bar-marker-line {
    width: 5px;
    height: 56px;
    border-radius: 3px;
}

.ama-methodology-page .bar-marker-label {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.72em;
    font-weight: 700;
    white-space: nowrap;
}

.ama-methodology-page .bar-expected {
    position: absolute;
    bottom: -18px;
    transform: translateX(-50%);
    font-size: 0.68em;
    color: var(--ama-text-secondary);
    white-space: nowrap;
}

.ama-methodology-page .bar-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.72em;
    color: #94a3b8;
    margin-top: 4px;
    padding: 0 2px;
}

.ama-methodology-page .score-bar-track {
    display: flex;
    height: 32px;
    border-radius: var(--ama-radius);
    overflow: hidden;
    border: 1px solid var(--ama-border);
}

/* Placement grid (3-col) */
.ama-methodology-page .meth-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.ama-methodology-page .meth-grid-card {
    padding: 20px;
    border-radius: var(--ama-radius);
    text-align: center;
}

.ama-methodology-page .meth-grid-icon {
    font-size: 1.6em;
    margin-bottom: 6px;
}

.ama-methodology-page .meth-grid-title {
    font-weight: 700;
    margin-bottom: 6px;
}

/* Features grid (4-col) */
.ama-methodology-page .meth-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 16px 0;
}

.ama-methodology-page .meth-feature-card {
    padding: 20px;
    border: 1px solid var(--ama-border);
    border-radius: var(--ama-radius);
}

.ama-methodology-page .meth-feature-card h3 {
    margin-top: 0;
    font-size: 1.05em;
}

.ama-methodology-page .meth-feature-card p {
    font-size: 0.92em;
    margin-bottom: 0;
}

/* CTA section */
.ama-methodology-page .meth-cta-section {
    border-bottom: none;
}

.ama-methodology-page .meth-cta-box {
    background: linear-gradient(135deg, var(--ama-primary), var(--ama-primary-dark));
    border-radius: var(--ama-radius-lg);
    padding: 30px;
    text-align: center;
    margin: 24px 0;
}

.ama-methodology-page .meth-cta-title {
    color: #fff;
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 8px;
}

.ama-methodology-page .meth-cta-box p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 16px;
    font-size: 1.1em;
}

.ama-methodology-page .meth-cta-btn {
    display: inline-block;
    background: #fff;
    color: var(--ama-primary-dark);
    padding: 14px 36px;
    border-radius: var(--ama-radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05em;
    transition: transform var(--ama-transition), box-shadow var(--ama-transition);
}

.ama-methodology-page .meth-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ama-methodology-page .meth-cta-phone {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9em;
    margin-top: 12px !important;
}

/* Responsive */
@media (max-width: 700px) {
    .ama-methodology-page section {
        padding: 24px 20px;
    }

    .ama-methodology-page .ama-meth-header {
        padding: 18px 16px;
    }

    .ama-methodology-page .ama-meth-header h1 {
        font-size: 18px;
    }

    .ama-methodology-page .student-gle {
        font-size: 2em;
    }

    .ama-methodology-page .bar-zone {
        font-size: 0.65em;
    }
}