/* Custom Styles for Arrival & Departure App */

/* Body background - darker cream/beige */
body {
    background-color: #f5e6d3 !important;
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d9c5 100%);
    min-height: 100vh;
}

/* Glassmorphic Card Effect */
.glass-card {
    background: rgba(255, 248, 220, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 200, 87, 0.3);
    box-shadow: 0 8px 32px 0 rgba(255, 165, 0, 0.2);
}

/* Enhanced table styles */
.table {
    border-collapse: separate;
    border-spacing: 0;
    background-color: #fffef5;
}

.table thead th {
    background-color: #ffd700;
    border-bottom: 2px solid #ff8c00;
    color: #8b4513;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
}

.table tbody tr {
    transition: all 0.3s ease;
    background-color: #fffef5;
}

.table tbody tr:nth-child(even) {
    background-color: #fff8dc;
}

.table tbody tr:hover {
    background-color: #ffd700;
    transform: scale(1.01);
    box-shadow: 0 2px 4px rgba(255, 140, 0, 0.3);
}

.table tfoot tr {
    background-color: #ffd700 !important;
}

.table tfoot td {
    background-color: #fff8dc !important;
    border-color: #ff8c00 !important;
}

.table-success thead th {
    background-color: #ffd700;
    color: #8b4513;
    border-color: #ff8c00;
}

.table-warning thead th {
    background-color: #ffd700;
    color: #8b4513;
    border-color: #ff8c00;
}

/* Arrival theme - Yellow/Orange */
.bg-green-50 {
    background-color: #fffef5 !important;
}

.border-green-200 {
    border-color: #ffd700 !important;
}

.text-green-800 {
    color: #8b4513 !important;
}

.table-green {
    background-color: #ffd700 !important;
}

/* Departure theme - Yellow/Orange */
.bg-yellow-50 {
    background-color: #fffef5 !important;
}

.border-yellow-200 {
    border-color: #ffd700 !important;
}

.text-yellow-800 {
    color: #8b4513 !important;
}

/* Navigation bar enhancements - Yellow/Orange theme */
.navbar {
    box-shadow: 0 2px 4px rgba(255, 140, 0, 0.3);
    background-color: #ffd700 !important;
    border-bottom: 2px solid #ff8c00;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #8b4513 !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: #8b4513 !important;
}

.nav-link {
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    color: #8b4513 !important;
}

.nav-link:hover {
    background-color: rgba(255, 140, 0, 0.3);
    border-radius: 4px;
    color: #8b4513 !important;
}

.navbar-dark .navbar-toggler {
    border-color: #ff8c00;
}

.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28139, 69, 19, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Button enhancements - Yellow/Orange theme */
.btn-primary,
.btn-info {
    background-color: #ffd700;
    border-color: #ff8c00;
    color: #8b4513;
    font-weight: 600;
}

.btn-primary:hover,
.btn-info:hover {
    background-color: #ff8c00;
    border-color: #ffd700;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 140, 0, 0.3);
}

.btn-warning {
    background-color: #ffd700;
    border-color: #ff8c00;
    color: #8b4513;
    font-weight: 600;
}

.btn-warning:hover {
    background-color: #ff8c00;
    border-color: #ffd700;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 140, 0, 0.3);
}

.btn-success {
    background-color: #ffd700;
    border-color: #ff8c00;
    color: #8b4513;
    font-weight: 600;
}

.btn-success:hover {
    background-color: #ff8c00;
    border-color: #ffd700;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 140, 0, 0.3);
}

/* Form controls - Yellow/Orange theme */
.form-control,
.form-select {
    border: 1px solid #ff8c00;
    background-color: #fffef5;
    color: #8b4513;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #ffd700;
    background-color: #fff8dc;
    box-shadow: 0 0 0 0.25rem rgba(255, 215, 0, 0.3);
    color: #8b4513;
}

.card {
    background-color: #fffef5;
    border: 1px solid #ffd700;
}

.card-body {
    background-color: #fffef5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .glass-card {
        padding: 1rem !important;
        margin: 0.5rem 0;
    }
    
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Navigation improvements */
    .navbar-brand {
        font-size: 1rem;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
        overflow-x: auto;
    }
    
    .nav-tabs .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem !important;
        white-space: nowrap;
    }
    
    /* Table improvements for mobile */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        display: block;
        width: 100%;
    }
    
    .table {
        font-size: 0.75rem;
        min-width: 600px; /* Force horizontal scroll on small screens */
        display: table;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.5rem 0.35rem;
        white-space: nowrap;
    }
    
    .table thead th {
        font-size: 0.7rem;
        text-transform: none;
    }
    
    /* Dashboard table specific */
    .table th[rowspan],
    .table td[rowspan] {
        vertical-align: middle;
    }
    
    /* Form improvements */
    .form-select,
    .form-control {
        font-size: 0.875rem;
    }
    
    /* Button improvements */
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Date selector improvements */
    .date-selector {
        padding: 0.75rem;
        gap: 0.35rem;
    }
    
    .date-btn {
        min-width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
    
    /* Card improvements */
    .card-body {
        padding: 1rem 0.75rem;
    }
    
    /* Header improvements */
    h1, h2, h3, h4, h5, h6 {
        font-size: 1.25rem;
    }
    
    /* Flex improvements */
    .d-flex {
        flex-wrap: wrap;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .d-flex.justify-content-between.align-items-center {
        align-items: flex-start !important;
    }
    
    /* Modal improvements */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    /* Alert improvements */
    .alert {
        font-size: 0.875rem;
        padding: 0.75rem;
    }
    
    /* Spacing improvements */
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .mb-3 {
        margin-bottom: 0.75rem !important;
    }
    
    .py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .table {
        font-size: 0.7rem;
        min-width: 500px;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.4rem 0.25rem;
    }
    
    .date-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .navbar-brand {
        font-size: 0.9rem;
    }
    
    .nav-tabs .nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem !important;
    }
    
    h1, h2, h3 {
        font-size: 1.1rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .container-fluid {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .table {
        font-size: 0.8rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.45rem 0.3rem;
    }
}

/* Loading spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Alert enhancements - Yellow/Orange theme */
.alert {
    border: 1px solid #ffd700;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(255, 140, 0, 0.2);
    background-color: #fffef5;
}

.alert-info {
    background-color: #fff8dc;
    border-color: #ffd700;
    color: #8b4513;
}

/* Tab navigation - Yellow/Orange theme */
.nav-tabs {
    border-bottom: 2px solid #ff8c00;
    background-color: #fffef5;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #ff8c00;
    background-color: #fff8dc;
    border: 1px solid #ff8c00;
    border-radius: 0.375rem 0.375rem 0 0;
    margin-right: 0.25rem;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    background-color: #ffd700;
    color: #8b4513;
    border-bottom-color: #ff8c00;
}

.nav-tabs .nav-link.active {
    background-color: #ffd700;
    border-bottom-color: #ff8c00;
    color: #8b4513;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    margin-top: auto;
}

/* Date selector buttons - Yellow/Orange theme */
.date-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    background-color: #fffef5;
    border-radius: 0.5rem;
}

.date-btn {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    background-color: #fff8dc;
    color: #ff8c00;
    border: 1px solid #ff8c00;
}

.date-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 140, 0, 0.3);
    background-color: #ffd700;
    color: #8b4513;
}

.date-btn.active {
    background-color: #ffd700;
    color: #8b4513;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-color: #ff8c00;
}

.date-btn.disabled {
    cursor: not-allowed;
    opacity: 0.3;
    background-color: #f5e6d3;
}

/* Mobile-specific table card view (optional - can be enabled) */
@media (max-width: 575.98px) {
    /* Make tables scroll horizontally with better UX */
    .table-responsive {
        position: relative;
        border: 1px solid #ff8c00;
        border-radius: 0.5rem;
        background-color: #fffef5;
    }
    
    .table-responsive::before {
        content: '← Scroll horizontally →';
        position: sticky;
        left: 0;
        top: 0;
        background-color: #ffd700;
        color: #8b4513;
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
        font-weight: 600;
        text-align: center;
        width: 100%;
        z-index: 10;
        border-bottom: 1px solid #ff8c00;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px; /* iOS recommended touch target */
        min-width: 44px;
    }
    
    .date-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    .table tbody tr {
        /* Remove hover effects on touch devices */
        transform: none;
    }
    
    .table tbody tr:active {
        background-color: #ffd700;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .glass-card form {
        display: none !important;
    }
    
    .glass-card {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .date-selector {
        display: none !important;
    }
}

