/* ============================================================
   Guest Event Styles
   Extracted from style.css without selector renames.
   ============================================================ */

/* =============================================================================
   GUEST MODE STYLES (Open Day / Demo Access)
   ============================================================================= */

/* Guest mode banner at top of page - Modern & Subtle */
.guest-mode-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #f8f9fa;
    color: #333;
    padding: 0.65rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    z-index: 1100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-bottom: 1px solid #e9ecef;
}

.guest-mode-banner > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guest-mode-banner span:first-child {
    font-weight: 500;
    color: #495057;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.guest-mode-banner span:last-child {
    color: #6c757d;
    font-size: 0.8rem;
}

.guest-mode-banner .guest-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    color: #6c757d;
}

.guest-sign-out-btn {
    background: white;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.guest-sign-out-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.guest-sign-out-btn svg {
    width: 14px;
    height: 14px;
}

/* Shift app-header down when guest banner is shown */
body.guest-mode-active .app-header {
    margin-top: 44px;
}

/* Tab switcher for guest event modal */
.tab-switcher {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-switch-btn {
    padding: 0.65rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

#profile-completion-modal,
#case-type-selection-modal {
    max-width: 425px !important;
}

#edit-name-modal {
    max-width: 340px !important;
}

#change-password-modal {
    max-width: 383px !important;
}

#batch-add-users-modal,
#batch-enrol-users-modal,
#request-extra-info-modal {
    max-width: 510px !important;
}

#guest-event-modal {
    max-width: 935px !important;
}


.tab-switch-btn:hover {
    color: var(--primary-color);
}

.tab-switch-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Event item in manage view */
/* Modern event card design */
.event-item {
    border: none;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.event-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.event-item.expired {
    background: #fafafa;
    opacity: 0.75;
}

.event-item.expired:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.event-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.event-item h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
}

.event-item h4 svg {
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
}

.event-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-status-badge.active {
    background: #d4edda;
    color: #155724;
}

.event-status-badge.upcoming {
    background: #d1ecf1;
    color: #0c5460;
}

.event-status-badge.expired {
    background: #e2e3e5;
    color: #6c757d;
}

.event-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.event-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-meta-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-meta-value {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.event-timestamp {
    font-size: 0.8rem;
    color: #6c757d;
}

.event-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    background: #f8f9fa;
    color: #495057;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.action-btn:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

.action-btn.primary {
    background: #4facfe;
    color: white;
}

.action-btn.primary:hover {
    background: #3a9be8;
}

.action-btn.warning {
    background: #fff3cd;
    color: #856404;
}

.action-btn.warning:hover {
    background: #ffeaa7;
}

.action-btn.secondary {
    background: #e2e3e5;
    color: #6c757d;
}

.action-btn.secondary:hover {
    background: #d3d4d6;
}

.action-btn.danger {
    background: #f8d7da;
    color: #721c24;
}

.action-btn.danger:hover {
    background: #f5c6cb;
}

.event-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.event-section-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-section-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.event-section-dot.active {
    background: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.event-section-dot.upcoming {
    background: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.event-section-dot.expired {
    background: #6c757d;
}

.empty-state, .error-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/* QR code grid for printing */
/* QR Codes tab header */
.qr-codes-header {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.qr-codes-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
}

.qr-codes-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
}

/* QR code grid for viewing */
.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 0;
}

.qr-grid-item {
    border: none;
    padding: 1.25rem;
    text-align: center;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    page-break-inside: avoid;
}

.qr-grid-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.qr-grid-item canvas,
.qr-grid-item img,
.qr-code-canvas img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.qr-grid-item .ticket-id {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #495057;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.qr-grid-item .ticket-id:hover {
    background: #4facfe;
    color: white;
    transform: scale(1.02);
}

/* Print container (hidden by default) */
.qr-print-container {
    display: none;
}

/* Note: Ticket print styles are now managed in template files (templates/tickets/*.html) */

/* Print styles for QR codes */
@media print {
    @page {
        size: A4;
        margin: 0;
    }
    
    body {
        margin: 0;
        padding: 0;
    }
    
    /* When print container exists, hide everything else */
    body:has(.qr-print-container) > *:not(.qr-print-container) {
        display: none !important;
    }
    
    /* Show print container */
    .qr-print-container {
        display: block !important;
    }
    
    /* Hide modals and overlays */
    .modal-backdrop,
    #guest-event-modal-backdrop,
    .modal,
    #guest-event-modal,
    .modal-header,
    .modal-footer,
    .tab-switcher,
    #guest-event-modal-close-btn,
    #guest-event-cancel-btn,
    #guest-event-create-btn {
        display: none !important;
    }
    
    /* Note: Ticket-specific print styles are now in template files */
    
    /* Legacy print styles for old grid view (when not using print container) */
    .qr-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    #create-event-view {
        display: none !important;
    }
    
    #guest-qr-codes-container {
        display: block !important;
    }
}
