/* Global Styles */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

/* Section 6: Viewport Height Management for Validation Page */
.container.validation-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 40px);
}

.validation-page main {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    color: #2d3748;
    margin-bottom: 10px;
    text-align: center;
}

h2 {
    font-size: 1.75rem;
    color: #2d3748;
    margin-bottom: 10px;
}

h3 {
    font-size: 1.25rem;
    color: #4a5568;
    margin-bottom: 15px;
}

.subtitle {
    text-align: center;
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Header */
header {
    margin-bottom: 40px;
}

/* Validation Page Header Override */
.validation-page header {
    margin-bottom: 10px !important;
    padding: 0 !important;
    border: none !important;
}

.validation-page header h1 {
    font-size: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: normal !important;
    text-align: left;
}

/* Validation Page Footer Override */
.validation-page footer {
    display: none;
}

.success-icon {
    font-size: 4rem;
    text-align: center;
    color: #48bb78;
    margin-bottom: 20px;
}

/* Message Area */
#message-area {
    margin-bottom: 20px;
}

.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.message.success {
    background-color: #c6f6d5;
    border: 1px solid #48bb78;
    color: #22543d;
}

.message.error {
    background-color: #fed7d7;
    border: 1px solid #f56565;
    color: #742a2a;
}

.message.info {
    background-color: #bee3f8;
    border: 1px solid #4299e1;
    color: #2c5282;
}

/* Ticket Cards */
.ticket-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.ticket-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
    position: relative;
}

.ticket-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.ticket-card.featured {
    border-color: #667eea;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.ticket-header {
    text-align: center;
    margin-bottom: 20px;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin: 10px 0;
}

.description {
    text-align: center;
    color: #718096;
    margin-bottom: 20px;
}

.features {
    list-style: none;
    margin-bottom: 25px;
}

.features li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #4a5568;
}

.features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: 700;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 15px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #4a5568;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.1);
}

.quantity-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.quantity-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f7fafc;
}

.quantity-display {
    min-width: 40px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

/* Ticket Display (Success Page) */
.ticket-display {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
}

.ticket-code-box {
    margin-bottom: 20px;
}

.ticket-code {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    background: white;
    padding: 20px;
    border: 3px dashed #667eea;
    border-radius: 8px;
    margin: 20px 0;
    letter-spacing: 2px;
    color: #2d3748;
}

.ticket-note {
    color: #718096;
    font-style: italic;
    margin-top: 10px;
}

.ticket-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.ticket-details p {
    margin: 10px 0;
    color: #4a5568;
}

.success-message {
    color: #22543d;
    font-weight: 600;
}

.info-message {
    color: #2c5282;
}

.loading {
    font-size: 1.2rem;
    color: #718096;
    padding: 40px;
}

.ticket-code-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.qr-code-image {
    max-width: 250px;
    width: 100%;
    height: auto;
    border: 3px solid #667eea;
    border-radius: 12px;
    background: white;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ticket-code-text {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

/* Instructions */
.instructions {
    background: #edf2f7;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.instructions ol {
    margin-left: 20px;
}

.instructions li {
    margin: 15px 0;
    color: #4a5568;
}

.instructions strong {
    color: #2d3748;
}

/* Actions */
.actions {
    text-align: center;
}

/* Validation Form */
.validation-form {
    max-width: 500px;
    margin: 0 auto 40px;
}

/* Section 1: Validation Grid Container */
.validation-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

/* Section 2: Scanner Area Styling */
.scanner-area {
    order: 2;
}

.scanner-area .qr-scanner-section {
    max-width: 100%;
    margin: 0;
}

/* Section 3: Results Area Styling */
.results-area {
    order: 1;
}

.results-area .scan-status-bar {
    font-size: 1rem;
    padding: 10px 14px;
    max-width: 100%;
}

.results-area .scan-status-bar .status-icon {
    font-size: 1.5rem;
}

.results-area .scan-status-bar .quantity-badge,
.results-area .scan-status-bar .re-entry-badge,
.results-area .scan-status-bar .welcome-badge,
.results-area .scan-status-bar .venue-badge {
    font-size: 0.85rem;
    padding: 4px 10px;
}

.results-area .validation-details-container {
    max-width: 100%;
}

/* Section 8: Visual Hierarchy Enhancements - Results Area */
.results-area .validation-details-full .quantity-callout {
    font-size: 1rem;
}

.results-area .validation-details-full .quantity-callout .quantity-icon {
    font-size: 1.4rem;
}

.results-area .validation-details-full .token-callout {
    font-size: 1rem;
    background: #fff3cd;
    border-left-color: #ffc107;
}

.results-area .validation-details-full .token-callout .token-icon {
    font-size: 1.4rem;
}

.results-area .validation-details-full .re-entry-callout .staff-prompt {
    font-size: 0.95rem;
}

.results-area .validation-details-full .message-callout {
    font-size: 1.05rem;
}

/* QR Scanner Section */
.qr-scanner-section {
    max-width: 500px;
    margin: 0 auto 8px;
    text-align: center;
}

.qr-scanner-container {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 8px;
    max-height: 600px;
    opacity: 1;
    transition: all 0.3s ease;
}

.qr-scanner-container h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.qr-reader-wrapper {
    position: relative;
    margin: 8px auto;
    max-width: 100%;
}

#qr-reader {
    border: 3px solid #667eea;
    border-radius: 12px;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stop-scanner-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 100;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 1rem;
    font-weight: 600;
    background: rgba(226, 232, 240, 0.95);
    color: #2d3748;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.stop-scanner-overlay:hover {
    background: rgba(203, 213, 224, 0.98);
    transform: scale(1.05);
}

.stop-scanner-overlay:active {
    transform: scale(0.98);
}

.stop-scanner-overlay.hidden {
    display: none;
}

.scanner-controls {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    justify-content: center;
}

.scanner-controls .btn {
    flex: 1;
    max-width: 200px;
}

.scanner-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    min-height: 20px;
    transition: all 0.3s ease;
}

.scanner-status:not(:empty) {
    background: #bee3f8;
    border: 1px solid #4299e1;
    color: #2c5282;
}

.scanner-status.scanner-success {
    background: #c6f6d5;
    border: 1px solid #48bb78;
    color: #22543d;
}

.scanner-status.scanner-error {
    background: #fed7d7;
    border: 1px solid #f56565;
    color: #742a2a;
}

/* Section 5: Manual Entry Section Hidden by Default */
.manual-entry-section {
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
    transition: all 0.3s ease;
    max-height: 0;
    opacity: 0;
}

.manual-entry-section.visible {
    max-height: 400px;
    opacity: 1;
    margin: 8px auto;
}

.scanner-divider {
    text-align: center;
    margin: 8px 0;
    position: relative;
    color: #a0aec0;
    font-weight: 600;
}

.scanner-divider::before,
.scanner-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
}

