/* Modern Premium Event & Ticket Design System */

:root {
    --ticket-bg: #ffffff;
    --ticket-text: #07683a;
    --ticket-accent: #36B37E;
    --ticket-accent-soft: rgba(54, 179, 126, 0.1);
    --ticket-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25), 0 18px 36px -18px rgba(0, 0, 0, 0.3);
}

/* Modal Overlay Styling */
.glass-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 30, 16, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
    /* Enable scroll on overlay if content is too tall */
}

.glass-modal-container {
    width: 100%;
    max-width: 480px;
    margin: auto;
    /* Center when content is short, allow scroll when tall */
    padding: 20px 0;
}

/* Ticket Container Animation */
.ticket-wrapper {
    width: 100%;
    max-width: 480px;
    animation: ticketSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ticketSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* The Ticket Itself */
.premium-ticket {
    background: var(--ticket-bg);
    border-radius: 32px;
    overflow: hidden;
    color: var(--ticket-text);
    box-shadow: var(--ticket-shadow);
    position: relative;
}

/* Top Section: Header */
.ticket-header {
    background: #07683a;
    /* Deeper Dark Blue */
    padding: 32px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.ticket-header .brand-logo {
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1.5px;
}

.ticket-header .status-badge {
    background: var(--ticket-accent-soft);
    color: var(--ticket-accent);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 1px solid rgba(54, 179, 126, 0.3);
    box-shadow: 0 0 12px rgba(54, 179, 126, 0.2);
}

/* Middle Section: Main Content */
.ticket-main {
    padding: 40px;
    position: relative;
}

/* Perforation Line Effect */
.ticket-perforation {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0;
}

.ticket-perforation .dot {
    width: 16px;
    height: 16px;
    background: #050B14;
    /* Matches deep dark blue */
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ticket-perforation .dot-left {
    margin-left: -47px;
}

.ticket-perforation .dot-right {
    margin-right: -47px;
}

.ticket-perforation .dash-line {
    flex-grow: 1;
    height: 1px;
    border-top: 2px dashed #E2E8F0;
}

/* Info Layout */
.ticket-info-group {
    margin-bottom: 32px;
}

.ticket-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    display: block;
}

.ticket-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    color: #0F172A;
    margin: 0;
}

.ticket-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.detail-item .value {
    font-size: 16px;
    font-weight: 700;
    color: #1E293B;
}

.detail-item .value.code {
    font-family: 'JetBrains Mono', monospace;
    color: #07683a;
    font-size: 14px;
}

/* QR Centerpiece */
.ticket-qr-section {
    background: #F8FAFC;
    border-radius: 24px;
    padding: 32px;
    text-align: center;
    border: 1px solid #F1F5F9;
}

.qr-box {
    background: #fff;
    padding: 16px;
    border-radius: 16px;
    display: inline-block;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
}

.ticket-qr-section .qr-hint {
    font-size: 10px;
    font-weight: 700;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Attendee Footer */
.ticket-attendee {
    display: flex;
    align-items: center;
    gap: 16px;
}

.attendee-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #07683a 0%, #054d2b 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.attendee-info .name {
    font-size: 18px;
    font-weight: 800;
    color: #0F172A;
    margin: 0;
}

/* Action Buttons */
.ticket-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.btn-ticket-primary {
    flex: 1;
    background: var(--ticket-accent);
    color: #fff;
    padding: 18px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -10px rgba(54, 179, 126, 0.5);
}

.btn-ticket-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -10px rgba(54, 179, 126, 0.6);
}

.btn-ticket-secondary {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 18px 24px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-ticket-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.event-link:disabled,
.event-link.registered {
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: none !important;
}

.event-link.registered {
    color: var(--ticket-accent) !important;
    font-weight: 700;
}

/* Loading State */
.event-link.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
    color: transparent !important;
}

.event-link.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid rgba(10, 22, 40, 0.2);
    border-top-color: #0A1628;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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