/* UOC Bookings - Custom Booking Extensions */
/* Booking-specific styles to extend forms shared CSS */

/* ============================================
   Staggered Animations for Course Selector Page
   ============================================ */
/* Ensure all page elements animate in smoothly on load */
.step.active .page-partner-logo {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 0ms;
    opacity: 0;
}

.step.active .course-code-badges {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 160ms;
    opacity: 0;
}

.step.active .previous-names-text {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 200ms;
    opacity: 0;
}

.step.active .course-selector-grid {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 280ms;
    opacity: 0;
}

.step.active .selection-controls {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 360ms;
    opacity: 0;
}

.step.active .course-selection-status {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 400ms;
    opacity: 0;
}

/* Fade out all elements on page exit - match parent .step timing */
.step.exiting .page-partner-logo,
.step.exiting .course-code-badges,
.step.exiting .previous-names-text,
.step.exiting .course-selector-grid,
.step.exiting .selection-controls,
.step.exiting .course-selection-status {
    opacity: 0 !important;
    transform: translateY(-20px) !important;
}

/* ============================================
   Page Partner Logo (Course Selector)
   ============================================ */
.page-partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -64px auto 12px;
    padding: 0;
}

.page-partner-logo img {
    height: auto;
    max-height: 80px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    transform-origin: center;
    transition: transform var(--transition-fast);
}

/* ============================================
   Course Selector Title Adjustments
   ============================================ */
#page-0 .step-title {
    margin-top: -60px;
    margin-bottom: 12px;
}

#page-0 .page-partner-logo + .step-title {
    margin-top: 0;
}

/* ============================================
   Course Code Badges
   ============================================ */
.course-code-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 8px auto 0;
    padding: 0 var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.course-code-badge {
    display: inline;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.course-code-badge:not(:last-child)::after {
    content: '·';
    color: var(--text-muted);
    padding-left: 6px;
    padding-right: 6px;
}

/* ============================================
   Previous Names Text
   ============================================ */
.previous-names-text {
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin: 6px auto var(--space-lg);
    padding: 0 var(--space-md);
}

/* ============================================
   Co-Branding Header Extensions
   ============================================ */
.form-logo.co-brand {
    flex-direction: row;
    gap: 16px;
}

.partner-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 16px;
    border-left: 1px solid var(--border);
}

.partner-logo img {
    height: 24px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    transform-origin: left center;
    transition: transform var(--transition-fast);
}

.partner-logo span {
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.co-brand-message {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-align: center;
    margin-bottom: var(--space-md);
}

/* ============================================
   Course Selector Grid
   ============================================ */
.course-selector-grid {
    width: 100%;
    max-width: 720px;
    margin: 0 auto var(--space-xl);
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.course-grid-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    background: var(--background);
    border-bottom: 2px solid var(--border);
}

.course-grid-header-cell {
    padding: 12px 16px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.course-grid-header-cell:first-child {
    text-align: left;
}

.course-grid-body {
    display: flex;
    flex-direction: column;
}

.course-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast), transform var(--transition-fast);
    opacity: 0;
}

.course-row:last-child {
    border-bottom: none;
}

.course-row:hover {
    background: rgba(29, 161, 242, 0.02);
    transform: translateX(2px);
}

/* Staggered animation for course rows */
.step.active .course-row {
    animation: fadeSlideIn 400ms ease forwards;
    opacity: 0;
}

.step.active .course-row:nth-child(1) { animation-delay: 360ms; }
.step.active .course-row:nth-child(2) { animation-delay: 420ms; }
.step.active .course-row:nth-child(3) { animation-delay: 480ms; }
.step.active .course-row:nth-child(4) { animation-delay: 540ms; }
.step.active .course-row:nth-child(5) { animation-delay: 600ms; }
.step.active .course-row:nth-child(6) { animation-delay: 660ms; }
.step.active .course-row:nth-child(7) { animation-delay: 720ms; }
.step.active .course-row:nth-child(8) { animation-delay: 780ms; }

.step.exiting .course-row {
    opacity: 0 !important;
}

.course-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.course-code {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.course-name {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    line-height: 1.4;
    white-space: pre-line;
}

.course-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
    position: relative;
}