.scanner-divider::before {
    left: 0;
}

.scanner-divider::after {
    right: 0;
}

/* Controls Row for Toggle Buttons */
.controls-row {
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: space-between;
    align-items: stretch;
    margin: 8px auto;
    max-width: 100%;
}

.controls-row > button {
    flex: 1 1 calc(50% - 4px);
    min-height: 44px;
    max-width: none;
}

/* Responsive: Stack buttons on tiny screens */
@media (max-width: 320px) {
    .controls-row {
        flex-direction: column;
    }
    
    .controls-row > button {
        flex: 1 1 auto;
    }
}

.hidden {
    display: none !important;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.3s ease;
    font-family: 'Courier New', monospace;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
}

/* Validation Results */
.validation-results {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.validation-results.hidden {
    display: none;
}

.validation-results.valid {
    background: #c6f6d5;
    border: 3px solid #48bb78;
}

.validation-results.invalid {
    background: #fed7d7;
    border: 3px solid #f56565;
}

/* Inline result header container */
.result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.result-icon {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.result-icon.valid {
    color: #22543d;
}

.result-icon.invalid {
    color: #742a2a;
}

.result-title {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
}

.result-title.valid {
    color: #22543d;
}

.result-title.invalid {
    color: #742a2a;
}

.result-details {
    background: white;
    padding: 12px;
    border-radius: 8px;
    margin-top: 8px;
    text-align: left;
}

.result-details p {
    margin: 4px 0;
    color: #4a5568;
    font-size: clamp(0.85rem, 1.5vw, 0.9rem);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.result-details strong {
    color: #2d3748;
}

.result-reason {
    font-size: 1.1rem;
    color: #742a2a;
    font-weight: 600;
    margin: 15px 0;
}

/* Compact Callout Styles */
.validation-details-full .re-entry-callout,
.validation-details-full .welcome-callout,
.validation-details-full .token-callout,
.validation-details-full .message-callout {
    padding: 8px 12px;
    margin: 8px 0;
    font-size: 0.9rem;
    line-height: 1.3;
}

.validation-details-full .re-entry-callout .re-entry-header,
.validation-details-full .welcome-callout .welcome-header {
    font-size: 0.9rem;
}

.validation-details-full .token-callout .token-icon,
.validation-details-full .re-entry-callout .re-entry-icon,
.validation-details-full .welcome-callout .welcome-icon {
    font-size: 1.1rem;
}

/* Compact Status Bar Styles */
.scan-status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 8px auto;
    max-width: 600px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.scan-status-bar.status-valid {
    background: #c6f6d5;
    border: 2px solid #48bb78;
}

.scan-status-bar.status-invalid {
    background: #fed7d7;
    border: 2px solid #f56565;
}

.scan-status-bar .status-icon {
    font-size: 1.2rem;
    font-weight: 700;
}

.scan-status-bar.status-valid .status-icon {
    color: #22543d;
}

.scan-status-bar.status-invalid .status-icon {
    color: #742a2a;
}

.scan-status-bar .status-label {
    font-weight: 600;
    color: #4a5568;
}

.scan-status-bar .status-ticket {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #2d3748;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scan-status-bar .status-text {
    flex: 1;
    color: #2d3748;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scan-status-bar .status-timestamp {
    font-size: 0.85rem;
    color: #718096;
    margin-left: auto;
}

/* Collapsible Full Details Section */
.validation-details-container {
    max-width: 600px;
    margin: 8px auto;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f7fafc;
    overflow: hidden;
    transition: all 0.3s ease;
}

.toggle-details-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #edf2f7;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #4a5568;
    text-align: left;
    transition: background 0.3s ease;
}

.toggle-details-btn:hover {
    background: #e2e8f0;
}

.toggle-details-btn:active {
    background: #cbd5e0;
}

.validation-details-full {
    padding: 12px;
    background: white;
    max-height: 200px;
    overflow-y: auto;
    transition: max-height 0.3s ease, padding 0.3s ease;
    position: relative;
}

.validation-details-full::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.05));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.validation-details-full.has-overflow::after {
    opacity: 1;
}

