/* Flying Club Reservation System - Main Styles */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    /* Navbar specific colors - can be adjusted to match logo */
    --navbar-bg: #000000;
    --navbar-text: #ffffff;
    --navbar-hover: rgba(255, 255, 255, 0.1);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f5f5;
}

/* Header Styles */
.custom-navbar {
    background-color: var(--navbar-bg) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Alternative navbar color schemes - uncomment to use */
/* 
Dark theme:
.custom-navbar { background-color: #2c3e50 !important; }

Light theme:
.custom-navbar { 
    background-color: #ffffff !important; 
    border-bottom: 1px solid #dee2e6;
}
.custom-navbar .nav-link { color: #333 !important; }
.custom-navbar .navbar-logo { filter: none !important; }

Gradient theme:
.custom-navbar { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; 
}
*/

/* Jumbotron Styles */
.jumbotron {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.jumbotron h1 {
    font-weight: 300;
    margin-bottom: 1rem;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Button Styles */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* Form Styles */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Table Styles */
.table {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table thead th {
    background-color: var(--light-color);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Status Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.badge-status-active {
    background-color: var(--success-color);
    color: white;
}

.badge-status-blocked {
    background-color: var(--danger-color);
    color: white;
}

.badge-status-maintenance {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

/* Reservation Status Badges */
.badge-status-pending {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.badge-status-confirmed {
    background-color: var(--success-color);
    color: white;
}

.badge-status-cancelled {
    background-color: var(--danger-color);
    color: white;
}

.badge-status-completed {
    background-color: var(--info-color);
    color: white;
}

/* Reservation Calendar */
.calendar-day {
    min-height: 100px;
    border: 1px solid #dee2e6;
    padding: 0.5rem;
    background-color: white;
}

.calendar-day.available {
    background-color: #d4edda;
}

.calendar-day.reserved {
    background-color: #f8d7da;
}

.calendar-day.maintenance {
    background-color: #fff3cd;
}

/* Logo and Brand Styles */
.navbar-logo {
    height: 40px;
    width: auto;
    max-width: 120px;
    transition: all 0.2s ease-in-out;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

.navbar-brand.logo-brand {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease-in-out;
    border-radius: 0.375rem;
}

.navbar-brand.logo-brand:hover .navbar-logo {
    transform: scale(1.05);
    filter: drop-shadow(0 0 12px rgba(255,255,255,0.6)) drop-shadow(0 0 20px rgba(255,255,255,0.3));
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    font-size: 1.25rem;
    border-radius: 0.375rem;
    min-width: 44px; /* Touch target minimum */
    min-height: 44px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Hide hamburger menu on mobile - logo acts as toggle instead */
@media (max-width: 991.98px) {
    .navbar-toggler {
        display: none !important;
    }
}

/* User info and logout styling */
.logout-btn {
    padding: 0.75rem 1rem !important;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
    min-height: 44px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

/* User info text styling */
.navbar-text {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Mobile responsiveness for user info */
@media (max-width: 991.98px) {
    .navbar-text {
        display: none !important;
    }
    
    .logout-btn .nav-text,
    .nav-link .nav-text {
        display: none;
    }
    
    .logout-btn,
    .nav-link {
        padding: 0.5rem !important;
        justify-content: center;
        min-width: 44px;
    }
}

.nav-link {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0.125rem;
    transition: all 0.2s ease-in-out;
    min-height: 44px; /* Touch target minimum */
    display: flex;
    align-items: center;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    transition: background-color 0.2s ease-in-out;
}

.dropdown-item:hover {
    background-color: var(--light-color);
}

/* Mobile navbar layout */
@media (max-width: 991px) {
    /* Ensure proper mobile layout for navbar only */
    .navbar .container-fluid {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        position: relative;
    }
    
    /* Logo acts as both brand and menu toggle on mobile */
    .navbar-brand.logo-brand {
        order: 0; /* Far left - replaces burger menu */
        flex-grow: 0;
        margin: 0;
        padding: 0.5rem;
        cursor: pointer;
        position: relative;
        /* Ensure logo acts as menu toggle */
        display: flex !important;
    }
    
    .navbar-brand.logo-brand:hover {
        background-color: rgba(255, 255, 255, 0.15);
        border-radius: 0.375rem;
    }
    
    /* User info and logout container stays on the right */
    .d-flex.align-items-center.ms-auto {
        order: 2; /* Far right */
        margin-left: auto !important;
    }
    
    .logout-btn {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.9rem;
        color: white !important;
        text-decoration: none;
        border-radius: 0.375rem;
        transition: background-color 0.2s ease-in-out;
    }
    
    .logout-btn:hover {
        background-color: rgba(255, 255, 255, 0.15);
        color: white !important;
    }
    
    /* Login/Register links styling for mobile */
    .order-2 a.nav-link {
        color: white !important;
        text-decoration: none;
        padding: 0.5rem 0.75rem;
        border-radius: 0.375rem;
        transition: background-color 0.2s ease-in-out;
        margin: 0 0.25rem;
    }
    
    .order-2 a.nav-link:hover {
        background-color: rgba(255, 255, 255, 0.15);
        color: white !important;
    }
    
    /* Mobile navbar adjustments */
    .navbar-collapse {
        background-color: var(--navbar-bg);
        border-radius: 0.5rem;
        margin-top: 0.5rem;
        padding: 1rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        order: 3; /* Below everything else */
        width: 100%;
        border: 2px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Ensure proper mobile layout for navbar login/register when not logged in */
    .navbar .container-fluid {
        flex-wrap: wrap;
    }
    
    /* Make sure login/register links are properly spaced on mobile */
    .order-2 {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin: 0;
        border-radius: 0;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .navbar-text {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: block;
        color: rgba(255, 255, 255, 0.8) !important;
    }
    
    .dropdown-menu {
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .dropdown-item {
        color: var(--dark-color);
    }
}

@media (max-width: 768px) {
    .jumbotron {
        padding: 1rem;
    }
    
    .jumbotron h1 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    /* Dashboard mobile adjustments */
    .dashboard-card-header h5 {
        font-size: 1rem;
    }
    
    .list-group-item {
        padding: 0.75rem 0.5rem;
    }
    
    /* Mobile navbar specific adjustments */
    .navbar-brand.logo-brand {
        font-size: 1.25rem;
        text-align: left; /* Align to left on mobile */
        justify-content: flex-start;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-logo {
        height: 35px; /* Slightly smaller on mobile */
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.4)); /* White shadow on mobile */
    }
    

    
    /* Mobile navbar: show both icons and text always */
    .navbar-collapse .nav-text {
        display: inline; /* Always show text */
    }
    
    .navbar-collapse .nav-link {
        text-align: left;
        min-width: 44px; /* Minimum touch target size */
        justify-content: flex-start;
        padding: 0.75rem 1rem;
    }
    
    /* Logout button text always visible */
    .logout-btn .nav-text {
        display: inline !important;
    }
    
    /* Mobile dashboard adjustments */
    .col-lg-4 {
        margin-bottom: 1rem !important;
    }
    
    /* Stack dashboard cards vertically on small screens */
    .dashboard-content .row {
        flex-direction: column;
    }
}

/* Medium screens: show icons and text */
@media (min-width: 768px) and (max-width: 991px) {
    .nav-text {
        display: inline !important;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
}

@media (min-width: 992px) {
    /* Desktop: show both icons and text */
    .nav-text {
        display: inline !important;
    }
    
    /* Desktop logo styling */
    .navbar-brand.logo-brand {
        justify-content: flex-start;
        flex-grow: 0;
        margin-right: 2rem;
        cursor: pointer; /* Still clickable on desktop for consistency */
        order: 0; /* Ensure proper order on desktop */
    }
    
    /* Desktop logout styling */
    .order-2 {
        order: 2;
    }
    
    .navbar-brand.logo-brand:hover {
        background-color: rgba(255, 255, 255, 0.15);
        border-radius: 0.375rem;
    }
    
    /* No mobile indicator dot to remove anymore */
}

/* Auth Pages Mobile Improvements */
@media (max-width: 575px) {
    .card {
        border-radius: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .card-header {
        border-radius: 1rem 1rem 0 0 !important;
        padding: 1.5rem;
    }
    
    .card-header h4 {
        font-size: 1.4rem;
        margin-bottom: 0;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .form-control {
        font-size: 1rem;
        padding: 0.875rem;
        border-radius: 0.5rem;
    }
    
    .btn {
        padding: 0.875rem;
        font-size: 1rem;
        border-radius: 0.5rem;
    }
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert Styles */
.alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Modal Styles */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal-header {
    background-color: var(--light-color);
    border-bottom: 1px solid #dee2e6;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Utility Classes */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }

/* Dashboard Specific Styles */
.dashboard-card-header {
    font-weight: 600;
    border-bottom: none;
}

.dashboard-card-header.bg-success {
    background-color: var(--success-color) !important;
}

.dashboard-card-header.bg-warning {
    background-color: var(--warning-color) !important;
}

.dashboard-card-header.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.dashboard-card-header.bg-primary {
    background-color: var(--primary-color) !important;
}

/* List group items in dashboard */
.list-group-item {
    transition: background-color 0.2s ease-in-out;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

/* Dialog System Styles */
.modal-dialog {
    max-width: 500px;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.modal-body {
    padding: 1.5rem;
}

/* Alert container for inline alerts */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.alert-container .alert {
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Confirmation dialog specific styles */
.confirm-btn {
    min-width: 80px;
}

/* Success dialog styles */
.modal-content .modal-header.bg-success {
    background-color: #d4edda !important;
    border-bottom-color: #c3e6cb;
}

.modal-content .modal-header.bg-danger {
    background-color: #f8d7da !important;
    border-bottom-color: #f5c6cb;
}

.modal-content .modal-header.bg-warning {
    background-color: #fff3cd !important;
    border-bottom-color: #ffeaa7;
}

.modal-content .modal-header.bg-info {
    background-color: #d1ecf1 !important;
    border-bottom-color: #bee5eb;
}

/* Global Navigation Text Visibility - Always show menu titles */
.nav-text {
    display: inline !important;
}

/* Specific mobile navigation text overrides */
@media (max-width: 767px) {
    .navbar-collapse .nav-text {
        display: inline !important;
    }
    
    .logout-btn .nav-text {
        display: inline !important;
    }
}

/* Blocked member alert styling */
.alert-warning[style*="border-radius: 0"] {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.alert-warning[style*="border-radius: 0"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.alert-warning[style*="border-radius: 0"] i {
    color: #f39c12;
}

/* Mobile responsiveness for navbar */
@media (max-width: 991.98px) {
    .navbar-text {
        display: none !important;
    }
    
    .nav-text {
        display: none !important;
    }
    
    .logout-btn .nav-text {
        display: none !important;
    }
    
    /* Ensure logo acts as menu toggle on mobile */
    .navbar-brand.logo-brand {
        cursor: pointer;
        /* Prevent navigation on mobile - only toggle menu */
        pointer-events: auto;
    }
    
    /* Ensure user info stays on the right */
    .d-flex.align-items-center.ms-auto {
        margin-left: auto !important;
        flex-shrink: 0;
    }
}