/* Custom styles for Black Car Rides CRM */

/* Override minimal styles only when necessary */
.navbar-brand {
    font-weight: bold;
}

.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: var(--bs-gray-800);
    border-bottom: 1px solid var(--bs-gray-700);
}

.table-responsive {
    border-radius: 0.375rem;
}

.badge {
    font-size: 0.75em;
}

/* Status indicators */
.text-success {
    color: var(--bs-success) !important;
}

.text-danger {
    color: var(--bs-danger) !important;
}

.text-warning {
    color: var(--bs-warning) !important;
}

.text-info {
    color: var(--bs-info) !important;
}

/* Custom animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-bottom: 0.5rem;
    }
}

/* Print styles */
@media print {
    .navbar, .btn, .btn-group {
        display: none !important;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        page-break-inside: avoid;
    }
}

/* Chart containers */
canvas {
    max-height: 300px;
}

/* Form enhancements */
.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-gray-800);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-gray-600);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

/* Map-specific styles */
.leaflet-container {
    font-family: inherit;
}

.leaflet-popup-content-wrapper {
    background: var(--bs-dark);
    color: var(--bs-light);
    border-radius: 0.375rem;
}

.leaflet-popup-tip {
    background: var(--bs-dark);
}

.custom-marker {
    background: transparent;
    border: none;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Map modal adjustments */
.modal-xl .modal-dialog {
    max-width: 90vw;
}

#rideMap {
    border-radius: 0;
}

/* Map info panel styling */
#mapRideInfo {
    background: #f8f9fa;
    color: #212529;
}

#mapRideInfo h6 {
    color: #495057 !important;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Responsive map adjustments */
@media (max-width: 768px) {
    .modal-xl .modal-dialog {
        max-width: 95vw;
        margin: 0.5rem;
    }
    
    #rideMap {
        height: 50vh !important;
    }
    
    .modal-body .row.g-0 {
        flex-direction: column;
    }
    
    .modal-body .col-md-4 {
        max-height: 40vh;
        order: 2;
    }
    
    .modal-body .col-md-8 {
        order: 1;
    }
}

/* Theme Selector Styling */
.theme-selector-container {
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 0;
    margin-bottom: 0;
}

.theme-selector-container .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
}

.theme-selector-container .btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* Role-based Navigation Styling */
.professional-navbar .brand-subtitle {
    font-size: 0.7rem;
    color: #ffd700;
    font-weight: 300;
    line-height: 1;
}

.navbar-nav .nav-link {
    position: relative;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffd700 !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    color: #ffd700 !important;
    font-weight: 600;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #ffd700;
    border-radius: 1px;
}

/* Role Badge Styling */
.badge.bg-primary { background-color: #3498db !important; }
.badge.bg-warning { background-color: #f39c12 !important; }
.badge.bg-info { background-color: #17a2b8 !important; }
.badge.bg-success { background-color: #28a745 !important; }
.badge.bg-secondary { background-color: #6c757d !important; }

/* Dropdown Menu Enhancements */
.dropdown-menu-dark {
    background-color: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.dropdown-menu-dark .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.dropdown-menu-dark .dropdown-item:hover {
    background-color: rgba(255, 215, 0, 0.1);
    color: #ffd700;
}

.dropdown-menu-dark .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Enhanced Portal Section Styling */
.portal-section {
    margin-bottom: 2rem;
}

.portal-section h6 {
    font-weight: 600;
    font-size: 1.1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    margin-bottom: 1rem;
}

/* Portal Category Specific Styling */
.portal-card.executive-priority {
    border-color: rgba(255, 215, 0, 0.6);
    background: rgba(255, 215, 0, 0.08);
}

.portal-card.executive-priority:hover {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.15);
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
    transform: translateY(-5px);
}

.portal-card.operations {
    border-color: rgba(0, 123, 255, 0.6);
    background: rgba(0, 123, 255, 0.08);
}

.portal-card.operations:hover {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 123, 255, 0.3);
    transform: translateY(-5px);
}

.portal-card.analytics {
    border-color: rgba(40, 167, 69, 0.6);
    background: rgba(40, 167, 69, 0.08);
}

.portal-card.analytics:hover {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.15);
    box-shadow: 0 8px 32px rgba(40, 167, 69, 0.3);
    transform: translateY(-5px);
}

.portal-card.team {
    border-color: rgba(108, 117, 125, 0.6);
    background: rgba(108, 117, 125, 0.08);
}

.portal-card.team:hover {
    border-color: #6c757d;
    background: rgba(108, 117, 125, 0.15);
    box-shadow: 0 8px 32px rgba(108, 117, 125, 0.3);
    transform: translateY(-5px);
}