.validation-details-container.collapsed .validation-details-full {
    max-height: 0;
    padding: 0 20px;
    overflow: hidden;
}

/* Section 4: Recent Scans Section with Collapsible Functionality */
.recent-scans-section {
    max-width: 100%;
    margin: 8px auto;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f7fafc;
    overflow: hidden;
}

.toggle-section-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: #edf2f7;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
    text-align: left;
    transition: background 0.3s ease;
    min-height: 44px;
}

.toggle-section-btn:hover {
    background: #e2e8f0;
}

.toggle-section-btn:active {
    background: #cbd5e0;
}

.toggle-section-btn .toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.toggle-section-btn[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

/* Scan History List Styles */
.scan-history-container {
    padding: 20px;
    background: white;
    max-height: 400px;
    overflow-y: auto;
    opacity: 1;
    transition: all 0.3s ease;
}

.scan-history-container.collapsed {
    max-height: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
}

.scan-history-container h3 {
    font-size: 1.25rem;
    color: #2d3748;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.scan-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

.scan-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
    transition: background 0.2s ease;
    border-left: 3px solid transparent;
}

.scan-history-item:hover {
    background: #edf2f7;
}

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

.scan-history-item.valid {
    border-left-color: #48bb78;
}

.scan-history-item.invalid {
    border-left-color: #f56565;
}

.scan-history-item .history-icon {
    font-size: 1.2rem;
    font-weight: 700;
}

.scan-history-item.valid .history-icon {
    color: #22543d;
}

.scan-history-item.invalid .history-icon {
    color: #742a2a;
}

.scan-history-item .history-ticket {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #2d3748;
    flex: 1;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scan-history-item .history-timestamp {
    font-size: 0.85rem;
    color: #718096;
    margin-left: auto;
}

.scan-history-empty {
    text-align: center;
    color: #a0aec0;
    padding: 20px;
    font-style: italic;
}

/* Footer */
footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.staff-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.staff-link:hover {
    text-decoration: underline;
}

.small-text {
    font-size: 0.9rem;
    color: #a0aec0;
    margin-top: 10px;
}

/* Section 7: Responsive Breakpoints - Tablet/Desktop (768px+) */
@media (min-width: 768px) {
    /* Validation page header tablet/desktop override */
    .validation-page header {
        margin-bottom: 10px !important;
    }
    
    .validation-page header h1 {
        font-size: 12px !important;
    }
    
    /* Validation Grid Layout */
    .validation-grid-container {
        grid-template-columns: 60% 40%;
        gap: 8px;
        grid-template-areas: "results scanner";
    }
    
    .scanner-area {
        grid-area: scanner;
        order: 2;
    }
    
    .results-area {
        grid-area: results;
        order: 1;
    }
    
    .scanner-area .qr-scanner-section {
        max-width: 100%;
    }
    
    .scanner-area #qr-reader {
        max-width: 350px;
    }
    
    .validation-details-full {
        padding: 12px;
        max-height: 180px;
    }
    
    .results-area .scan-status-bar {
        font-size: 1.1rem;
        padding: 14px 18px;
    }
    
    .results-area .scan-status-bar .status-icon {
        font-size: 1.8rem;
    }
    
    .results-area .scan-status-bar .quantity-badge,
    .results-area .scan-status-bar .re-entry-badge,
    .results-area .scan-status-bar .welcome-badge,
    .results-area .scan-status-bar .venue-badge {
        font-size: 0.9rem;
        padding: 5px 12px;
    }
    
    /* Viewport Height Management */
    .validation-page main {
        overflow-y: auto;
    }
    
    .container.validation-page {
        overflow-y: auto;
    }
}

/* Section 7: Responsive Breakpoints - Desktop (1024px+) */
@media (min-width: 1024px) {
    .validation-grid-container {
        gap: 8px;
    }
    
    .scanner-area #qr-reader {
        max-width: 400px;
    }
    
    .validation-details-full {
        max-height: 700px;
    }
}

