/* ═══════════════════════════════════════════════════════════════
   OpenTicket Engine — Stitch "Indigo Kinetic" Design System
   Fonts: Manrope (headlines) + Inter (UI)
   Colors: Indigo primary #2b3896 + Sunset orange #fe6f42
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

/* ── Design tokens ─────────────────────────────────────────────── */
:root {
    --ot-primary:                #2b3896;
    --ot-primary-container:      #4551af;
    --ot-on-primary:             #ffffff;
    --ot-secondary-container:    #fe6f42;
    --ot-on-secondary-container: #631800;
    --ot-tertiary:               #004e1c;
    --ot-tertiary-container:     #006928;
    --ot-on-tertiary-container:  #4cef74;
    --ot-error:                  #ba1a1a;
    --ot-error-container:        #ffdad6;
    --ot-on-error-container:     #93000a;
    --ot-background:             #f9f9fc;
    --ot-surface:                #f9f9fc;
    --ot-surface-lowest:         #ffffff;
    --ot-surface-low:            #f3f3f6;
    --ot-surface-container:      #eeeef0;
    --ot-surface-high:           #e8e8ea;
    --ot-surface-highest:        #e2e2e5;
    --ot-on-surface:             #1a1c1e;
    --ot-on-surface-variant:     #454652;
    --ot-outline:                #757684;
    --ot-outline-variant:        #c5c5d4;
    --ot-gradient:               linear-gradient(135deg, #2b3896 0%, #4551af 100%);
    --ot-radius:                 8px;
    --ot-radius-lg:              12px;
    --ot-radius-xl:              16px;
    --ot-font-headline:          'Manrope', system-ui, sans-serif;
    --ot-font-body:              'Inter', system-ui, sans-serif;
}

/* ── Material Icons ─────────────────────────────────────────────── */
.openticket-shop .material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-size: 20px !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* ── Reset scoped to plugin ─────────────────────────────────────── */
.openticket-shop *,
.openticket-shop *::before,
.openticket-shop *::after {
    box-sizing: border-box;
}
.openticket-shop {
    font-family: var(--ot-font-body);
    color: var(--ot-on-surface);
    background: var(--ot-background);
    -webkit-font-smoothing: antialiased;
    max-width: 100%;
}
.openticket-shop ul,
.openticket-shop ol { list-style: none; margin: 0; padding: 0; }
.openticket-shop a { color: var(--ot-primary); text-decoration: none; }
.openticket-shop img { max-width: 100%; height: auto; display: block; }
.openticket-shop svg { max-width: none !important; }
.openticket-shop h1, .openticket-shop h2, .openticket-shop h3,
.openticket-shop h4, .openticket-shop h5 {
    font-family: var(--ot-font-headline);
    color: var(--ot-on-surface);
    margin: 0;
    line-height: 1.1;
}
.openticket-shop p { margin: 0; }
.openticket-shop button { cursor: pointer; font-family: var(--ot-font-body); }

/* ── Glass header ─────────────────────────────────────────────── */
.ot-glass-header {
    background: rgba(249, 249, 252, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

/* ── Signature gradient ─────────────────────────────────────────── */
.ot-gradient { background: var(--ot-gradient) !important; }

/* ── Hero section ─────────────────────────────────────────────── */
.ot-hero {
    padding: 32px 24px 28px;
    background: var(--ot-background);
    position: relative;
    overflow: hidden;
}
.ot-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    background: var(--ot-secondary-container);
    color: var(--ot-on-secondary-container);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 16px;
}
.ot-hero-title {
    font-family: var(--ot-font-headline) !important;
    font-size: clamp(28px, 6vw, 52px) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    line-height: 1 !important;
    color: var(--ot-on-surface) !important;
    margin-bottom: 20px !important;
}
.ot-hero-image {
    width: 100%;
    border-radius: var(--ot-radius-lg);
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}
.ot-hero-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.ot-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.ot-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.ot-meta-icon {
    color: var(--ot-primary);
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}
.ot-meta-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ot-outline);
    display: block;
    margin-bottom: 2px;
}
.ot-meta-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--ot-on-surface);
    display: block;
}
.ot-urgency-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--ot-error-container);
    color: var(--ot-on-error-container);
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    margin-top: 12px;
}

