/**
 * Frontend styles for Risenstone Event Registration
 * Scoped strictly to .rser-* and page layout normalization.
 * Advanced Multi-Stage UI/UX & Responsive Layout System
 */

/* ==========================================================================
   Page Layout & Gap Normalization (Eliminates the ~250px theme whitespace void)
   ========================================================================== */
body:has(.rser-registration-wrap) .rs-page-hero,
.page:has(.rser-registration-wrap) .rs-page-hero {
    padding-top: clamp(2rem, 4vw, 3.2rem) !important;
    padding-bottom: 0.5rem !important;
    text-align: center;
}

body:has(.rser-registration-wrap) .rs-page-hero h1,
.page:has(.rser-registration-wrap) .rs-page-hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.2rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    margin-bottom: 0 !important;
    line-height: 1.15 !important;
}

body:has(.rser-registration-wrap) .rs-section,
.page:has(.rser-registration-wrap) .rs-section {
    padding-top: 0.75rem !important;
    padding-bottom: clamp(2.5rem, 5vw, 4.5rem) !important;
}

body:has(.rser-registration-wrap) .rs-content,
.page:has(.rser-registration-wrap) .rs-content {
    max-width: 100% !important;
    padding: 0 !important;
}

/* Container & Wrapper */
.rser-registration-wrap {
    max-width: 700px;
    margin: 0 auto 36px auto !important;
    font-family: var(--rs-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);
    color: #1e293b;
    box-sizing: border-box;
}

.rser-registration-wrap *,
.rser-registration-wrap *::before,
.rser-registration-wrap *::after {
    box-sizing: border-box;
}

/* Card Surface - Elevated Modern Glassmorphism & Accent Border */
.rser-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 38px 36px;
    box-shadow: 0 20px 45px -12px rgba(15, 23, 42, 0.09), 0 4px 16px -2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}

/* Subtle Brand Accent Line along Card Top */
.rser-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d6451b 0%, #f97316 50%, #fb923c 100%);
    border-radius: 20px 20px 0 0;
}

@media screen and (max-width: 600px) {
    .rser-card {
        padding: 26px 20px;
        border-radius: 16px;
    }
}

/* Event Header Area */
.rser-header-area {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.rser-category-pill {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    background: #fff7ed;
    color: #d6451b;
    border: 1px solid #ffedd5;
    padding: 4px 10px;
    border-radius: 9999px;
    margin-bottom: 10px;
}

.rser-title {
    font-family: inherit;
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 12px 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

@media screen and (max-width: 600px) {
    .rser-title {
        font-size: 1.5rem;
    }
}

/* Meta Chips */
.rser-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.rser-meta-chip {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.85rem;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.rser-chip-icon {
    font-size: 14px;
}

.rser-chip-urgent {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
    font-weight: 700;
}

/* Form Fields & Grid */
.rser-fields-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 20px;
}

.rser-form-group {
    margin: 0;
}

.rser-label {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 6px;
    color: #1e293b;
}

.rser-req {
    color: #d6451b;
    font-weight: 700;
    margin-left: 2px;
}

.rser-input-wrapper,
.rser-select-wrapper {
    position: relative;
    width: 100%;
}

.rser-field-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
}

.rser-input,
.rser-select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 0.95rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.rser-input-with-icon,
.rser-select-with-icon {
    padding-left: 38px;
}

.rser-input:focus,
.rser-select:focus {
    outline: none;
    border-color: #e05326;
    box-shadow: 0 0 0 3px rgba(224, 83, 38, 0.15);
}

/* Indian Phone Input Group */
.rser-phone-group {
    display: flex;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rser-phone-group:focus-within {
    border-color: #e05326;
    box-shadow: 0 0 0 3px rgba(224, 83, 38, 0.15);
}

.rser-country-addon {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    padding: 0 12px;
    border-right: 1px solid #e2e8f0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    flex-shrink: 0;
    user-select: none;
}

.rser-flag {
    font-size: 16px;
}

.rser-dial {
    color: #475569;
}

.rser-phone-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    flex: 1;
}

.rser-field-help {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 5px;
    display: block;
}

/* Pricing Breakdown Receipt Card */
.rser-pricing-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
}