.course-option:hover {
    background: rgba(29, 161, 242, 0.05);
}

.course-option:active {
    transform: scale(0.95);
}

.course-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.course-option-indicator {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    background: var(--surface);
    position: relative;
}

.course-option:hover .course-option-indicator {
    border-color: var(--primary);
    transform: scale(1.05);
}

.course-option input:checked + .course-option-indicator {
    border-color: var(--primary);
    background: var(--primary);
    animation: checkPulse 400ms ease;
}

.course-option input:checked + .course-option-indicator::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: 600;
    animation: checkAppear 300ms ease;
}

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

@keyframes checkAppear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   Error Banner Animations
   ============================================ */
.error-banner {
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.error-banner.show {
    animation: fadeSlideIn 300ms ease forwards;
}

/* ============================================
   Clear Selection Button
   ============================================ */
.selection-controls {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    margin-bottom: 4px;
}

.clear-selection-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateY(-4px);
}

/* Animate in when shown */
.clear-selection-btn.visible {
    animation: fadeSlideIn 300ms ease forwards;
    animation-delay: 50ms;
}

.clear-selection-btn:hover {
    background: var(--border-light);
    color: var(--text-secondary);
    border-color: var(--text-muted);
    transform: translateY(0) scale(1.02);
}

.clear-selection-btn:active {
    transform: translateY(0) scale(0.98);
}

.clear-selection-btn svg {
    width: 14px;
    height: 14px;
    transition: transform var(--transition-fast);
}

.clear-selection-btn:hover svg {
    transform: rotate(90deg);
}

/* ============================================
   Button State Animations
   ============================================ */
.btn-primary {
    transition: all var(--transition-base), opacity var(--transition-fast), transform var(--transition-fast);
}

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

/* Smooth enable animation for continue button */
.btn-primary:not(:disabled) {
    animation: buttonEnable 300ms ease;
}

@keyframes buttonEnable {
    from {
        opacity: 0.5;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   Course Selection Status - Minimal Text Style
   ============================================ */
.course-selection-status {
    padding: 8px 0;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    min-height: 32px;
}

.course-selection-status .status-text {
    font-weight: 400;
    color: #9ca3af;
    font-size: 12px;
    transition: all var(--transition-base);
}

.course-selection-status.valid .status-text {
    color: var(--success);
    animation: statusPulse 400ms ease;
}

.course-selection-status.invalid .status-text {
    color: #d97706;
    animation: statusShake 400ms ease;
}

.course-selection-status.custom .status-text {
    color: var(--success);
    animation: statusPulse 400ms ease;
}

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

@keyframes statusShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ============================================
   Info Button for Course Types
   ============================================ */
.info-link {
    background: none;
    border: none;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    margin-left: 4px;
    transition: color var(--transition-fast);
}

.info-link:hover {
    color: #1a91d1;
}

.course-grid-header-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    border-radius: 50%;
    transition: all var(--transition-base);
    padding: 0;
    flex-shrink: 0;
}

.info-btn:hover {
    background: rgba(29, 161, 242, 0.15);
    transform: scale(1.1);
}

.info-btn:active {
    transform: scale(0.95);
}

.info-btn svg {
    display: block;
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

/* ============================================
   Modal for Course Type Info - Full Page Overlay
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease, background 0.35s ease, backdrop-filter 0.35s ease;
    backdrop-filter: blur(0px);
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-dialog {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(-40px) scale(0.9);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.modal-overlay.show .modal-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-40px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color var(--transition-fast);
    padding: 0;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-xl);
    overflow-y: auto;
    flex: 1;
}

.course-type-info {
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--background);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
    cursor: default;
}

.course-type-info:last-child {
    margin-bottom: 0;
}

.course-type-info:hover {
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.course-type-info.highlighted {
    background: rgba(29, 161, 242, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 161, 242, 0.1);
    animation: highlightPulse 800ms ease;
}

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

.course-type-info h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm) 0;
}

.course-type-info p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   Locked Field Styling
   ============================================ */
.locked-field {
    position: relative;
}

.locked-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.locked-badge svg {
    width: 12px;
    height: 12px;
}

.input-locked {
    background: rgba(107, 114, 128, 0.03);
    border-color: var(--border-light);
    cursor: not-allowed;
    color: var(--text-secondary);
}

.input-locked:focus {
    border-color: var(--border);
    box-shadow: none;
}

/* ============================================
   Choice Options (Payment Options) Enhancements
   ============================================ */
.choice-option {
    transition: all var(--transition-base);
}

.choice-label {
    transition: all var(--transition-base);
}

.choice-label:active {
    transform: scale(0.99);
}

.choice-option input:checked + .choice-label {
    animation: choiceSelect 400ms ease;
}

.choice-option input:checked + .choice-label .choice-indicator {
    animation: radioPulse 400ms ease;
}

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

/* Payment Option Content with Chips */
.choice-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.choice-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.choice-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 4px;
    letter-spacing: 0.2px;
    transition: all var(--transition-fast);
}

/* Dynamic PO Number Field Animation */
#poNumberFieldGroup {
    max-height: 200px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

#poNumberFieldGroup.hidden {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    margin-bottom: 0;
}

