.fooevents-scanner-wrap {
    background: #f5f5f5;
    padding: 20px;
    min-height: 100vh;
}

/* Frontend styles */
.fooevents-scanner-wrap h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.fooevents-scanner-error {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.fooevents-scanner-error p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.fooevents-scanner-error .button {
    background: #0073aa;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
}

/* Fullscreen mode */
.scanner-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: #f5f5f5;
    overflow-y: auto;
}

.scanner-fullscreen h1 {
    padding-top: 20px;
}

.scanner-container {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.scanner-left {
    flex: 1;
    max-width: 640px;
}

.scanner-right {
    flex: 1;
    max-width: 500px;
}

/* Cámara */
.camera-container {
    position: relative;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    aspect-ratio: 16 / 9;
    max-height: 480px;
}

#scanner-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-frame {
    width: min(300px, 60%);
    height: min(300px, 60%);
    border: 3px solid #00ff00;
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { border-color: #00ff00; }
    50% { border-color: #00cc00; }
}

/* Controles */
.scanner-controls {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.scanner-controls button {
    flex: 1;
    min-width: 150px;
}

.scanner-controls .dashicons {
    margin-right: 5px;
}

#camera-select {
    flex: 1;
    padding: 8px;
    font-size: 14px;
    border-radius: 4px;
}

/* Estado del scanner */
.scanner-status {
    margin-top: 20px;
}

#scanner-message {
    display: none;
    padding: 15px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

#scanner-message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

#scanner-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

#scanner-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffeaa7;
}

#scanner-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
}

/* Panel de información del ticket */
.ticket-info-panel {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 400px;
}

.ticket-info-panel h2 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.ticket-info-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #999;
    font-style: italic;
}

.ticket-details {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.ticket-header h3 {
    margin: 0;
    font-size: 18px;
    color: #0073aa;
    flex: 1;
}

.ticket-status {
    padding: 8px 16px;
    border-radius: 20px;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    white-space: nowrap;
}

.ticket-field {
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
}

.ticket-field label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.ticket-field strong {
    font-size: 16px;
    color: #333;
}

.ticket-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.btn-checkin {
    width: 100%;
    padding: 15px !important;
    font-size: 16px !important;
    font-weight: bold !important;
}

.btn-checkin .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.already-checked-in {
    opacity: 0.7;
}

/* Estadísticas */
.stats-panel {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.stats-panel h3 {
    margin-top: 0;
    font-size: 16px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

#checkin-stats {
    display: grid;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 5px;
    border-left: 4px solid #0073aa;
}

.stat-label {
    font-weight: 600;
    color: #666;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #0073aa;
}

/* Últimos check-ins */
.recent-checkins {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.recent-checkins h3 {
    margin-top: 0;
    font-size: 16px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 8px;
    background: #f9f9f9;
    border-radius: 5px;
    border-left: 3px solid #28a745;
}

.recent-name {
    font-weight: 600;
    color: #333;
}

.recent-time {
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1200px) {
    .scanner-container {
        flex-direction: column;
    }
    
    .scanner-left,
    .scanner-right {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .camera-container {
        max-height: 400px;
    }
    
    .scanner-frame {
        width: min(250px, 70%);
        height: min(250px, 70%);
    }
    
    .scanner-controls button {
        min-width: 100%;
    }
    
    .ticket-header {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .camera-container {
        max-height: 300px;
    }
    
    .scanner-frame {
        width: min(200px, 80%);
        height: min(200px, 80%);
    }
}

/* Animaciones adicionales */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.notice {
    animation: fadeIn 0.3s ease-in;
}
