/*
 * RevenueQR Unified Theme CSS
 * ============================
 * 
 * This file combines all local RevenueQR theme CSS files for optimal performance:
 * - theme-core.css (main app theme)
 * - mobile-nav-embedded.css (mobile navigation fixes)
 * - dropdown-fixes.css (dropdown overrides)
 * - mobile-unified.css (consolidated mobile styles)
 * 
 * Generated: 2025-01-27 for Performance Optimization
 * Total size reduction: 4 HTTP requests → 1 HTTP request
 */

/* ========================================
   CSS VARIABLES - SINGLE SOURCE OF TRUTH
   ======================================== */
:root {
    /* Primary Brand Colors */
    --primary-blue: #1e3c72;
    --secondary-blue: #2a5298;
    --accent-blue: #3d72b4;
    --light-blue: #5a95d1;
    
    /* Status Colors */
    --success-green: #28a745;
    --warning-yellow: #ffc107;
    --danger-red: #dc3545;
    --info-cyan: #17a2b8;
    --secondary-gray: #6c757d;
    
    /* Glass Morphism Colors - Change to solid blue: */
    --glass-bg: #0066ff;  /* Changed from rgba(0, 102, 255, 0.1) to solid blue */
    --glass-border: #3388ff;  /* Changed from rgba(0, 204, 255, 0.3) to solid blue border */
    --glass-hover: #004dd9;  /* Changed from rgba(255, 255, 255, 0.25) to darker blue */
    
    /* Text Colors */
    --text-white: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.75);
    --text-light: rgba(255, 255, 255, 0.8);
    
    /* Shadow Colors */
    --shadow-primary: rgba(30, 60, 114, 0.3);
    --shadow-success: rgba(40, 167, 69, 0.4);
    --shadow-dark: rgba(0, 0, 0, 0.3);
}

/* ========================================
   THEME CORE - MAIN APP THEME
   ======================================== */

/* Z-INDEX HIERARCHY - SINGLE SOURCE OF TRUTH */
/*
Z-Index Layering (highest to lowest):
1080 - Tooltips & Popovers  
1070 - Modals
1060 - Modal Backdrops
1050 - Toasts & Notifications
1045 - Dropdown Menus 
1040 - Navigation Collapse (hamburger menu)
1030 - Fixed Navbar
1020 - Sticky Elements
1010 - Offcanvas
1000 - General Fixed Elements
*/

/* Critical CSS - Masculine Dark Blue/Steel Theme */
html, body {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 25%, #3d72b4 75%, #5a95d1 100%) !important;
    background-attachment: fixed !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    min-height: 100vh !important;
}