/* ============================================
   Invoice Name Option Checkbox
   ============================================ */
.invoice-name-option {
    margin-top: 12px;
    margin-bottom: 20px;
}

.invoice-name-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
    transition: all var(--transition-fast);
}

.invoice-name-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-custom {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--text-muted);
    border-radius: 3px;
    background: var(--surface);
    position: relative;
    transition: all var(--transition-fast);
}

.invoice-name-checkbox:hover .checkbox-custom {
    border-color: var(--primary);
}

.invoice-name-checkbox input:checked ~ .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
    animation: checkboxPop 250ms ease;
}

.invoice-name-checkbox input:checked ~ .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    animation: checkmarkDraw 200ms ease 50ms forwards;
    opacity: 0;
}

.checkbox-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.checkbox-label-text {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.5;
}

.checkbox-hint {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

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

@keyframes checkmarkDraw {
    to { opacity: 1; }
}

/* ============================================
   Radio Button Group Styling
   ============================================ */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.radio-option:hover {
    border-color: var(--primary);
    background: rgba(29, 161, 242, 0.02);
    transform: translateX(2px);
}

.radio-option:active {
    transform: translateX(2px) scale(0.99);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-indicator {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    background: var(--surface);
    flex-shrink: 0;
}

.radio-option:hover .radio-indicator {
    border-color: var(--primary);
    transform: scale(1.05);
}

.radio-option input:checked ~ .radio-indicator {
    border-color: var(--primary);
    background: var(--primary);
    animation: radioPulse 400ms ease;
}

.radio-option input:checked ~ .radio-indicator::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: radioInnerAppear 300ms ease;
}

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

@keyframes radioInnerAppear {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.radio-label {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    font-weight: 500;
}

.radio-option input:checked ~ .radio-label {
    color: var(--primary);
}

/* ============================================
   Condensed Radio Group Variant
   ============================================ */
.radio-group-condensed {
    gap: 4px;
}

.radio-group-condensed .radio-option {
    padding: 6px 8px;
    background: transparent;
    border: none;
    border-radius: 4px;
}

.radio-group-condensed .radio-option:hover {
    background: rgba(29, 161, 242, 0.04);
    border: none;
    transform: none;
}

.radio-group-condensed .radio-option:active {
    transform: none;
}

.radio-group-condensed .radio-indicator {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border);
}

.radio-group-condensed .radio-option:hover .radio-indicator {
    border-color: var(--primary);
    transform: scale(1.05);
}

.radio-group-condensed .radio-option input:checked ~ .radio-indicator {
    border-color: var(--primary);
    background: var(--primary);
}

.radio-group-condensed .radio-option input:checked ~ .radio-indicator::after {
    width: 7px;
    height: 7px;
}

.radio-group-condensed .radio-label {
    font-size: 14px;
}

.radio-group-condensed .radio-option input:checked ~ .radio-label {
    color: var(--primary);
}

/* ============================================
   Stripe Payment Elements
   ============================================ */
.stripe-payment-container {
    width: 100%;
    max-width: 560px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-md);
}

