/* mobile-offcanvas-cart.css - Off-canvas side cart for mobile */

/* Only show on mobile devices */
@media (max-width: 768px) {
    
    /* ===== OFF-CANVAS TRIGGER BUTTON ===== */
    .mobile-cart-trigger {
        position: fixed;
        right: 0;
        top: 30%;
        transform: translateY(-50%);
        background: #08605F;
        color: white;
        padding: 12px 8px;
        border-radius: 8px 0 0 8px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
        z-index: 10001; /* Higher than mobile flight app */
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        font-family: 'Barlow', sans-serif;
        min-height: 100px;
        justify-content: center;
    }

    /* Adjust position when mobile flight app is active */
    body.mobile-flight-app-active .mobile-cart-trigger {
        top: 20%;
        background: #025b4e;
        box-shadow: -2px 0 15px rgba(0, 0, 0, 0.4);
    }

    .mobile-cart-trigger:hover {
        padding-right: 12px;
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.3);
    }

    .mobile-cart-trigger.has-items {
        animation: pulse-trigger 2s infinite;
    }

    @keyframes pulse-trigger {
        0%, 100% { 
            background: #08605F; 
        }
        50% { 
            background: #0a7573; 
        }
    }

    /* Special pulse when flight app is active */
    body.mobile-flight-app-active .mobile-cart-trigger.has-items {
        animation: pulse-trigger-active 2s infinite;
    }

    @keyframes pulse-trigger-active {
        0%, 100% { 
            background: #025b4e; 
        }
        50% { 
            background: #08605F; 
        }
    }

    .mobile-cart-trigger-icon {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-cart-trigger-text {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 1px;
        text-transform: uppercase;
    }

    .mobile-cart-trigger-badge {
        position: absolute;
        top: 8px;
        left: 8px;
        background: #dc3545;
        color: white;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        font-weight: bold;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    /* ===== OFF-CANVAS CONTAINER ===== */
    .mobile-offcanvas-cart {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        background: #1E2B34;
        z-index: 10002; /* Higher than mobile flight app */
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        display: flex;
        flex-direction: column;
        font-family: 'Barlow', sans-serif;
    }

    .mobile-offcanvas-cart.active {
        right: 0;
    }

    /* ===== OVERLAY ===== */
    .mobile-offcanvas-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 10000; /* Higher than mobile flight app */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-offcanvas-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* ===== OFF-CANVAS HEADER ===== */
    .mobile-offcanvas-header {
        background: #08605F;
        padding: 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-offcanvas-title {
        font-family: 'Barlow' !important;
        color: white !important;
        font-size: 18px !important;
        font-weight: 800 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        margin: 0 !important;
    }

    .mobile-offcanvas-close {
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.3);
        color: white;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-offcanvas-close:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: rotate(90deg);
    }

    /* ===== OFF-CANVAS CONTENT ===== */
    .mobile-offcanvas-content {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
        -webkit-overflow-scrolling: touch;
    }

    /* Match Info Section */
    .offcanvas-match-info {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        padding: 15px;
        margin-bottom: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .offcanvas-match-image {
        width: 100%;
        height: 120px;
        border-radius: 8px;
        overflow: hidden;
        margin-bottom: 15px;
        background: #2a3441;
    }

    .offcanvas-match-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .offcanvas-match-title {
        color: white;
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 8px;
        line-height: 1.2;
    }

    .offcanvas-venue-info {
        color: #94a3b8;
        font-size: 14px;
        margin-bottom: 10px;
    }

    .offcanvas-match-date {
        color: #94a3b8;
        font-size: 13px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* Package Section */
    .offcanvas-section {
        margin-bottom: 25px;
    }

    .offcanvas-section-title {
        color: #ffffff;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(8, 96, 95, 0.3);
    }

    .offcanvas-item {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 10px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        transition: all 0.2s ease;
    }

    .offcanvas-item:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(8, 96, 95, 0.5);
    }

    .offcanvas-item-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 6px;
    }

    .offcanvas-item-label {
        color: white;
        font-size: 14px;
        font-weight: 600;
    }

    .offcanvas-item-value {
        color: #ffffff;
        font-size: 13px;
        font-weight: 700;
    }

    .offcanvas-item-details {
        color: #94a3b8;
        font-size: 12px;
        line-height: 1.4;
    }

    /* Not Selected State */
    .offcanvas-item.not-selected {
        opacity: 0.5;
        border-style: dashed;
    }

    .offcanvas-item.not-selected .offcanvas-item-label {
        color: #6b7280;
    }

    .offcanvas-item.not-selected .offcanvas-item-value {
        color: #6b7280;
        font-style: italic;
    }

    /* Included Badge */
    .offcanvas-included-badge {
        background: #08605F;
        color: white;
        padding: 3px 8px;
        border-radius: 12px;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Travel Period */
    .offcanvas-travel-period {
        background: rgba(8, 96, 95, 0.1);
        border: 1px solid rgba(8, 96, 95, 0.3);
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 10px;
    }

    .offcanvas-travel-dates {
        display: flex;
        align-items: center;
        gap: 10px;
        color: white;
        font-size: 14px;
        margin-bottom: 8px;
    }

    .offcanvas-travel-dates svg {
        color: #08605F;
    }

    .offcanvas-travelers-count {
        color: #94a3b8;
        font-size: 13px;
    }

    /* ===== OFF-CANVAS FOOTER (PRICING) ===== */
    .mobile-offcanvas-footer {
        background: rgba(8, 96, 95, 0.1);
        padding: 20px;
        border-top: 2px solid rgba(255, 255, 255, 0.1);
    }

    .offcanvas-price-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .offcanvas-price-row:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .offcanvas-price-label {
        color: #94a3b8;
        font-size: 13px;
    }

    .offcanvas-price-value {
        color: white;
        font-size: 14px;
        font-weight: 600;
    }

    .offcanvas-price-row.total {
        padding-top: 12px;
        border-top: 2px solid rgba(8, 96, 95, 0.5);
    }

    .offcanvas-price-row.total .offcanvas-price-label {
        color: white;
        font-size: 15px;
        font-weight: 600;
    }

    .offcanvas-price-row.total .offcanvas-price-value {
        color: #ffffff;
        font-size: 20px;
        font-weight: 700;
    }

    /* Empty State */
    .offcanvas-empty-state {
        text-align: center;
        padding: 40px 20px;
        color: #6b7280;
    }

    .offcanvas-empty-icon {
        font-size: 48px;
        margin-bottom: 15px;
        opacity: 0.5;
    }

    .offcanvas-empty-text {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 8px;
        color: #94a3b8;
    }

    .offcanvas-empty-subtext {
        font-size: 14px;
        color: #6b7280;
    }

    /* Animations */
    @keyframes slideInRight {
        from {
            transform: translateX(100%);
        }
        to {
            transform: translateX(0);
        }
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    /* Active animations */
    .mobile-offcanvas-cart.active {
        animation: slideInRight 0.3s ease-out;
    }

    .mobile-offcanvas-overlay.active {
        animation: fadeIn 0.3s ease-out;
    }

    /* Special styling when mobile flight app is active */
    body.mobile-flight-app-active .mobile-offcanvas-cart {
        /* Ensure it's above flight app */
    }

    body.mobile-flight-app-active .mobile-offcanvas-overlay {
        /* Ensure overlay covers flight app too */
    }
}

/* Hide on desktop */
@media (min-width: 769px) {
    .mobile-cart-trigger,
    .mobile-offcanvas-cart,
    .mobile-offcanvas-overlay {
        display: none !important;
    }
}

/* Support for safe area (iPhone X+) */
@supports (padding-right: env(safe-area-inset-right)) {
    @media (max-width: 768px) {
        .mobile-offcanvas-cart {
            padding-right: env(safe-area-inset-right);
        }
        
        .mobile-offcanvas-header,
        .mobile-offcanvas-footer {
            padding-right: calc(20px + env(safe-area-inset-right));
        }
    }
}