/* Section 7: Responsive Breakpoints - Mobile Portrait (default) */
/* Responsive Design */
@media (max-width: 767px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2rem;
    }
    
    /* Validation page header mobile override */
    .validation-page header {
        margin-bottom: 8px !important;
    }
    
    .validation-page header h1 {
        font-size: 12px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .ticket-cards {
        grid-template-columns: 1fr;
    }

    .form-actions {
        grid-template-columns: 1fr;
    }

    .price {
        font-size: 2rem;
    }

    .ticket-code {
        font-size: 1.5rem;
        padding: 15px;
    }

    .ticket-code-container {
        flex-direction: column;
    }

    .qr-code-image {
        max-width: 200px;
    }

    .ticket-code-text {
        width: 100%;
    }
    
    /* Mobile validation grid adjustments */
    .validation-grid-container {
        grid-template-columns: 1fr;
    }
    
    .results-area {
        order: 1;
    }
    
    .scanner-area {
        order: 2;
    }
    
    .validation-page main {
        overflow-y: auto;
    }
    
    .results-area .scan-status-bar .status-icon {
        font-size: 1.5rem;
    }
    
    .results-area .scan-status-bar {
        font-size: 1rem;
    }

    /* Quantity selector mobile optimization */
    .quantity-btn {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }

    .quantity-display {
        min-width: 50px;
        font-size: 1.4rem;
    }

    .quantity-selector {
        gap: 20px;
        margin-top: 25px;
        margin-bottom: 20px;
    }

    .qr-scanner-container {
        padding: 20px;
    }

    #qr-reader {
        max-width: 100%;
    }

    .scanner-controls {
        flex-direction: column;
        gap: 10px;
    }

    .scanner-controls .btn {
        max-width: 100%;
    }
    
    .stop-scanner-overlay {
        top: 8px;
        right: 8px;
        padding: 8px 12px;
        font-size: 0.9rem;
        min-height: 40px;
    }

    .scanner-divider::before,
    .scanner-divider::after {
        width: 35%;
    }

    /* Responsive adjustments for new continuous scanning UI */
    .scan-status-bar {
        flex-wrap: wrap;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .scan-status-bar .status-label {
        flex-basis: 100%;
        margin-bottom: 5px;
    }

    .scan-status-bar .status-timestamp {
        margin-left: 0;
    }

    .toggle-details-btn {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .validation-details-full {
        padding: 12px;
        max-height: 200px;
    }

    .scan-history-container {
        padding: 12px;
    }

    .scan-history-list {
        max-height: 250px;
    }

    .scan-history-item {
        min-height: 44px;
        padding: 12px 10px;
        font-size: 0.85rem;
    }
    
    /* Mobile-specific adjustments for status bar and history */
    .scan-status-bar {
        padding: 10px 12px;
        font-size: 0.85rem;
        gap: 8px;
    }
    
    .scan-status-bar .status-ticket {
        max-width: 150px;
    }
    
    .scan-status-bar .status-text {
        max-width: 180px;
    }
    
    .scan-status-bar .status-timestamp {
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    
    .scan-history-item {
        padding: 8px 10px;
        font-size: 0.85rem;
        gap: 8px;
    }
    
    .scan-history-item .history-ticket {
        max-width: 120px;
    }
    
    .scan-history-item .history-timestamp {
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    
    /* Step 16: Mobile modal adjustments */
    .scan-details-modal .modal-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 8px;
    }
    
    .scan-details-modal .modal-header {
        padding: 16px;
    }
    
    .scan-details-modal .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .scan-details-modal .modal-body {
        padding: 16px;
        font-size: 0.95rem;
    }
    
    .scan-details-modal .modal-footer {
        padding: 12px 16px;
    }
    
    .scan-details-modal .modal-close-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Step 17: Mobile status bar adjustments */
    .scan-status-bar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }
    
    .scan-status-bar .quantity-badge,
    .scan-status-bar .re-entry-badge,
    .scan-status-bar .welcome-badge,
    .scan-status-bar .venue-badge {
        font-size: 0.8rem;
        padding: 3px 8px;
    }
    
    /* Step 18: Mobile history item adjustments */
    .scan-history-item {
        padding: 12px 10px;
        min-height: 44px;
    }
    
    .scan-history-item .view-details-hint {
        opacity: 1;
    }
    
    .scan-history-item .quantity-indicator,
    .scan-history-item .re-entry-indicator {
        font-size: 0.7rem;
    }
    
    /* Step 19: Mobile validation details adjustments */
    .validation-details-full .quantity-callout,
    .validation-details-full .re-entry-callout,
    .validation-details-full .welcome-callout,
    .validation-details-full .message-callout,
    .validation-details-full .token-callout {
        padding: 10px;
        font-size: 1rem;
    }
    
    .validation-details-full .token-callout strong {
        font-size: 1.1rem;
    }
    
    .validation-details-full .welcome-callout {
        font-size: 0.95rem;
        margin-bottom: 16px;
    }
    
    .validation-details-full .welcome-callout .welcome-header {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .validation-details-full .welcome-callout .first-visit-info {
        font-size: 0.9rem;
    }
    
    .validation-details-full .re-entry-callout .staff-prompt {
        font-size: 0.95rem;
        padding: 10px;
    }
}

/* Extra-small screen adjustments (phones in portrait) */
@media (max-width: 480px) {
    .scan-status-bar {
        flex-wrap: wrap;
    }
    
    .scan-status-bar .status-ticket {
        max-width: calc(100% - 40px);
        flex-basis: 100%;
    }
    
    .scan-history-item .history-ticket {
        max-width: 100px;
    }
    
    .scan-history-item .history-timestamp {
        font-size: 0.7rem;
    }
}

/* Mobile/iPad Touch Optimizations */
.btn-large {
    min-height: 56px;
    font-size: 1.2rem;
    padding: 16px 32px;
    font-weight: 600;
}

.validation-page.container .btn {
    min-height: 52px;
    font-size: 1.1rem;
}

.validation-page.container input {
    min-height: 56px;
    font-size: 1.2rem;
    padding: 16px;
}

/* Austin Aquarium Specific Styles */

/* Hero Section Styles */
.hero-section {
    background: linear-gradient(135deg, #0077be 0%, #00a8e8 100%);
    padding: 60px 20px;
    text-align: center;
    margin: -40px -40px 40px -40px;
    border-radius: 16px 16px 0 0;
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    font-weight: 400;
}

.hero-section .btn {
    padding: 16px 40px;
    font-size: 1.2rem;
    margin-top: 10px;
    background: white;
    color: #0077be;
    font-weight: 700;
}

.hero-section .btn:hover {
    background: #f7fafc;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.hero-cta {
    display: inline-block;
}

/* Exhibits Grid Styles */
.exhibits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.exhibit-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #e2e8f0;
}

.exhibit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #00a8e8;
}

.exhibit-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.exhibit-name {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 600;
}

.exhibit-description {
    font-size: 1rem;
    color: #718096;
    line-height: 1.6;
}

/* Info Section Styles */
.info-section {
    padding: 40px;
    background-color: #f7fafc;
    border-radius: 12px;
    margin: 60px 0;
}

.info-section h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #2d3748;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.info-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.info-value {
    color: #4a5568;
    line-height: 1.8;
}