/* ── Layout: 2-col on desktop, 1-col mobile ────────────────────── */
.ot-checkout-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}
@media (min-width: 900px) {
    .ot-checkout-layout {
        grid-template-columns: 1fr 380px;
        gap: 32px;
        padding: 32px 24px;
        align-items: start;
    }
}

/* ── Section ──────────────────────────────────────────────────── */
.ot-section {
    padding: 24px;
    background: var(--ot-surface-low);
    margin-bottom: 8px;
}
@media (min-width: 900px) {
    .ot-section {
        background: transparent;
        padding: 0;
        margin-bottom: 24px;
    }
}
.ot-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ot-outline);
    margin-bottom: 16px;
}

/* ── Ticket type cards ────────────────────────────────────────── */
.ot-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.ot-type-card {
    background: var(--ot-surface-lowest);
    border-radius: var(--ot-radius-lg);
    padding: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: box-shadow .2s;
    position: relative;
}
.ot-type-card:hover { box-shadow: 0 4px 20px rgba(43, 56, 150, .08); }
.ot-type-card.is-sold-out { opacity: .55; }
.ot-type-card.is-vip {
    background: linear-gradient(135deg, #ffffff 0%, rgba(43, 56, 150, .04) 100%);
    border: 1px solid rgba(43, 56, 150, .12);
}

.ot-type-info { flex: 1; }
.ot-type-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--ot-on-surface);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ot-type-desc {
    font-size: 13px;
    color: var(--ot-on-surface-variant);
    line-height: 1.4;
    font-style: italic;
}
.ot-type-price {
    font-size: 22px;
    font-weight: 900;
    color: var(--ot-primary);
    white-space: nowrap;
    margin-right: 16px;
}

/* Status chips */
.ot-chip {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.ot-chip-phase { background: var(--ot-surface-container); color: var(--ot-outline); }
.ot-chip-soldout { background: var(--ot-error-container); color: var(--ot-on-error-container); border-radius: 9999px; }
.ot-chip-free { background: rgba(0, 78, 28, .1); color: var(--ot-tertiary); border-radius: 9999px; }

/* ── Stepper ─────────────────────────────────────────────────── */
.ot-stepper {
    display: flex;
    align-items: center;
    background: var(--ot-surface-low);
    border-radius: var(--ot-radius);
    padding: 4px;
    gap: 0;
}
.ot-step-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--ot-on-surface);
    font-size: 22px;
    transition: background .15s, transform .1s;
    flex-shrink: 0;
}
.ot-step-btn:hover:not(:disabled) { background: var(--ot-surface-highest); }
.ot-step-btn:active:not(:disabled) { transform: scale(.9); }
.ot-step-btn:disabled { opacity: .3; cursor: not-allowed; }
.ot-qty-display {
    width: 48px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--ot-on-surface);
    -moz-appearance: textfield;
    border: none;
    background: transparent;
}
.ot-qty-display::-webkit-outer-spin-button,
.ot-qty-display::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── Order summary sidebar ────────────────────────────────────── */
.ot-summary-sidebar {
    position: sticky;
    top: 24px;
}
.ot-summary-box {
    background: var(--ot-surface-low);
    border-radius: var(--ot-radius-xl);
    padding: 28px;
}
.ot-summary-title {
    font-family: var(--ot-font-headline);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 20px;
    color: var(--ot-on-surface);
}
.ot-summary-lines { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.ot-summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--ot-on-surface-variant);
}
.ot-summary-line strong { color: var(--ot-on-surface); font-weight: 600; }
.ot-summary-line.discount { color: var(--ot-tertiary); font-weight: 600; }
.ot-summary-divider {
    border: none;
    border-top: 2px dashed var(--ot-outline-variant);
    margin: 16px 0;
}
.ot-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}
.ot-summary-total-label {
    font-family: var(--ot-font-headline);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.ot-summary-total-amount {
    font-family: var(--ot-font-headline);
    font-size: 32px;
    font-weight: 900;
    color: var(--ot-primary);
    line-height: 1;
}
.ot-summary-empty {
    text-align: center;
    color: var(--ot-outline);
    font-size: 13px;
    padding: 16px 0;
}

/* ── Coupon ──────────────────────────────────────────────────── */
.ot-coupon-section { margin-bottom: 20px; }
.ot-coupon-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ot-outline);
    display: block;
    margin-bottom: 8px;
}
.ot-coupon-wrap { display: flex; gap: 8px; }
.ot-coupon-input {
    flex: 1;
    background: var(--ot-surface-lowest);
    border: none;
    border-radius: var(--ot-radius);
    padding: 10px 14px;
    font-size: 13px;
    font-family: var(--ot-font-body);
    color: var(--ot-on-surface);
    outline: none;
    transition: box-shadow .2s;
}
.ot-coupon-input:focus { box-shadow: 0 0 0 2px rgba(43, 56, 150, .3); }
.ot-coupon-input::placeholder { color: var(--ot-outline-variant); }
.ot-coupon-btn {
    background: var(--ot-surface-highest);
    border: none;
    border-radius: var(--ot-radius);
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ot-on-surface);
    white-space: nowrap;
    transition: background .15s;
}
.ot-coupon-btn:hover { background: var(--ot-surface-container); }
.ot-coupon-msg {
    font-size: 12px;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: var(--ot-radius);
    display: none;
}
.ot-coupon-msg.success { background: rgba(0, 78, 28, .08); color: var(--ot-tertiary); display: block; }
.ot-coupon-msg.error { background: var(--ot-error-container); color: var(--ot-on-error-container); display: block; }

