/* 🎟️ PULSAR TICKET SYSTEM STYLES v2.0 */

/* Painel Meus Ingressos */
.tickets-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    padding: 24px;
}

.ticket-card {
    background: linear-gradient(135deg, rgba(142, 45, 226, 0.1), rgba(255, 20, 147, 0.05));
    border: 2px solid rgba(142, 45, 226, 0.3);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.ticket-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8E2DE2, #FF1493, #00FFFF);
}

.ticket-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(142, 45, 226, 0.4);
    border-color: rgba(142, 45, 226, 0.6);
}

.ticket-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.ticket-event {
    font-size: 1.2rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    flex: 1;
}

.ticket-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
}

.ticket-status.active {
    background: rgba(0, 255, 0, 0.2);
    color: #00FF00;
    border: 1px solid rgba(0, 255, 0, 0.5);
}

.ticket-status.used {
    background: rgba(128, 128, 128, 0.2);
    color: #888;
}

.ticket-status.expired {
    background: rgba(255, 165, 0, 0.2);
    color: #FFA500;
}

.ticket-status.cancelled {
    background: rgba(255, 0, 0, 0.2);
    color: #FF0000;
}

.ticket-body {
    display: flex;
    gap: 20px;
    padding: 24px;
}

.ticket-qr {
    flex-shrink: 0;
}

.qr-code-img {
    width: 150px;
    height: 150px;
    border: 3px solid rgba(142, 45, 226, 0.5);
    border-radius: 12px;
    background: #FFFFFF;
    padding: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.ticket-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.ticket-info p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.ticket-info strong {
    color: #FFFFFF;
    font-weight: 600;
    margin-right: 8px;
}

.ticket-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.ticket-actions button {
    flex: 1;
    padding: 12px;
    border: 2px solid rgba(142, 45, 226, 0.5);
    background: rgba(142, 45, 226, 0.2);
    color: #FFFFFF;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ticket-actions button:hover {
    background: rgba(142, 45, 226, 0.4);
    border-color: rgba(142, 45, 226, 0.8);
    transform: translateY(-2px);
}

/* Scanner de QR Code */
.qr-scanner {
    max-width: 500px;
    margin: 0 auto;
    padding: 24px;
    text-align: center;
}

.scanner-frame {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 24px;
    border: 3px solid rgba(142, 45, 226, 0.5);
    border-radius: 16px;
    overflow: hidden;
    background: #000;
}

#scanner-video {
    width: 100%;
    height: auto;
    display: block;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.scanner-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00FFFF, transparent);
    box-shadow: 0 0 10px #00FFFF;
    animation: scannerMove 2s linear infinite;
}

@keyframes scannerMove {
    0%, 100% { transform: translateY(-100px); }
    50% { transform: translateY(100px); }
}

.scanner-hint {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    font-size: 1rem;
}

.qr-upload {
    margin-top: 24px;
}

.btn-upload,
.btn-cancel {
    padding: 14px 32px;
    border: 2px solid rgba(142, 45, 226, 0.5);
    background: rgba(142, 45, 226, 0.2);
    color: #FFFFFF;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin: 0 8px;
}

.btn-upload:hover,
.btn-cancel:hover {
    background: rgba(142, 45, 226, 0.4);
    border-color: rgba(142, 45, 226, 0.8);
    transform: translateY(-2px);
}

/* Estados vazios e erros */
.empty-state,
.error-state {
    text-align: center;
    padding: 60px 24px;
    color: rgba(255, 255, 255, 0.7);
}

.empty-icon,
.error-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
}

.empty-state h3,
.error-state h3 {
    color: #FFFFFF;
    margin-bottom: 12px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* Mobile */
@media (max-width: 768px) {
    .tickets-container {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }
    
    .ticket-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .ticket-actions {
        flex-direction: column;
    }
    
    .qr-code-img {
        width: 120px;
        height: 120px;
    }
}

/* Animações */
@keyframes ticketAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ticket-card {
    animation: ticketAppear 0.5s ease-out forwards;
}

.ticket-card:nth-child(2) { animation-delay: 0.1s; }
.ticket-card:nth-child(3) { animation-delay: 0.2s; }
.ticket-card:nth-child(4) { animation-delay: 0.3s; }