.info-value p {
    margin: 10px 0;
}

.info-value strong {
    color: #2d3748;
}

/* Quick Info Box (for buy page) */
.quick-info-box {
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    border: 2px solid #cbd5e0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.info-compact {
    font-size: 0.95rem;
    line-height: 1.8;
}

.info-compact p {
    margin: 10px 0;
    color: #4a5568;
}

.info-compact strong {
    color: #2d3748;
}

/* Value Note / Callout */
.value-note {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 600;
    color: #92400e;
    font-size: 0.95rem;
    text-align: center;
}

.info-callout {
    background-color: #dbeafe;
    border-left: 4px solid #3b82f6;
    padding: 15px 25px;
    border-radius: 8px;
    margin: 30px auto;
    font-weight: 600;
    color: #1e40af;
    font-size: 1.1rem;
    text-align: center;
    max-width: 600px;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #4a5568;
}

/* Content Block */
.content-block {
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 0 20px;
    text-align: center;
}

.content-block p {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #4a5568;
}

/* Pricing Preview */
.pricing-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 30px 0;
    text-align: center;
}

.pricing-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
}

.pricing-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.pricing-item.featured-pricing {
    border-color: #667eea;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    position: relative;
}

.featured-pricing .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
}

.pricing-item h3 {
    color: #2d3748;
    margin-bottom: 15px;
}

.pricing-item .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin: 15px 0;
}

.pricing-item p {
    color: #718096;
    margin: 10px 0;
}

/* Section Spacing - Scoped to Austin Pages */
.austin-page section {
    margin-bottom: 60px;
}

.austin-page section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #2d3748;
}

/* Mobile Responsive Additions for Austin Pages */
@media (max-width: 768px) {
    .hero-section {
        margin: -20px -20px 30px -20px;
        padding: 40px 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-section .btn {
        padding: 14px 30px;
        font-size: 1.1rem;
    }

    .exhibits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .info-section {
        padding: 25px 20px;
        margin: 40px 0;
    }

    .trust-badges {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .content-block {
        padding: 0 10px;
        margin-bottom: 40px;
    }

    .pricing-preview {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .austin-page section {
        margin-bottom: 40px;
    }

    .austin-page section h2 {
        font-size: 1.75rem;
        margin-bottom: 30px;
    }

    .quick-info-box {
        padding: 20px;
    }

    .info-compact {
        font-size: 0.9rem;
    }
}

/* Upsell Modal Styles */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: auto;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Container */
.modal-container {
    background: white;
    max-width: 600px;
    width: 90%;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 40px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

/* Modal Header */
.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 700;
}

.modal-header p {
    font-size: 1.1rem;
    color: #718096;
    line-height: 1.6;
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #a0aec0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

/* Modal Content */
.modal-content {
    margin-bottom: 30px;
}

/* Comparison Section */
.upsell-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 25px 0;
}

.comparison-card {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.comparison-card.highlighted {
    border-color: #667eea;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    position: relative;
}

.comparison-card.highlighted::before {
    content: "Recommended";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.comparison-card h3 {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 10px;
}

.comparison-card .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin: 15px 0;
}

.comparison-card .features {
    list-style: none;
    text-align: left;
    margin-top: 15px;
    font-size: 0.95rem;
}

.comparison-card .features li {
    padding: 6px 0;
    padding-left: 25px;
    position: relative;
    color: #4a5568;
}

.comparison-card .features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: 700;
}

/* Value Highlight */
.upsell-highlight {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    font-weight: 600;
    color: #92400e;
    font-size: 1.05rem;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.modal-actions .btn {
    flex: 1;
    padding: 14px 25px;
    font-size: 1.05rem;
}

/* Body Scroll Lock */
body.modal-open {
    position: fixed;
    width: 100%;
    top: 0;
    overflow: hidden;
}

/* Animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile Responsive for Modal */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        padding: 30px 20px;
        max-width: none;
    }

    .modal-header h2 {
        font-size: 1.6rem;
    }

    .modal-header p {
        font-size: 1rem;
    }

    .upsell-comparison {
        grid-template-columns: 1fr;
    }

    .comparison-card {
        padding: 20px;
    }

    .comparison-card .price {
        font-size: 2rem;
    }

    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }

    /* Mobile-specific modal enhancements */
    .modal-overlay {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .modal-container {
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Validation page specific mobile rules */
    .validation-page.container {
        padding: 15px;
    }

    .validation-page.container h1 {
        font-size: 1.8rem;
    }

    .validation-page.container .subtitle {
        font-size: 1rem;
    }

    .validation-form {
        max-width: 100%;
    }

    .qr-scanner-section {
        max-width: 100%;
    }

    /* Auth overlay mobile */
    .auth-form-container {
        padding: 30px 20px;
        width: 95%;
    }

    .auth-form-container h2 {
        font-size: 1.5rem;
    }

    .auth-form-container input {
        font-size: 1.3rem;
    }
}

/* Token Modal Styles */
.token-options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 25px 0;
    max-height: 400px;
    overflow-y: auto;
}

.token-card {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.token-card:hover {
    transform: translateY(-3px);
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
    background: white;
}

.token-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.token-card.selected .token-price {
    color: white;
}

.token-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.token-quantity {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.token-card.selected .token-quantity {
    color: white;
}

.token-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: #667eea;
    margin: 10px 0;
}

.token-description {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 8px;
}

.token-card.selected .token-description {
    color: rgba(255, 255, 255, 0.9);
}

.token-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    color: #667eea;
}

.token-success-message {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    font-weight: 600;
    color: #065f46;
    font-size: 1.1rem;
}

.token-icon {
    font-size: 1.5rem;
    margin-right: 8px;
}

/* Mobile responsive adjustments for token modal */
@media (max-width: 768px) {
    .token-options-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-height: 300px;
    }
    
    .token-card {
        padding: 15px 10px;
    }
    
    .token-quantity {
        font-size: 1.4rem;
    }
    
    .token-price {
        font-size: 1.2rem;
    }
    
    .token-description {
        font-size: 0.75rem;
    }
}

/* Print styles for token modal */
@media print {
    #token-modal {
        display: none !important;
    }
}