.rser-pricing-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.rser-pricing-title {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #475569;
}

.rser-pricing-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    padding: 2px 8px;
    border-radius: 9999px;
}

.rser-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92rem;
    margin-bottom: 8px;
    color: #475569;
}

.rser-price-label {
    color: #64748b;
}

.rser-price-val {
    font-weight: 600;
    color: #0f172a;
}

.rser-total-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    margin-bottom: 0;
}

.rser-total-label {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    display: block;
}

.rser-tax-subnote {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: normal;
    margin-top: 2px;
    display: block;
}

.rser-total-amount {
    font-size: 1.45rem;
    font-weight: 900;
    color: #d6451b;
}

/* Terms & Consent Checkbox */
.rser-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.5;
}

.rser-checkbox-group input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #d6451b;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.rser-checkbox-group a {
    color: #d6451b;
    font-weight: 600;
    text-decoration: underline;
}

/* Hero Submit Button */
.rser-btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: linear-gradient(135deg, #e05326 0%, #c9441a 100%);
    border: 1px solid #c9441a;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(224, 83, 38, 0.35);
    transition: all 0.2s ease;
    font-family: inherit;
}

.rser-btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #c9441a 0%, #b03810 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(224, 83, 38, 0.45);
}

.rser-btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.rser-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.rser-btn-lock-icon {
    font-size: 18px;
}

/* Trust Bar */
.rser-trust-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

.rser-trust-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rser-trust-sep {
    color: #cbd5e1;
}

/* Button Spinner */
.rser-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: rser-spin 0.8s linear infinite;
    vertical-align: middle;
}

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

/* ==========================================================================
   Alert System & Strict Empty Suppression (Fixes Pink Bar Artifact!)
   ========================================================================== */

.rser-alert:empty,
#rser-error-box:empty,
#rser-success-box:empty,
.rser-alert-error:empty,
.rser-alert-success:empty,
.rser-alert-warning:empty {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.rser-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.92rem;
    line-height: 1.4;
}

.rser-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rser-alert-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.rser-alert-warning {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    color: #92400e;
}

.rser-alert-success {
    background: transparent;
    border: none;
    padding: 0;
}

/* ==========================================================================
   Stage 3: Processing State Component
   ========================================================================== */

.rser-processing-card {
    padding: 36px 24px;
    text-align: center;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    margin: 10px 0 24px 0;
    animation: rser-fade-in 0.3s ease;
}

@keyframes rser-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.rser-processing-spinner-wrap {
    position: relative;
    width: 68px;
    height: 68px;
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rser-pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(214, 69, 27, 0.12);
    animation: rser-pulse 1.8s ease-out infinite;
}

@keyframes rser-pulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 0.2; }
    100% { transform: scale(1.5); opacity: 0; }
}

.rser-processing-spinner {
    position: absolute;
    width: 58px;
    height: 58px;
    border: 3px solid #f1f5f9;
    border-top-color: #d6451b;
    border-right-color: #10b981;
    border-radius: 50%;
    animation: rser-spin 0.9s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

.rser-processing-icon {
    font-size: 22px;
    z-index: 2;
}

.rser-processing-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.rser-processing-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    max-width: 440px;
    margin: 0 auto 24px auto;
    line-height: 1.5;
}

.rser-processing-progress-bar {
    width: 100%;
    max-width: 320px;
    height: 6px;
    background: #f1f5f9;
    border-radius: 6px;
    margin: 0 auto 24px auto;
    overflow: hidden;
    position: relative;
}

.rser-processing-progress-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, #d6451b, #10b981);
    border-radius: 6px;
    animation: rser-shimmer 1.4s ease-in-out infinite alternate;
}

@keyframes rser-shimmer {
    0% { left: 0%; width: 25%; }
    50% { width: 55%; }
    100% { left: 75%; width: 25%; }
}

