/* ─── Ticket Card — Boarding Pass Design ──────────────────────────────────── */

.cdt-tickets-section {
    /* margin: 24px 0; */
}

.cdt-tickets-heading {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,.07);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cdt-product-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #9ca3af;
    margin: 0 0 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cdt-tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* ── Ticket Card ──────────────────────────────────────────────────────────── */

.cdt-ticket {
    background: #ffffff;
    border-radius: 16px;
    overflow: visible;
    box-shadow: 0 2px 16px rgba(0,0,0,.09), 0 0 0 1px rgba(0,0,0,.05);
    transition: transform .2s ease, box-shadow .2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
}

.cdt-ticket:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.05);
}

.cdt-ticket.is-used,
.cdt-ticket.is-cancelled {
    opacity: .6;
}

.cdt-ticket.is-used:hover,
.cdt-ticket.is-cancelled:hover {
    transform: none;
    box-shadow: 0 2px 16px rgba(0,0,0,.09), 0 0 0 1px rgba(0,0,0,.05);
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.cdt-ticket-header {
    height: 130px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    background-size: cover;
    background-position: center;
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
}

.cdt-ticket-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.08) 0%, rgba(0,0,0,.60) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px 16px;
}

.cdt-ticket-eyebrow {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,.7);
    margin-bottom: 5px;
}

.cdt-ticket-event-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,.35);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ── Details strip ────────────────────────────────────────────────────────── */

.cdt-ticket-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid rgba(0,0,0,.06);
    gap: 0 12px;
}

.cdt-detail-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 3px;
}

.cdt-detail-value {
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Perforation divider ──────────────────────────────────────────────────── */

.cdt-ticket-perf {
    position: relative;
    padding: 0 20px;
    margin: 0;
}

.cdt-perf-line {
    border-top: 2px dashed rgba(0,0,0,.09);
}

.cdt-ticket-perf::before,
.cdt-ticket-perf::after {
    content: '';
    position: absolute;
    top: -9px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f3f4f6;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.07);
    z-index: 1;
}

.cdt-ticket-perf::before { left: -9px; }
.cdt-ticket-perf::after  { right: -9px; }

/* ── Stub / QR area ───────────────────────────────────────────────────────── */

.cdt-ticket-stub {
    padding: 16px;
    text-align: center;
}

.cdt-qr-img {
    width: 140px;
    height: 140px;
    display: block;
    margin: 0 auto 12px;
    border-radius: 6px;
    image-rendering: pixelated;
}

.cdt-qr-img.is-muted {
    filter: grayscale(1) opacity(.4);
}

.cdt-ticket-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #374151;
    margin-bottom: 10px;
    word-break: break-all;
}

/* ── Entry progress ───────────────────────────────────────────────────────── */

.cdt-entry-info {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 6px;
}

.cdt-entry-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 99px;
    margin: 0 auto 10px;
    width: 80px;
    overflow: hidden;
}

.cdt-entry-bar-fill {
    height: 100%;
    background: #4f46e5;
    border-radius: 99px;
    transition: width .4s ease;
}

.cdt-entry-bar-fill.is-done {
    background: #9ca3af;
}

/* ── Status badge ─────────────────────────────────────────────────────────── */

.cdt-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    padding: 4px 14px;
    border-radius: 99px;
}

.cdt-status-valid     { background: #ecfdf5; color: #065f46; }
.cdt-status-exhausted { background: #f3f4f6; color: #4b5563; }
.cdt-status-cancelled { background: #fef2f2; color: #991b1b; }

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 540px) {
    .cdt-tickets-grid {
        grid-template-columns: 1fr;
    }
}