/* Glass morphism cards */
.card {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
}
/* Remove blur on dashboard cards to avoid stacking-context issues that hide dropdowns */
.card.dashboard-card,
.dashboard-card.card {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

/* Navigation - SOLID BACKGROUND */
.navbar,
.navbar.navbar-dark,
.navbar.navbar-expand-lg {
    background: #1e3c72 !important;
    background-color: #1e3c72 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* ========================================
   DROPDOWN FIXES
   ======================================== */

/* MERCHANDISE DROPDOWN FIX */
/* Simple background fix for merchandise dropdowns */
#adminMerchandiseDropdown + .dropdown-menu,
#businessMerchandiseDropdown + .dropdown-menu {
    background-color: rgba(30, 60, 114, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* ========================================
   MOBILE NAVIGATION - DEPRECATED
   ======================================== */
/* Note: Mobile styles moved to mobile-unified.css to eliminate conflicts */

/* ========================================
   UNIVERSAL DROPDOWN STYLING
   ======================================== */

.dropdown-menu,
.dropdown-menu.show,
.navbar .dropdown-menu,
.navbar .dropdown-menu.show {
    background: #1e3c72 !important;
    background-color: #1e3c72 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    z-index: 1045 !important;
}

.dropdown-item,
.navbar .dropdown-item,
.dropdown-menu .dropdown-item {
    color: rgba(255, 255, 255, 0.9) !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0.5rem 1rem !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* Ensure navigation icons don't have white backgrounds */
.navbar .nav-link,
.navbar .nav-link i,
.navbar .nav-link .bi,
.navbar .bi,
.navbar img,
.navbar .dropdown-toggle,
.navbar .dropdown-toggle i,
.navbar .dropdown-toggle .bi {
    background: transparent !important;
    background-color: transparent !important;
}

/* Removed overly-broad navbar transparent rule: navigation elements are styled explicitly elsewhere to avoid accidental transparency issues on dropdowns */

/* Ensure navbar-collapse has proper background on mobile */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(30, 60, 114, 0.98) !important;
        background-color: rgba(30, 60, 114, 0.98) !important;
    }
}

/* Text colors and styling */
.text-primary { color: #64b5f6 !important; }
.text-success { color: #2e7d32 !important; }
.text-warning { color: #ff9800 !important; }
.text-info { color: #008B8B !important; }
.text-muted { color: rgba(255, 255, 255, 0.75) !important; }

/* Better text visibility */
.text-light { color: rgba(255, 255, 255, 0.9) !important; }
.small, small { color: rgba(255, 255, 255, 0.8) !important; }

/* Form styling */
.form-label, label {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500 !important;
}

.form-control {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: #64b5f6 !important;
    box-shadow: 0 0 0 0.25rem rgba(100, 181, 246, 0.25) !important;
}

/* Alert styling */
.alert {
    border: none !important;
    border-radius: 12px !important;
}

.alert-success {
    background: rgba(46, 125, 50, 0.15) !important;
    border: 1px solid rgba(46, 125, 50, 0.3) !important;
    color: #2e7d32 !important;
}

.alert-danger {
    background: rgba(244, 67, 54, 0.15) !important;
    border: 1px solid rgba(244, 67, 54, 0.3) !important;
    color: #f44336 !important;
}

.alert-warning {
    background: rgba(255, 152, 0, 0.15) !important;
    border: 1px solid rgba(255, 152, 0, 0.3) !important;
    color: #ff9800 !important;
}

/* Button styling - SOLID COLORS */
/* Note: Button styles moved to business-theme-fixes.css to eliminate duplicates */

/* Tables */
.table {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.table thead th {
    background: rgba(30, 60, 114, 0.3) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* ========================================
   DROPDOWN FIXES - MERGED FROM dropdown-fixes.css
   ======================================== */

/*
 * Dropdown Fixes CSS
 * ===================
 * 
 * Specific dropdown fixes extracted from header.php
 * Contains: Merchandise dropdowns, form selects, dropdown overrides
 * 
 * Generated: 2025-01-27
 */

/* CRITICAL DROPDOWN BACKGROUND FIX */
/* Override any white background rules for dropdowns */
.dropdown-menu,
.dropdown-menu.show,
.navbar .dropdown-menu,
.navbar .dropdown-menu.show,
.navbar-nav .dropdown-menu,
.navbar-nav .dropdown-menu.show {
    background: #1e3c72 !important;
    background-color: #1e3c72 !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    z-index: 1045 !important;
}

/* Force dark background on all dropdown items */
.dropdown-item,
.navbar .dropdown-item,
.dropdown-menu .dropdown-item,
.navbar-nav .dropdown-item {
    color: rgba(255, 255, 255, 0.9) !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0.5rem 1rem !important;
}

.dropdown-item:hover,
.dropdown-item:focus,
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* MERCHANDISE DROPDOWN FIX */


/* FORM SELECT DROPDOWN FIXES */
/* Force white background and proper styling for ALL select dropdowns */
html body .form-select,
html body select.form-select,
html body select[name="role"],
html body #role.form-select,
html body .card select,
html body .modal select,
html body .dropdown select,
html body .navbar select,
html body .form-control[type="select"],
html body select {
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    color: #495057 !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

html body .form-select:focus,
html body select.form-select:focus,
html body select[name="role"]:focus,
html body #role.form-select:focus,
html body .card select:focus,
html body .modal select:focus,
html body .dropdown select:focus,
html body .navbar select:focus,
html body .form-control[type="select"]:focus,
html body select:focus {
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Ensure form selects are visible and functional */
html body .form-select option,
html body select.form-select option,
html body select[name="role"] option,
html body #role.form-select option,
html body .card select option,
html body .modal select option,
html body .dropdown select option,
html body .navbar select option,
html body .form-control[type="select"] option,
html body select option {
    background-color: #ffffff !important;
    color: #495057 !important;
    padding: 0.5rem !important;
}

/* Override any conflicting styles */
html body .form-select *,
html body select.form-select *,
html body select[name="role"] *,
html body #role.form-select *,
html body .card select *,
html body .modal select *,
/* DISABLED: causes navbar transparency issues */
/* html body .dropdown select *,
html body .navbar select *,
html body .form-control[type="select"] *,
html body select * {
    background-color: inherit !important;
    color: inherit !important;
} */

/* DISABLED: causes hamburger button transparency */
/* .navbar *:not(.dropdown-menu):not(.dropdown-item):not(.form-select):not(select) {
    background: transparent !important;
    background-color: transparent !important;
} */

/* Ensure dropdown menus are NEVER affected by white background rules */
.dropdown-menu,
.dropdown-menu *,
.navbar .dropdown-menu,
.navbar .dropdown-menu * {
    background: #1e3c72 !important;
    background-color: #1e3c72 !important;
}

.dropdown-item,
.navbar .dropdown-item {
    background: transparent !important;
    background-color: transparent !important;
}

.dropdown-item:hover,
.dropdown-item:focus,
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
} 
/* ========================================
   GLOBAL GLASS MORPHISM OVERRIDES
   ======================================== */
/* Enforce Glass Effect on Cards, Tables, and Lists */
.card, 
.table, 
.list-group-item,
.list-group-item-action {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

/* Remove solid white backgrounds globally */
.bg-white {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.bg-white.bg-opacity-10,
.bg-white.bg-opacity-15,
.bg-white.bg-opacity-25,
.bg-white.bg-opacity-50 {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Fix text colors on glass backgrounds */
.text-dark,
.text-muted, 
.text-secondary {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Ensure table headers are distinct but consistent */
.table thead th {
    background: rgba(0, 0, 0, 0.2) !important;
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Ensure links on glass are visible */
a:not(.btn):not(.nav-link) {
    color: #5a95d1;
}
a:not(.btn):not(.nav-link):hover {
    color: #8dbaf0;
}

/* Fix input fields on glass */
.form-control, .form-select {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}
.form-control:focus, .form-select:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.1) !important;
}
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}