.rser-processing-steps {
    display: inline-flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    max-width: 340px;
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 18px;
}

.rser-processing-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.rser-step-done {
    color: #059669;
}

.rser-step-done .rser-step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #10b981;
    color: #ffffff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.rser-step-active {
    color: #d6451b;
}

.rser-step-active .rser-step-icon {
    display: inline-block;
    animation: rser-spin 1s linear infinite;
    font-size: 15px;
}

.rser-step-pending {
    color: #94a3b8;
}

.rser-step-pending .rser-step-icon {
    font-size: 13px;
    opacity: 0.7;
}

/* ==========================================================================
   Stage 4: Admission Pass Card with Instant QR, Downloads & Print
   ========================================================================== */

.rser-success-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
}

.rser-success-badge {
    width: 34px;
    height: 34px;
    background: #10b981;
    color: #ffffff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.rser-success-title {
    margin: 0 0 2px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #065f46;
}

.rser-success-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: #047857;
}

/* Physical-Style Ticket Card */
.rser-ticket-card {
    display: flex;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.rser-ticket-main {
    flex: 1 1 65%;
    padding: 24px 28px;
    background: #ffffff;
}

.rser-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.rser-ticket-brand {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #d6451b;
}

.rser-ticket-type-badge {
    background: #fef2f2;
    color: #d6451b;
    border: 1px solid #fecaca;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.rser-ticket-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1b2430;
    margin: 0 0 14px 0;
    line-height: 1.25;
}

.rser-ticket-attendee {
    margin-bottom: 14px;
}

.rser-ticket-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin-bottom: 3px;
}

.rser-ticket-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.rser-ticket-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.rser-ticket-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
}

.rser-pill-admit {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.rser-pill-paid {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.rser-ticket-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}

.rser-ticket-val {
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
}

.rser-ticket-val code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: #0f172a;
    font-weight: 600;
}

/* Perforated Divider with Circular Notches */
.rser-ticket-divider {
    width: 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.rser-notch {
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    left: 0;
    border: 1px solid #e2e8f0;
}

.rser-notch-top {
    top: -12px;
}

.rser-notch-bottom {
    bottom: -12px;
}

.rser-stitch-line {
    height: 70%;
    border-left: 2px dashed #cbd5e1;
}

/* Ticket Stub / QR Code Panel */
.rser-ticket-stub {
    flex: 0 0 190px;
    background: #fafaf9;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.rser-stub-tag {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #d6451b;
    margin-bottom: 10px;
}

.rser-stub-qr {
    background: #ffffff;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 140px;
    max-height: 140px;
}

.rser-stub-qr svg {
    display: block;
    max-width: 120px;
    max-height: 120px;
    height: auto;
}

.rser-stub-code {
    margin-top: 10px;
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
}

.rser-stub-note {
    font-size: 0.68rem;
    color: #94a3b8;
    margin-top: 3px;
}

/* Ticket Action Buttons */
.rser-ticket-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 16px;
}

.rser-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-family: inherit;
}

.rser-btn-primary {
    background: #d6451b;
    color: #ffffff !important;
}

.rser-btn-primary:hover {
    background: #b53813;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(214, 69, 27, 0.25);
}

.rser-btn-secondary {
    background: #ffffff;
    color: #1e293b !important;
    border-color: #cbd5e1;
}

.rser-btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.rser-btn-print {
    background: #f1f5f9;
    color: #334155;
    border-color: #e2e8f0;
}

.rser-btn-print:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.rser-email-notice {
    font-size: 0.85rem;
    color: #64748b;
    margin: 12px 0 0 0;
    line-height: 1.5;
}

/* ==========================================================================
   Stage 5: Retry Card Component
   ========================================================================== */

.rser-retry-card {
    padding: 24px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    margin-bottom: 24px;
}

.rser-retry-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.rser-retry-icon {
    font-size: 28px;
    color: #d97706;
}

.rser-retry-title {
    margin: 0 0 2px 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #92400e;
}