/* ── Buyer fields ─────────────────────────────────────────────── */
.ot-buyer-section { margin-top: 20px; }
.ot-buyer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 480px) { .ot-buyer-grid { grid-template-columns: 1fr; } }
.ot-field label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ot-outline);
    margin-bottom: 6px;
}
.ot-field input {
    width: 100%;
    background: var(--ot-surface-lowest);
    border: none;
    border-radius: var(--ot-radius);
    padding: 12px 14px;
    font-size: 15px;
    font-family: var(--ot-font-body);
    color: var(--ot-on-surface);
    outline: none;
    transition: box-shadow .2s;
}
.ot-field input:focus { box-shadow: 0 0 0 2px rgba(43, 56, 150, .3); }
.ot-field input::placeholder { color: var(--ot-outline-variant); }

/* ── CTA Button ──────────────────────────────────────────────── */
.openticket-shop .ot-btn-checkout {
    width: 100%;
    background: var(--ot-gradient);
    color: #ffffff !important;
    border: none;
    border-radius: var(--ot-radius-lg);
    padding: 18px 24px;
    font-size: 17px;
    font-weight: 700;
    font-family: var(--ot-font-body);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 8px 24px rgba(43, 56, 150, .25);
    margin-top: 20px;
}
.openticket-shop .ot-btn-checkout:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(43, 56, 150, .3);
}
.openticket-shop .ot-btn-checkout:active:not(:disabled) { transform: scale(.97); }
.openticket-shop .ot-btn-checkout:disabled {
    background: var(--ot-surface-high) !important;
    color: var(--ot-outline) !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

/* ── Security badges ─────────────────────────────────────────── */
.ot-security {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(197, 197, 212, .2);
}
.ot-security-label {
    text-align: center;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--ot-outline);
    margin-bottom: 12px;
}
.ot-security-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.ot-security-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ot-outline);
    border: 1px solid rgba(197, 197, 212, .4);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ── Info notice ─────────────────────────────────────────────── */
.ot-notice {
    background: rgba(255, 219, 208, .4);
    border-radius: var(--ot-radius);
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: var(--ot-on-surface-variant);
    line-height: 1.5;
    margin-top: 12px;
}

/* ── Thank you page ──────────────────────────────────────────── */
.ot-thankyou-wrap {
    background: var(--ot-background);
    min-height: 60vh;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}
.ot-thankyou-wrap::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 40%;
    height: 40%;
    background: rgba(43, 56, 150, .05);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}
