/**
 * ticketing.css - Enterprise Ticketing App Styles
 * 
 * Supplements core engine.php styles with:
 * - Shopping cart layouts
 * - Admin panel refinements
 * - Print-friendly ticket design
 * - Responsive enhancements
 */

/* ==========================================================================
   1. SHOPPING CART
   ========================================================================== */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--rule-soft);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-meta {
    font-size: 13px;
    color: var(--ink-3);
}

.cart-item-price {
    font-family: var(--serif-display);
    font-size: 18px;
    font-weight: 600;
    text-align: right;
}

.cart-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.cart-total {
    text-align: right;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--rule);
}

.cart-total-label {
    font-size: 18px;
    color: var(--ink-2);
    margin-bottom: 5px;
}

.cart-total-amount {
    font-family: var(--serif-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--ink);
}

/* Cart Badge (Floating) */
.cart-badge {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: var(--accent);
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif-display);
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    z-index: 9998;
    transition: transform 0.2s;
}

.cart-badge:hover {
    transform: scale(1.1);
}

.cart-badge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--rust-red);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   2. DUAL CURRENCY TOGGLE
   ========================================================================== */
.currency-toggle {
    display: inline-flex;
    gap: 8px;
    background: var(--bg-3);
    padding: 4px;
    border-radius: 999px;
}

.currency-toggle button {
    background: transparent;
    border: none;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.currency-toggle button.active {
    background: var(--bg-2);
    color: var(--accent);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   3. ADMIN PANEL ENHANCEMENTS
   ========================================================================== */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: var(--bg-2);
    border: 1px solid var(--rule-soft);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.admin-stat-value {
    font-family: var(--serif-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 5px;
}

.admin-stat-label {
    font-size: 13px;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table thead {
    background: var(--bg-3);
}

.admin-table th {
    text-align: left;
    padding: 12px 10px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-2);
}

.admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--rule-soft);
}

.admin-table tr:hover {
    background: var(--bg-3);
}

/* ==========================================================================
   4. WAITLIST MODAL
   ========================================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-2);
    padding: 28px;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    border: 1px solid var(--rule-soft);
}

.modal-title {
    font-family: var(--serif-display);
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 10px;
}

.modal-description {
    color: var(--ink-2);
    font-size: 14px;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ==========================================================================
   5. PRINT-FRIENDLY TICKET
   ========================================================================== */
@media print {
    body * {
        visibility: hidden;
    }
    
    #pdf-template, #pdf-template * {
        visibility: visible;
    }
    
    #pdf-template {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    .no-print {
        display: none !important;
    }
}

.ticket-print {
    width: 600px;
    padding: 40px;
    background: #fff;
    color: #000;
    font-family: Helvetica, Arial, sans-serif;
    border: 2px dashed #ccc;
    border-radius: 10px;
}

.ticket-print-header {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.ticket-print-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.ticket-print-code {
    text-align: center;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 20px;
    margin: 20px 0;
}

.ticket-print-code-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.ticket-print-code-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    font-family: 'JetBrains Mono', monospace;
}

.ticket-print-footer {
    font-size: 12px;
    color: #999;
    text-align: center;
}

/* ==========================================================================
   6. RESPONSIVE ENHANCEMENTS
   ========================================================================== */
@media (max-width: 720px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cart-item-price {
        text-align: left;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .ticket-print {
        width: 100%;
        padding: 20px;
    }
}

/* ==========================================================================
   7. UTILITY CLASSES
   ========================================================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }