﻿/* QR Code Component Styles */

/* QR Code Container */
.qr-code-container {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qr-code-container:hover {
    transform: scale(1.05);
}

.qr-code-frame {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid #e9ecef;
    transition: all 0.3s ease;
}

.qr-code-container:hover .qr-code-frame {
    border-color: #00A6FF;
    box-shadow: 0 8px 25px rgba(0, 166, 255, 0.2);
}

/* QR Code Overlay */
#qr-overlay {
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

/* Digital Pass Card */
.card {
    border-radius: 16px !important;
    overflow: hidden;
}

.card.shadow-lg {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
}

/* Gradient Background */
.card[style*="linear-gradient"] {
    background: linear-gradient(135deg, #00A6FF 0%, #80D3FF 50%, #0077B3 100%) !important;
    position: relative;
}

.card[style*="linear-gradient"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.05"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.05"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

/* Action Buttons */
.btn-white {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #495057 !important;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-white:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.btn-white i {
    font-size: 1.2rem;
}

/* Booking Details */
.booking-details .detail-item {
    transition: background-color 0.2s ease;
    border-radius: 4px;
    margin: 0 -8px;
    padding: 8px !important;
}

.booking-details .detail-item:hover {
    background-color: rgba(0, 166, 255, 0.05);
}

/* Status Badge */
.badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    padding: 8px 16px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Instructions and Security Cards */
.card.shadow-sm {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
}

/* Alert Styles */
.alert {
    border-radius: 12px !important;
    border: none !important;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%) !important;
    color: #0c5460 !important;
}

/* No Booking State */
.qr-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.qr-placeholder:hover {
    border-color: #00A6FF;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
}

/* Feature Icons */
.col-6.col-md-3 .text-center {
    transition: transform 0.3s ease;
}

.col-6.col-md-3 .text-center:hover {
    transform: translateY(-4px);
}

.col-6.col-md-3 i {
    transition: all 0.3s ease;
}

.col-6.col-md-3:hover i {
    transform: scale(1.1);
}

/* Loading Animation */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Toast Notification Styles */
.toast-notification {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    align-items: center;
    min-height: 48px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.toast-content {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Modal Enhancements */
.modal-content {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2) !important;
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 16px 16px 0 0 !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.modal-body {
    padding: 2rem;
}

/* Mobile Responsive Improvements for Booking Components */

/* QR Code Component Mobile */
@media (max-width: 768px) {
    .qr-code-frame img {
        max-width: 150px !important;
        max-height: 150px !important;
    }

    .btn-white {
        font-size: 0.875rem;
        padding: 8px 12px !important;
        min-height: 60px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .btn-white i {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .btn-white small {
        font-size: 0.75rem;
        line-height: 1;
    }

    .booking-details .detail-item {
        font-size: 0.875rem;
        padding: 6px 8px !important;
    }

    .card-body {
        padding: 1.5rem 1rem;
    }

    /* Mobile-specific spacing */
    .digital-pass-header {
        padding: 1rem !important;
    }

    .digital-pass-header h4 {
        font-size: 1.1rem !important;
    }

    /* Force 2 buttons per row on mobile */
    .qr-action-buttons .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin: 0 -4px;
    }

    .qr-action-buttons .col-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 0 4px !important;
        margin-bottom: 8px !important;
        display: flex !important;
    }

    .qr-action-buttons .col-6 .btn {
        width: 100% !important;
        height: 60px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Booking History Component Mobile */
@media (max-width: 767.98px) {
    .booking-history-card {
        margin-bottom: 1rem;
        border-radius: 12px;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .booking-history-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .booking-history-card .card-body {
        padding: 1rem;
    }

    .booking-history-card .badge {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .booking-history-card .btn {
        font-size: 0.875rem;
        padding: 6px 12px;
    }

    /* Mobile table alternative */
    .table-responsive {
        display: none;
    }
}

/* Active Booking Component Mobile */
@media (max-width: 767.98px) {
    .active-booking-image {
        width: 100% !important;
        max-width: 200px;
        height: 120px !important;
        margin-bottom: 1rem;
    }

    .active-booking-details {
        text-align: center;
    }

    .active-booking-details .row {
        justify-content: center;
    }

    .active-booking-actions {
        margin-top: 1rem;
    }

    .active-booking-actions .btn {
        font-size: 0.875rem;
        padding: 8px 16px;
    }

    .quick-actions-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .quick-actions-grid .btn {
        font-size: 0.875rem;
        padding: 10px 8px;
        text-align: center;
    }

    .booking-info-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin-top: 1rem;
    }

    .booking-info-item {
        text-align: center;
        padding: 0.75rem;
        background: #f8f9fa;
        border-radius: 8px;
    }

    .booking-info-item .label {
        font-size: 0.75rem;
        color: #6c757d;
        margin-bottom: 0.25rem;
    }

    .booking-info-item .value {
        font-weight: 600;
        font-size: 0.875rem;
    }
}



/* Mobile QR Action Buttons - Force 2x2 Grid Layout */
@media (max-width: 767.98px) {
    .qr-action-buttons {
        width: 100% !important;
    }

    .qr-action-buttons .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .qr-action-buttons .col-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 4px !important;
        box-sizing: border-box !important;
    }

    .qr-action-buttons .btn {
        width: 100% !important;
        height: 60px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 8px !important;
    }

    .qr-action-buttons .btn i {
        font-size: 1rem !important;
        margin-bottom: 4px !important;
    }

    .qr-action-buttons .btn small {
        font-size: 0.75rem !important;
        line-height: 1 !important;
    }
}

@media (max-width: 576px) {
    .qr-code-frame {
        padding: 1rem !important;
    }

    .qr-code-frame img {
        max-width: 120px !important;
        max-height: 120px !important;
    }

    .row.g-2 {
        gap: 0.5rem !important;
    }

    .btn-white {
        padding: 6px 8px !important;
        font-size: 0.8rem;
    }

    /* Extra small mobile - ensure 2 buttons per row */
    .qr-action-buttons .row {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    .qr-action-buttons .col-6 {
        flex: 0 0 calc(50% - 4px) !important;
        max-width: calc(50% - 4px) !important;
        margin: 2px !important;
    }

    /* Extra small mobile adjustments */
    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem 0.75rem;
    }

    .booking-details .detail-item {
        padding: 4px 6px !important;
        font-size: 0.8rem;
    }

    .badge {
        font-size: 0.7rem !important;
        padding: 3px 6px !important;
    }

    .btn-sm {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    /* Mobile navigation improvements */
    .pagination {
        justify-content: center;
    }

    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }

    /* Mobile form improvements */
    .form-select-sm {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }

    /* Mobile spacing */
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }

    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Print Styles */
@media print {
    .btn, .alert, .modal {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
    
    .qr-code-frame {
        border: 2px solid #000 !important;
        background: white !important;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Accessibility Improvements */
.qr-code-container:focus {
    outline: 2px solid #00A6FF;
    outline-offset: 4px;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(0, 166, 255, 0.25) !important;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .card {
        background-color: #2d3748 !important;
        color: #e2e8f0 !important;
    }
    
    .bg-light {
        background-color: #4a5568 !important;
    }
    
    .text-muted {
        color: #a0aec0 !important;
    }
    
    .border {
        border-color: #4a5568 !important;
    }
}