/* Scan Details Modal Styles */
.scan-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scan-details-modal.hidden {
    display: none;
}

.scan-details-modal .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.scan-details-modal .modal-content {
    position: relative;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 10001;
    animation: modalFadeIn 0.3s ease-out;
}

.scan-details-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e2e8f0;
    background: #f7fafc;
}

.scan-details-modal .modal-header h2 {
    font-size: 1.5rem;
    color: #2d3748;
    margin: 0;
}

.scan-details-modal .modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scan-details-modal .modal-close-btn:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.scan-details-modal .modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(85vh - 140px);
}

.scan-details-modal .modal-body p {
    margin: 12px 0;
    color: #4a5568;
    line-height: 1.6;
}

.scan-details-modal .modal-body strong {
    color: #2d3748;
    font-weight: 600;
}

.scan-details-modal .modal-body .detail-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.scan-details-modal .modal-body .detail-section:last-child {
    border-bottom: none;
}

.scan-details-modal .quantity-info {
    background: #e6fffa;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #38b2ac;
    margin-bottom: 20px;
}

.scan-details-modal .quantity-info strong {
    color: #234e52;
}

.scan-details-modal .re-entry-info {
    background: #ebf8ff;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #4299e1;
    margin-bottom: 20px;
}

.scan-details-modal .re-entry-info strong {
    color: #2c5282;
}

.scan-details-modal .re-entry-info .staff-prompt {
    font-weight: 700;
    color: #2c5282;
    margin-top: 8px;
    font-size: 1.05rem;
}

/* Welcome Info Styles for Modal (Multi-Day Return) */
.scan-details-modal .welcome-info {
    background: #e6ffed;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    margin-bottom: 20px;
}

.scan-details-modal .welcome-info strong {
    color: #155724;
}

/* Comment 1: Scan history detail section styling */
.scan-details-modal .scan-history-detail {
    background: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #a0aec0;
}

.scan-details-modal .scan-history-timestamps {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.scan-details-modal .scan-history-timestamps li {
    padding: 8px 0;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.95rem;
}

.scan-details-modal .scan-history-timestamps li:last-child {
    border-bottom: none;
}

.scan-details-modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f7fafc;
    text-align: right;
}

.scan-details-modal .status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.scan-details-modal .status-badge.valid {
    background: #c6f6d5;
    color: #22543d;
    border: 2px solid #48bb78;
}

.scan-details-modal .status-badge.invalid {
    background: #fed7d7;
    color: #742a2a;
    border: 2px solid #f56565;
}

/* Quantity Callout Box Styles */
.validation-details-full .quantity-callout {
    background: #e6fffa;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #38b2ac;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.validation-details-full .quantity-callout strong {
    color: #234e52;
    font-size: 1.05rem;
}

.validation-details-full .quantity-callout .quantity-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

/* Re-entry Callout Box Styles */
.validation-details-full .re-entry-callout {
    background: #ebf8ff;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #4299e1;
    margin-bottom: 12px;
}

.validation-details-full .re-entry-callout .re-entry-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2c5282;
    margin-bottom: 8px;
}

.validation-details-full .re-entry-callout .first-entry-time {
    color: #2c5282;
    font-weight: 600;
    margin-bottom: 8px;
}

.validation-details-full .re-entry-callout .staff-prompt {
    background: #bee3f8;
    padding: 12px;
    border-radius: 6px;
    font-weight: 700;
    color: #2c5282;
    margin-top: 12px;
    font-size: 0.9rem;
}