/* Stripe payment container animation */
.step.active .stripe-payment-container {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 120ms;
    opacity: 0;
}

.step.exiting .stripe-payment-container {
    opacity: 0 !important;
    transform: translateY(-20px) !important;
}

.step.exiting .payment-summary,
.step.exiting .stripe-element-container,
.step.exiting .secure-payment-badge {
    opacity: 0 !important;
    transform: translateY(-20px) !important;
}

/* Payment summary animation */
.step.active .payment-summary {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 200ms;
    opacity: 0;
}

/* Stripe element animation */
.step.active .stripe-element-container {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 280ms;
    opacity: 0;
}

/* Secure badge animation */
.step.active .secure-payment-badge {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 360ms;
    opacity: 0;
}

.payment-summary {
    padding: var(--space-lg);
    background: var(--background);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
}

.payment-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.payment-summary-row:last-child {
    margin-bottom: 0;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
}

.payment-summary-label {
    flex: 1;
}

.payment-summary-value {
    font-weight: 500;
}

.stripe-element-container {
    margin-bottom: var(--space-lg);
}

.stripe-element-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

/* Stripe Elements styling to match our theme */
.StripeElement {
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
}

.StripeElement--focus {
    border-color: var(--primary);
}

.StripeElement--invalid {
    border-color: var(--error);
}

.stripe-error-message {
    font-size: var(--font-size-xs);
    color: var(--error);
    margin-top: var(--space-xs);
    display: none;
}

.stripe-error-message.show {
    display: block;
}

.secure-payment-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.secure-payment-badge svg {
    width: 16px;
    height: 16px;
    color: var(--success);
}

/* ============================================
   Form Card Animations
   ============================================ */
/* Ensure form cards animate in smoothly */
.step.active .form-card {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 120ms;
    opacity: 0;
}

.step.exiting .form-card {
    opacity: 0 !important;
    transform: translateY(-20px) !important;
}

.step.exiting .form-card .field-group {
    opacity: 0 !important;
    transform: translateY(-20px) !important;
}

/* Individual form elements within cards */
.step.active .form-card .field-group {
    animation: fadeSlideIn 400ms ease forwards;
    opacity: 0;
}

.step.active .form-card .field-group:nth-child(1) { animation-delay: 200ms; }
.step.active .form-card .field-group:nth-child(2) { animation-delay: 240ms; }
.step.active .form-card .field-group:nth-child(3) { animation-delay: 280ms; }
.step.active .form-card .field-group:nth-child(4) { animation-delay: 320ms; }
.step.active .form-card .field-group:nth-child(5) { animation-delay: 360ms; }
.step.active .form-card .field-group:nth-child(6) { animation-delay: 400ms; }
.step.active .form-card .field-group:nth-child(7) { animation-delay: 440ms; }
.step.active .form-card .field-group:nth-child(8) { animation-delay: 480ms; }

/* ============================================
   Booking Summary (Confirmation Page)
   ============================================ */
.booking-summary {
    width: 100%;
    max-width: 560px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    text-align: left;
}

/* Booking summary animation */
.step.active .booking-summary {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 240ms;
    opacity: 0;
}

.step.exiting .booking-summary {
    opacity: 0 !important;
    transform: translateY(-20px) !important;
}

/* Success screen animations - initial state for animations */
.step.active.success-screen .success-icon,
.step.active.success-screen .step-title,
.step.active.success-screen .step-description,
.step.active.success-screen .booking-summary,
.step.active.success-screen .step-actions {
    opacity: 0;
}

.step.active.success-screen .success-icon {
    animation: fadeSlideIn 400ms ease forwards, successPulse 600ms ease 400ms;
    animation-delay: 0ms;
}

.step.active.success-screen .step-title {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 80ms;
}

.step.active.success-screen .step-description {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 160ms;
}

.step.active.success-screen .booking-summary {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 240ms;
}

.step.active.success-screen .step-actions {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 360ms;
}

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

.booking-summary-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.booking-summary-section {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

.booking-summary-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.booking-summary-section-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
}

.booking-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-sm);
}

.booking-summary-item:last-child {
    margin-bottom: 0;
}

.booking-summary-label {
    color: var(--text-secondary);
}