.rser-retry-sub {
    margin: 0;
    font-size: 0.88rem;
    color: #b45309;
}

.rser-retry-code-box {
    background: #ffffff;
    border: 1px dashed #fcd34d;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #78350f;
    margin-bottom: 12px;
    display: inline-block;
}

.rser-retry-note {
    font-size: 0.85rem;
    color: #92400e;
    margin: 0 0 16px 0;
}

.rser-btn-retry {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    border-color: #b45309 !important;
}

/* Honeypot Hidden */
.rser-hp-wrap {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Responsive Stacking for Small Mobile Screens */
@media (max-width: 680px) {
    .rser-ticket-card {
        flex-direction: column;
    }
    .rser-ticket-divider {
        width: 100%;
        height: 24px;
    }
    .rser-notch-top {
        top: 0;
        left: -12px;
    }
    .rser-notch-bottom {
        bottom: 0;
        left: auto;
        right: -12px;
    }
    .rser-stitch-line {
        width: 80%;
        height: 0;
        border-left: none;
        border-top: 2px dashed #cbd5e1;
    }
    .rser-ticket-stub {
        flex: 1 1 auto;
        padding: 20px;
    }
    .rser-ticket-actions {
        flex-direction: column;
    }
    .rser-btn-action {
        width: 100%;
    }
}

/* ==========================================================================
   SVG Icons & Benefits Section
   ========================================================================== */
.rser-svg {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    display: block;
}

.rser-chip-icon,
.rser-flag,
.rser-btn-lock-icon,
.rser-trust-icon {
    display: inline-flex;
    align-items: center;
}

.rser-chip-icon .rser-svg { width: 16px; height: 16px; color: #d6451b; }
.rser-field-icon { display: flex; align-items: center; }
.rser-field-icon .rser-svg { width: 17px; height: 17px; }
.rser-flag .rser-svg { width: 16px; height: 16px; color: #64748b; }
.rser-btn-lock-icon .rser-svg { width: 18px; height: 18px; }
.rser-trust-icon .rser-svg { width: 15px; height: 15px; color: #0b8a84; }
#rser-btn-text .rser-svg { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; }

.rser-benefits {
    margin: 0 0 24px 0;
    padding: 20px;
    background: #fffaf5;
    border: 1px solid #ffedd5;
    border-radius: 16px;
}

.rser-benefits-title {
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 14px 0;
    letter-spacing: -0.01em;
}

.rser-benefits-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.rser-benefit {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0;
    padding: 0;
}

.rser-benefit-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #fed7aa;
    color: #d6451b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rser-benefit-icon .rser-svg { width: 20px; height: 20px; }

.rser-benefit-body { display: flex; flex-direction: column; gap: 2px; font-size: 0.82rem; line-height: 1.45; color: #475569; }
.rser-benefit-body strong { font-size: 0.9rem; color: #0f172a; }

@media screen and (max-width: 600px) {
    .rser-benefits-grid { grid-template-columns: 1fr; }
}

/* SVG icons inside JS-rendered stages (processing, pass card, alerts) */
.rser-alert-icon,
.rser-retry-icon { display: inline-flex; vertical-align: -3px; }
.rser-alert-icon .rser-svg,
.rser-retry-icon .rser-svg { width: 18px; height: 18px; }
.rser-processing-icon { display: flex; justify-content: center; }
.rser-processing-icon .rser-svg { width: 40px; height: 40px; color: #d6451b; }
.rser-step-icon { display: inline-flex; align-items: center; justify-content: center; }
.rser-step-icon .rser-svg { width: 100%; height: 100%; }
.rser-step-done .rser-step-icon .rser-svg { width: 11px; height: 11px; stroke-width: 3; }
.rser-step-active .rser-step-icon .rser-svg { width: 16px; height: 16px; }
.rser-step-pending .rser-step-icon .rser-svg { width: 14px; height: 14px; }
.rser-success-badge .rser-svg { width: 18px; height: 18px; stroke-width: 3; }
.rser-ticket-pill .rser-svg,
.rser-ticket-val .rser-svg,
.rser-email-notice .rser-svg { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; }
.rser-btn-action .rser-svg { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }

/* ==========================================================================
   Side-by-side layout (desktop): benefits left, form right
   ========================================================================== */
.rser-layout { display: block; }
.rser-main { min-width: 0; }

@media screen and (min-width: 992px) {
    .rser-registration-wrap { max-width: 1100px; }

    .rser-layout {
        display: grid;
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: 32px;
        align-items: start;
    }

    .rser-layout .rser-benefits {
        position: sticky;
        top: 100px;
        margin: 0;
    }

    .rser-layout .rser-benefits-grid { grid-template-columns: 1fr; }

    .rser-layout .rser-pricing-card { margin: 18px 0; padding: 16px 18px; }
    .rser-layout .rser-fields-grid { gap: 14px; margin-bottom: 14px; }
}

@media screen and (min-width: 600px) and (max-width: 991px) {
    .rser-layout .rser-benefits { margin-bottom: 20px; }
}

/* ==========================================================================
   Dark mode (theme toggles html.dark) — keeps every surface and text legible
   ========================================================================== */
html.dark .rser-registration-wrap { color: #ededed; }

html.dark .rser-registration-wrap .rser-card {
    background: #161616;
    border-color: #2a2a2a;
    box-shadow: 0 0 0 1px #2a2a2a, 0 20px 45px -12px rgba(0, 0, 0, 0.7);
}

html.dark .rser-registration-wrap .rser-header-area,
html.dark .rser-registration-wrap .rser-pricing-head,
html.dark .rser-registration-wrap .rser-total-row,
html.dark .rser-registration-wrap .rser-ticket-grid { border-color: #2a2a2a; }

html.dark .rser-registration-wrap .rser-category-pill,
html.dark .rser-registration-wrap .rser-chip-urgent {
    background: rgba(214, 69, 27, 0.16);
    border-color: rgba(214, 69, 27, 0.4);
    color: #ff8a65;
}

html.dark .rser-registration-wrap .rser-title,
html.dark .rser-registration-wrap .rser-benefits-title,
html.dark .rser-registration-wrap .rser-label,
html.dark .rser-registration-wrap .rser-price-val,
html.dark .rser-registration-wrap .rser-total-label,
html.dark .rser-registration-wrap .rser-benefit-body strong,
html.dark .rser-registration-wrap .rser-processing-title,
html.dark .rser-registration-wrap .rser-ticket-title,
html.dark .rser-registration-wrap .rser-ticket-name { color: #ededed; }

html.dark .rser-registration-wrap .rser-meta-chip {
    background: #0f0f0f;
    border-color: #2a2a2a;
    color: #d4d4d4;
}

html.dark .rser-registration-wrap .rser-field-help,
html.dark .rser-registration-wrap .rser-price-label,
html.dark .rser-registration-wrap .rser-pricing-title,
html.dark .rser-registration-wrap .rser-price-row,
html.dark .rser-registration-wrap .rser-checkbox-group,
html.dark .rser-registration-wrap .rser-benefit-body,
html.dark .rser-registration-wrap .rser-benefit-body span,
html.dark .rser-registration-wrap .rser-processing-subtitle,
html.dark .rser-registration-wrap .rser-email-notice,
html.dark .rser-registration-wrap .rser-ticket-val,
html.dark .rser-registration-wrap .rser-stub-code { color: #a1a1a1; }

html.dark .rser-registration-wrap .rser-tax-subnote,
html.dark .rser-registration-wrap .rser-trust-bar,
html.dark .rser-registration-wrap .rser-field-icon,
html.dark .rser-registration-wrap .rser-ticket-label,
html.dark .rser-registration-wrap .rser-stub-note,
html.dark .rser-registration-wrap .rser-step-pending { color: #777; }

html.dark .rser-registration-wrap .rser-trust-sep { color: #3a3a3a; }

html.dark .rser-registration-wrap .rser-select,
html.dark .rser-registration-wrap .rser-phone-group {
    background: #0f0f0f !important;
    border-color: #2a2a2a !important;
    color: #ededed !important;
}

html.dark .rser-registration-wrap .rser-country-addon {
    background: #1c1c1c;
    color: #d4d4d4;
    border-color: #2a2a2a;
}

html.dark .rser-registration-wrap .rser-dial { color: #d4d4d4; }

html.dark .rser-registration-wrap .rser-pricing-card,
html.dark .rser-registration-wrap .rser-processing-steps {
    background: #0f0f0f;
    border-color: #2a2a2a;
}

html.dark .rser-registration-wrap .rser-pricing-badge,
html.dark .rser-registration-wrap .rser-success-banner,
html.dark .rser-registration-wrap .rser-pill-paid {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

html.dark .rser-registration-wrap .rser-success-title,
html.dark .rser-registration-wrap .rser-success-subtitle { color: #34d399; }

html.dark .rser-registration-wrap .rser-checkbox-group a { color: #ff7a4d; }

html.dark .rser-registration-wrap .rser-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

html.dark .rser-registration-wrap .rser-alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fcd34d;
}

/* Benefits panel */
html.dark .rser-registration-wrap .rser-benefits {
    background: #0f0f0f;
    border-color: #2a2a2a;
}

html.dark .rser-registration-wrap .rser-benefit-icon {
    background: rgba(214, 69, 27, 0.14);
    border-color: rgba(214, 69, 27, 0.4);
    color: #ff7a4d;
}

/* Processing + pass card */
html.dark .rser-registration-wrap .rser-processing-card,
html.dark .rser-registration-wrap .rser-ticket-card,
html.dark .rser-registration-wrap .rser-ticket-main,
html.dark .rser-registration-wrap .rser-ticket-divider {
    background: #161616;
    border-color: #2a2a2a;
}

html.dark .rser-registration-wrap .rser-ticket-stub { background: #111111; }
html.dark .rser-registration-wrap .rser-notch { background: #161616; border-color: #2a2a2a; }
html.dark .rser-registration-wrap .rser-stitch-line { border-top-color: #3a3a3a; }
html.dark .rser-registration-wrap .rser-processing-progress-bar,
html.dark .rser-registration-wrap .rser-processing-spinner { background: #2a2a2a; border-color: #2a2a2a; }
html.dark .rser-registration-wrap .rser-processing-spinner { border-top-color: #d6451b; }

html.dark .rser-registration-wrap .rser-ticket-type-badge {
    background: rgba(214, 69, 27, 0.14);
    border-color: rgba(214, 69, 27, 0.4);
}

html.dark .rser-registration-wrap .rser-pill-admit {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

html.dark .rser-registration-wrap .rser-ticket-val code { background: #0f0f0f; color: #ededed; }

/* The QR code must stay on white so phones and scanners can read it */
html.dark .rser-registration-wrap .rser-stub-qr { background: #ffffff; border-color: #2a2a2a; }

html.dark .rser-registration-wrap .rser-btn-secondary {
    background: #161616;
    border-color: #3a3a3a;
    color: #ededed !important;
}

html.dark .rser-registration-wrap .rser-btn-secondary:hover { background: #1f1f1f; border-color: #555; }

html.dark .rser-registration-wrap .rser-btn-print {
    background: #1c1c1c;
    border-color: #2a2a2a;
    color: #d4d4d4;
}

html.dark .rser-registration-wrap .rser-btn-print:hover { background: #262626; color: #ededed; }

html.dark .rser-registration-wrap .rser-retry-card {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.35);
}

html.dark .rser-registration-wrap .rser-retry-title,
html.dark .rser-registration-wrap .rser-retry-note { color: #fcd34d; }
html.dark .rser-registration-wrap .rser-retry-sub { color: #fbbf24; }
html.dark .rser-registration-wrap .rser-retry-code-box { background: #0f0f0f; border-color: rgba(245, 158, 11, 0.5); color: #fde68a; }