/* Welcome Callout Box Styles (Multi-Day Return) */
.validation-details-full .welcome-callout {
    background: #e6ffed;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.validation-details-full .welcome-callout .welcome-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: #155724;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.validation-details-full .welcome-callout .first-visit-info {
    color: #155724;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.validation-details-full .welcome-callout div {
    color: #155724;
    line-height: 1.5;
    margin: 4px 0;
}

/* Message Callout Box Styles */
.validation-details-full .message-callout {
    background: #faf5ff;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #9f7aea;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #44337a;
}

/* Token Callout Box Styles */
.validation-details-full .token-callout {
    background: #fff5e6;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.validation-details-full .token-callout .token-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

.validation-details-full .token-callout strong {
    color: #92400e;
    font-size: 1.05rem;
    display: block;
    margin-bottom: 8px;
}

.validation-details-full .token-callout div {
    color: #78350f;
    line-height: 1.5;
    margin: 4px 0;
}

/* Quantity Badge Styles for Status Bar */
.scan-status-bar .quantity-badge {
    display: inline-flex;
    align-items: center;
    background: #e6fffa;
    color: #234e52;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid #38b2ac;
}

.scan-status-bar .quantity-badge .quantity-icon {
    margin-right: 4px;
    font-size: 1rem;
}

/* Re-entry Badge Styles for Status Bar */
.scan-status-bar .re-entry-badge {
    display: inline-flex;
    align-items: center;
    background: #ebf8ff;
    color: #2c5282;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid #4299e1;
}

.scan-status-bar .re-entry-badge .re-entry-icon {
    margin-right: 4px;
    font-size: 1rem;
}

/* Welcome Badge Styles for Status Bar (Multi-Day Return) */
.scan-status-bar .welcome-badge {
    display: inline-flex;
    align-items: center;
    background: #d4edda;
    color: #155724;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid #28a745;
}

.scan-status-bar .welcome-badge .welcome-icon {
    margin-right: 4px;
    font-size: 1rem;
}

/* Venue Badge Styles for Status Bar (Venue Identification) */
.scan-status-bar .venue-badge {
    display: inline-flex;
    align-items: center;
    background: #fef3c7;
    color: #78350f;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid #f59e0b;
}

.scan-status-bar .venue-badge .venue-icon {
    margin-right: 4px;
    font-size: 1rem;
}

/* Clickable History Item Styles */
.scan-history-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

.scan-history-item:hover {
    background: #edf2f7;
    transform: scale(1.02);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scan-history-item:active {
    transform: scale(0.98);
}

/* Quantity Indicator in History Items */
.scan-history-item .quantity-indicator {
    display: inline-block;
    background: #e6fffa;
    color: #234e52;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
}

/* Re-entry Indicator in History Items */
.scan-history-item .re-entry-indicator {
    display: inline-block;
    background: #ebf8ff;
    color: #2c5282;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 4px;
}

/* View Details Hint */
.scan-history-item .view-details-hint {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.scan-history-item:hover .view-details-hint {
    opacity: 1;
}

/* Modal Animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Body Scroll Lock for Modal */
body.modal-open {
    overflow: hidden;
}

/* iOS-specific fixes for modal */
@supports (-webkit-touch-callout: none) {
    .modal-overlay.active {
        position: fixed;
        -webkit-overflow-scrolling: touch;
    }
}

/* Section 7: Landscape Orientation Support (max-height: 600px) */
@media (max-height: 600px) and (orientation: landscape) {
    .auth-overlay {
        overflow-y: auto;
    }

    .auth-form-container {
        padding: 20px;
        margin: 20px auto;
    }

    .qr-scanner-container {
        max-height: 400px;
    }

    .validation-results {
        padding: 20px;
    }
    
    /* Allow scrolling on very short screens */
    .validation-page main {
        overflow-y: auto !important;
    }
    
    .validation-grid-container {
        margin-bottom: 8px;
    }
    
    .results-area .scan-status-bar {
        padding: 8px 12px;
    }
}

/* Section 10: Print Styles Update */
@media print {
    .auth-overlay {
        display: none;
    }

    .qr-scanner-section {
        display: none;
    }
    
    /* Hide scanner area entirely */
    .scanner-area {
        display: none !important;
    }
    
    /* Show results area at full width */
    .results-area {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Expand collapsible sections if they contain data */
    .recent-scans-section,
    .manual-entry-section {
        max-height: none !important;
        opacity: 1 !important;
    }
    
    .scan-history-container.collapsed {
        max-height: none !important;
        padding: 20px !important;
        opacity: 1 !important;
    }

    .validation-results {
        display: block;
    }

    .btn,
    button {
        display: none;
    }

    footer {
        display: none;
    }
    
    /* Step 23: Add print styles for modal */
    .scan-details-modal {
        display: none;
    }
}

/* Staff Authentication Overlay Styles */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.auth-overlay.hidden {
    display: none;
}

.auth-form-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.auth-form-container h2 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 20px;
}

.auth-form-container input {
    width: 100%;
    min-height: 56px;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 4px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
}

.auth-form-container .btn {
    width: 100%;
    min-height: 56px;
    font-size: 1.2rem;
}

.auth-error {
    background: #fed7d7;
    border: 1px solid #f56565;
    color: #742a2a;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.95rem;
}

.auth-error.hidden {
    display: none;
}

/* Offline Indicator Styles */
.offline-badge {
    background: #fed7d7;
    border: 2px solid #f56565;
    color: #742a2a;
    padding: 6px 12px;
    border-radius: 8px;
    margin: 8px 0;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    animation: pulse 2s infinite;
}

.offline-badge.hidden {
    display: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* QR Scanner Mobile Optimization */
#qr-reader {
    min-height: 300px;
    aspect-ratio: 1;
}

.scanner-controls .btn {
    min-height: 52px;
    font-size: 1.1rem;
}

/* Validation Results Mobile Optimization */
.validation-results {
    padding: 24px 16px;
    font-size: 1.1rem;
}

.result-icon {
    font-size: 3.5rem;
}

.result-title {
    font-size: 1.75rem;
    font-weight: 800;
}

.result-details p {
    font-size: 1.1rem;
    margin: 12px 0;
}

/* Focus Styles for Accessibility */
button:focus-visible,
input:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.btn:focus-visible {
    transform: scale(1.02);
}

/* Step 22: Add focus styles for modal elements */
.scan-details-modal .modal-close-btn:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.scan-history-item:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* PWA Install Hint Styles */
.install-hint {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    padding: 12px 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #1e40af;
    text-align: center;
}

.install-hint.hidden {
    display: none;
}

/* ============================================
   QR CODE ADMIN INTERFACE STYLES
   ============================================ */

/* QR Code Card Grid */
.qr-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

/* QR Code Card */
.qr-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.qr-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.qr-card-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
}

.qr-card-title {
    font-size: 1.5rem;
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 10px;
}

.qr-card-url {
    font-size: 0.9rem;
    color: #718096;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    background: #f7fafc;
    padding: 8px;
    border-radius: 4px;
}

.qr-card-description {
    margin: 20px 0;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
}

.qr-card-description p {
    margin: 8px 0;
}

/* QR Code Preview */
.qr-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    min-height: 300px;
    background: #f7fafc;
    border-radius: 8px;
    padding: 20px;
}

.qr-preview img {
    max-width: 100%;
    height: auto;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.qr-preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #a0aec0;
}

/* Download Buttons */
.download-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.download-buttons .btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-download-png {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-download-png:hover {
    background: linear-gradient(135deg, #5568d3 0%, #66428e 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-download-pdf {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-download-pdf:hover {
    background: linear-gradient(135deg, #e07fe5 0%, #e24458 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

/* Size Selector */
.size-selector {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.size-selector label {
    font-weight: 600;
    color: #4a5568;
}

.size-selector select,
.size-select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    background: white;
    color: #2d3748;
    transition: border-color 0.3s ease;
}

.size-selector select:focus,
.size-select:focus {
    border-color: #667eea;
    outline: none;
}

/* Placement Recommendations */
.placement-recommendations {
    background: #f7fafc;
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
}

.placement-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
}

.placement-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.placement-icon {
    font-size: 2.5rem;
    min-width: 60px;
    text-align: center;
}

.placement-details {
    flex: 1;
}

.placement-location {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.placement-size {
    font-size: 0.95rem;
    color: #718096;
    margin-bottom: 8px;
    font-weight: 600;
}

.placement-description {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.6;
}

.placement-tips {
    font-size: 0.9rem;
    color: #718096;
    margin-top: 8px;
    font-style: italic;
}

/* Print Specifications */
.print-specs {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.specs-table th {
    background: #667eea;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.specs-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

.specs-table tr:nth-child(even) {
    background: #f7fafc;
}

.specs-table tr:hover {
    background: #edf2f7;
}

/* Usage Instructions */
.usage-instructions {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
    border-left: 4px solid #667eea;
}

.instruction-step {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.step-number {
    background: #667eea;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.6;
}

.tips-list {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.tips-list h3 {
    margin-top: 0;
}

.tips-list li {
    margin-bottom: 10px;
    color: #92400e;
}

/* Testing Section */
.testing-section {
    background: #dbeafe;
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
    border-left: 4px solid #3b82f6;
}

.testing-checklist {
    list-style: none;
    margin-top: 15px;
    padding-left: 0;
}

.testing-checklist li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: #1e40af;
}

.testing-checklist li::before {
    content: '☑';
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

/* Responsive Design for QR Code Interface */
@media (max-width: 768px) {
    .qr-card-grid {
        grid-template-columns: 1fr;
    }

    .download-buttons {
        flex-direction: column;
    }

    .download-buttons .btn {
        width: 100%;
    }

    .placement-item {
        flex-direction: column;
        text-align: center;
    }

    .placement-icon {
        margin-bottom: 15px;
    }

    .specs-table {
        font-size: 0.9rem;
        display: block;
        overflow-x: auto;
    }

    .instruction-step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin: 0 auto 10px;
    }
}

/* Print Styles for QR Code Interface */
@media print {
    .dashboard-header,
    .logout-link,
    .download-buttons,
    .testing-section,
    .usage-instructions {
        display: none;
    }

    .qr-preview {
        background: white;
    }

    .qr-card {
        page-break-inside: avoid;
        border: 2px solid #000;
    }

    .specs-table {
        page-break-inside: avoid;
    }
}