.booking-summary-value {
    color: var(--text-primary);
    font-weight: 500;
}

.next-steps {
    padding: var(--space-lg);
    background: var(--primary-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--primary-border);
    margin-bottom: var(--space-lg);
}

.next-steps-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--space-md);
}

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

.next-steps-list li {
    padding-left: 24px;
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    position: relative;
}

.next-steps-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 600;
}

/* ============================================
   Invoice Access Info Box
   ============================================ */
.invoice-access-info {
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(29, 161, 242, 0.05) 0%, rgba(29, 161, 242, 0.02) 100%);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.invoice-access-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--space-md);
}

.invoice-access-header svg {
    color: var(--primary);
    flex-shrink: 0;
}

.invoice-access-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
}

.invoice-access-text {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.invoice-access-steps {
    list-style: none;
    counter-reset: access-counter;
    padding: 0;
    margin: var(--space-md) 0;
}

.invoice-access-steps li {
    counter-increment: access-counter;
    position: relative;
    padding-left: 32px;
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

.invoice-access-steps li::before {
    content: counter(access-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.invoice-access-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.invoice-access-link:hover {
    color: #1a8cd8;
    text-decoration: underline;
}

.invoice-access-note {
    color: #10b981;
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-top: var(--space-md);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================
   Focus States for Accessibility
   ============================================ */
.info-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    background: rgba(29, 161, 242, 0.1);
}

.clear-selection-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.modal-close:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.course-option:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    border-radius: var(--radius-sm);
}

.radio-option:focus-within,
.choice-option:focus-within {
    outline: none;
}

/* ============================================
   Mobile Responsive - Course Grid
   ============================================ */
@media (max-width: 768px) {
    .page-partner-logo {
        margin-top: -50px;
        margin-bottom: 10px;
    }
    
    .page-partner-logo img {
        max-height: 60px;
        max-width: 240px;
    }
    
    #page-0 .step-title {
        margin-top: -48px;
        margin-bottom: 10px;
    }
    
    #page-0 .page-partner-logo + .step-title {
        margin-top: 0;
    }
    
    .course-code-badges {
        font-size: 12px;
        margin-top: 6px;
    }
    
    .course-code-badge {
        font-size: 12px;
    }
    
    .previous-names-text {
        font-size: 11px;
        margin-top: 5px;
        margin-bottom: var(--space-md);
    }
    
    .course-selector-grid {
        max-width: 100%;
        border-radius: var(--radius-md);
    }
    
    .course-grid-header,
    .course-row {
        grid-template-columns: 1.5fr 1fr 1fr;
    }
    
    .course-info {
        padding: 12px;
    }
    
    .course-code {
        font-size: 13px;
    }
    
    .course-name {
        font-size: 11px;
    }
    
    .course-option {
        padding: 12px 4px;
    }
    
    .course-option-indicator {
        width: 20px;
        height: 20px;
    }
    
    .stripe-payment-container,
    .booking-summary {
        padding: var(--space-lg);
    }
}

@media (max-width: 480px) {
    .page-partner-logo {
        margin-top: -44px;
        margin-bottom: 8px;
        padding: 0;
    }
    
    .page-partner-logo img {
        max-height: 50px;
        max-width: 200px;
    }
    
    #page-0 .step-title {
        margin-top: -42px;
        margin-bottom: 8px;
    }
    
    #page-0 .page-partner-logo + .step-title {
        margin-top: 0;
    }
    
    .course-code-badges {
        font-size: 11px;
        margin-top: 5px;
    }
    
    .course-code-badge {
        font-size: 11px;
    }
    
    .previous-names-text {
        font-size: 10px;
        margin-top: 4px;
        margin-bottom: var(--space-md);
    }
    
    .course-grid-header-cell,
    .course-code {
        font-size: 12px;
    }
    
    .course-grid-header-cell span {
        font-size: 11px;
    }
    
    .course-name {
        display: none;
    }
    
    .course-option-indicator {
        width: 18px;
        height: 18px;
    }
    
    .partner-logo {
        display: none;
    }
    
    .info-btn {
        width: 20px;
        height: 20px;
    }
    
    .info-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .modal-dialog {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: var(--space-md) var(--space-lg);
    }
    
    .modal-body {
        padding: var(--space-lg);
    }
    
    .course-type-info {
        padding: var(--space-md);
        margin-bottom: var(--space-lg);
    }
    
    .radio-option {
        padding: 10px 12px;
    }
    
    .locked-badge {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
    
    .course-selection-status {
        font-size: 11px;
        padding: 6px 0;
    }
    
    .clear-selection-btn {
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* ============================================
   Price Section - Skeleton Loader
   ============================================ */
.price-section {
    margin-bottom: var(--space-lg);
}

.price-skeleton {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.skeleton-line {
    height: 20px;
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 12px;
}

.skeleton-title {
    width: 40%;
    height: 24px;
    margin-bottom: 16px;
}

.skeleton-item {
    width: 100%;
    height: 18px;
}

.skeleton-total {
    width: 60%;
    height: 24px;
    margin-top: 8px;
}

.skeleton-text {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-top: 16px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================
   Price Display
   ============================================ */
.price-display {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 24px;
    animation: fadeSlideIn 400ms ease forwards;
}

.price-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-item,
.price-subtotal,
.price-gst {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #4b5563;
    font-size: 15px;
}

.price-item-name {
    flex: 1;
}

.price-item-value {
    font-weight: 500;
}

.price-subtotal,
.price-gst {
    font-size: 14px;
}

.price-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    margin-top: 8px;
    border-top: 2px solid #1DA1F2;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ============================================
   Price Error State
   ============================================ */
.price-error {
    padding: 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    text-align: center;
}

.price-error p {
    color: #dc2626;
    margin-bottom: 12px;
    font-size: 14px;
}

.retry-price-btn {
    margin-top: 12px;
    padding: 8px 16px;
    background: #1DA1F2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition-base);
}

.retry-price-btn:hover {
    background: #1a8cd8;
    transform: translateY(-1px);
}

.retry-price-btn:active {
    transform: translateY(0);
}

/* ============================================
   Price Section Animations
   ============================================ */
.step.active .price-section {
    animation: fadeSlideIn 400ms ease forwards;
    animation-delay: 480ms;
    opacity: 0;
}

.step.exiting .price-section {
    opacity: 0 !important;
    transform: translateY(-20px) !important;
}

/* ============================================
   Mobile Responsive - Price Section
   ============================================ */
@media (max-width: 768px) {
    .price-skeleton,
    .price-display {
        padding: 16px;
    }
    
    .price-title {
        font-size: 16px;
    }
    
    .price-item,
    .price-subtotal,
    .price-gst {
        font-size: 14px;
        padding: 6px 0;
    }
    
    .price-total {
        font-size: 16px;
        padding: 10px 0;
    }
}

@media (max-width: 480px) {
    .price-skeleton,
    .price-display {
        padding: 14px;
    }
    
    .price-title {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .price-item,
    .price-subtotal,
    .price-gst {
        font-size: 13px;
    }
    
    .price-total {
        font-size: 15px;
    }
    
    .skeleton-text {
        font-size: 12px;
    }
}

/* ============================================
   Button Loading State
   ============================================ */
.btn-primary.loading {
    position: relative;
    padding-right: 48px; /* Make room for spinner */
    pointer-events: none;
    opacity: 0.9;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: buttonSpinner 0.6s linear infinite;
}

@keyframes buttonSpinner {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* ============================================
   Payment Loading Overlay
   ============================================ */
.payment-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-loading-overlay.show {
    display: flex;
    opacity: 1;
}

.payment-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: fadeSlideIn 400ms ease forwards;
}

.payment-loading-content.success .payment-loading-spinner {
    border-color: #10b981;
    border-top-color: transparent;
    animation: none;
}

.payment-loading-content.success .payment-loading-spinner::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #10b981;
    font-size: 32px;
    font-weight: 600;
    animation: checkPop 300ms ease forwards;
}

@keyframes checkPop {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.payment-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(29, 161, 242, 0.2);
    border-top-color: #1DA1F2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: relative;
}

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

.payment-loading-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.payment-loading-subtext {
    font-size: 14px;
    color: var(--text-secondary);
}


