/* ==========================================================================
   Eventigo Enterprise - Mobile App-Like PWA Stylesheet
   Specific styling for 360px - 768px viewports
   ========================================================================== */

/* Safe Area Inset Support for Modern Notches & Home Indicators */
.safe-top {
    padding-top: max(16px, env(safe-area-inset-top));
}

.safe-bottom {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.safe-bottom-nav-spacing {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

.safe-bottom-sticky-cta {
    bottom: max(16px, env(safe-area-inset-bottom));
}

/* Fixed Mobile App Top Header */
.mobile-app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(11, 15, 25, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: env(safe-area-inset-top);
}

/* Fixed Mobile App Bottom Navigation Bar */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(15, 21, 37, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(64px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: #94a3b8;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    gap: 3px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
    -webkit-user-select: none;
    user-select: none;
}

.mobile-nav-item.active {
    color: #818cf8;
}

.mobile-nav-item.active .nav-icon-wrapper {
    transform: translateY(-2px);
    color: #818cf8;
}

.mobile-nav-item .nav-icon-wrapper {
    transition: transform 0.2s ease;
}

/* Horizontal Touch Carousels */
.horizontal-carousel {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 4px 16px 16px 16px;
    margin: 0 -16px;
    scrollbar-width: none;
}

.horizontal-carousel::-webkit-scrollbar {
    display: none;
}

.carousel-card-lg {
    flex: 0 0 280px;
    scroll-snap-align: start;
}

.carousel-card-sm {
    flex: 0 0 160px;
    scroll-snap-align: start;
}

.category-chip-carousel {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 16px 12px 16px;
    margin: 0 -16px;
    scrollbar-width: none;
}
.category-chip-carousel::-webkit-scrollbar {
    display: none;
}

/* Native Slide-Up Bottom Sheet */
.bottom-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-sheet-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.bottom-sheet-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 101;
    background: #131b2e;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.6);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.bottom-sheet-panel.active {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 44px;
    height: 5px;
    background: #475569;
    border-radius: 999px;
    margin: 12px auto 8px auto;
    cursor: grab;
}

/* Digital Boarding Pass Passbook Design */
.digital-ticket-pass {
    background: #151d32;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.6);
}

.digital-ticket-pass::before,
.digital-ticket-pass::after {
    content: '';
    position: absolute;
    top: 60%;
    width: 24px;
    height: 24px;
    background: #090d16;
    border-radius: 50%;
    z-index: 10;
}

.digital-ticket-pass::before {
    left: -12px;
    box-shadow: inset -2px 0 0 rgba(255, 255, 255, 0.08);
}

.digital-ticket-pass::after {
    right: -12px;
    box-shadow: inset 2px 0 0 rgba(255, 255, 255, 0.08);
}

.perforated-line {
    border-top: 2px dashed rgba(255, 255, 255, 0.15);
    margin: 18px 0;
    position: relative;
}

/* Touch-Friendly Seat Grid Map */
.seat-grid-container {
    overflow: auto;
    touch-action: pan-x pan-y pinch-zoom;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    background: #0d1322;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    user-select: none;
    -webkit-user-select: none;
}

.seat-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.15s ease;
    cursor: pointer;
}

.seat-available {
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.seat-available:hover, .seat-available:active {
    background: #334155;
    color: #f8fafc;
    transform: scale(1.08);
}

.seat-selected {
    background: #6366f1;
    color: #ffffff;
    border: 1px solid #818cf8;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
    transform: scale(1.08);
}

.seat-held {
    background: #475569;
    color: #94a3b8;
    opacity: 0.5;
    cursor: not-allowed;
}

.seat-sold {
    background: #182030;
    color: #475569;
    cursor: not-allowed;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.seat-vip {
    border: 1.5px solid #eab308;
    color: #fde047;
}

/* Sticky Booking Action Bar */
.sticky-booking-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 45;
    background: rgba(15, 21, 37, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 18px max(14px, env(safe-area-inset-bottom)) 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Camera Scanner Reticle & Laser */
.scanner-viewfinder {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 20px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65);
    border: 2px solid rgba(255, 255, 255, 0.4);
    overflow: hidden;
}

.scanner-laser {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #22c55e, #4ade80, transparent);
    box-shadow: 0 0 14px #22c55e;
    animation: scanLaser 2s infinite ease-in-out;
}

@keyframes scanLaser {
    0% { top: 5%; opacity: 0.2; }
    50% { top: 90%; opacity: 1; }
    100% { top: 5%; opacity: 0.2; }
}