.ot-thankyou-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 700px) {
    .ot-thankyou-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}
.ot-thankyou-success h1 {
    font-size: clamp(28px, 5vw, 42px) !important;
    letter-spacing: -.02em !important;
    margin-bottom: 12px !important;
}
.ot-thankyou-steps {
    background: var(--ot-surface-low);
    border-radius: var(--ot-radius-xl);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.ot-thankyou-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.ot-thankyou-step-icon {
    font-size: 28px !important;
    color: var(--ot-primary);
    flex-shrink: 0;
    margin-top: 2px;
}
.ot-thankyou-step h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}
.ot-thankyou-step p {
    font-size: 14px;
    color: var(--ot-on-surface-variant);
    line-height: 1.5;
}
.ot-order-card {
    background: var(--ot-surface-lowest);
    border-radius: var(--ot-radius-xl);
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(26, 28, 30, .06);
}
.ot-order-card-hero {
    height: 140px;
    background: var(--ot-primary);
    position: relative;
    overflow: hidden;
}
.ot-order-card-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.5), transparent);
}
.ot-order-card-confirmed {
    position: absolute;
    bottom: 12px;
    left: 16px;
    z-index: 1;
    background: var(--ot-secondary-container);
    color: var(--ot-on-secondary-container);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: 3px 10px;
    border-radius: 4px;
}
.ot-order-card-body { padding: 24px; }
.ot-order-ref-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--ot-outline);
    display: block;
    margin-bottom: 4px;
}
.ot-order-ref-number {
    font-family: var(--ot-font-headline);
    font-size: 22px;
    font-weight: 800;
    color: var(--ot-on-surface);
    display: block;
    margin-bottom: 20px;
}
.ot-order-lines { display: flex; flex-direction: column; gap: 0; }
.ot-order-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--ot-surface-low);
    font-size: 14px;
}
.ot-order-line:last-child { border-bottom: none; }
.ot-order-line-name { font-weight: 600; }
.ot-order-line-sub { font-size: 12px; color: var(--ot-outline); display: block; }
.ot-order-total-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 16px;
    border-top: 2px dashed var(--ot-surface-high);
    margin-top: 8px;
}
.ot-order-total-label {
    font-family: var(--ot-font-headline);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.ot-order-total-amount {
    font-family: var(--ot-font-headline);
    font-size: 26px;
    font-weight: 900;
    color: var(--ot-primary);
}
.ot-verified {
    background: rgba(0, 78, 28, .06);
    border-radius: var(--ot-radius);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ot-tertiary);
    margin-top: 16px;
}
.openticket-shop .ot-btn-return {
    width: 100%;
    background: var(--ot-gradient);
    color: #ffffff !important;
    border: none;
    border-radius: var(--ot-radius-lg);
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    box-shadow: 0 6px 20px rgba(43, 56, 150, .25);
    transition: transform .15s;
    text-decoration: none;
}
.openticket-shop .ot-btn-return:hover { transform: translateY(-1px); color: #ffffff !important; }
.ot-btn-print {
    width: 100%;
    background: transparent;
    color: var(--ot-on-surface);
    border: none;
    border-radius: var(--ot-radius-lg);
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    transition: background .15s;
}
.ot-btn-print:hover { background: var(--ot-surface-low); }

/* ── Sold out / Waitlist ──────────────────────────────────────── */
.ot-soldout-box {
    padding: 48px 24px;
    text-align: center;
    background: var(--ot-background);
}
.ot-soldout-icon { font-size: 48px; display: block; margin-bottom: 12px; }

/* ── Error ────────────────────────────────────────────────────── */
.ot-error {
    background: var(--ot-error-container);
    color: var(--ot-on-error-container);
    padding: 14px 16px;
    border-radius: var(--ot-radius);
    font-size: 14px;
}

/* ── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ot-hero { padding: 20px 16px; }
    .ot-type-card { flex-wrap: wrap; }
    .ot-type-price { font-size: 18px; margin-right: 8px; }
    .ot-summary-box { border-radius: 0; margin: 0 -16px; }
}
