/* ==========================================================
   APSRVE PLATFORM (apsrve.com) - SHINING BLUE THEME
   Tailwind Extension + Modern Glassmorphism & Glow Effects
   ========================================================== */

:root {
  --blue-primary: #1e40af;
  --blue-electric: #2563eb;
  --cyan-glow: #06b6d4;
  --bg-dark: #070b14;
  --card-bg: rgba(15, 23, 42, 0.75);
}

body {
  background-color: var(--bg-dark);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #f8fafc;
  -webkit-tap-highlight-color: transparent;
}

/* Electric Shining Blue Background Gradients */
.bg-shining-mesh {
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.25) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.2) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(30, 64, 175, 0.3) 0px, transparent 60%);
}

/* Glowing Neon Text */
.text-glow-blue {
  text-shadow: 0 0 15px rgba(37, 99, 235, 0.7), 0 0 30px rgba(6, 182, 212, 0.4);
}

/* Glowing Border Cards */
.card-shining {
  background: var(--card-bg);
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s ease-in-out;
}

.card-shining:hover {
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 12px 36px 0 rgba(37, 99, 235, 0.35);
  transform: translateY(-2px);
}

/* Status Badges */
.badge-available {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.badge-onsite {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.badge-unavailable {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Pulsing Ping Animation */
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0.4; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.pulse-active {
  animation: pulse-ring 2s infinite ease-in-out;
}

/* Loud Ringing Animation for Incoming Booking */
@keyframes ring-alert {
  0%, 100% { transform: rotate(0deg); }
  20%, 60% { transform: rotate(-12deg) scale(1.05); }
  40%, 80% { transform: rotate(12deg) scale(1.05); }
}

.ring-bell {
  animation: ring-alert 0.8s infinite ease-in-out;
}

/* Mobile 2-by-2 Grid Tweaks */
@media (max-width: 640px) {
  .phone-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
  }
}

/* ==========================================================
   DAY / LIGHT MODE THEME OVERRIDES (html.light)
   ========================================================== */
html.light {
  color-scheme: light;
}

html.light,
html.light body,
body.theme-light {
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: #0f172a !important;
}

/* Day Mode Mesh Gradients */
html.light .bg-shining-mesh,
body.theme-light.bg-shining-mesh {
  background-color: #ffffff !important;
  background-image: radial-gradient(at 50% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 60%) !important;
}

/* Day Mode Header */
html.light header {
  background-color: rgba(255, 255, 255, 0.94) !important;
  border-bottom-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

/* Day Mode Ambient Glows */
html.light .pointer-events-none.blur-3xl {
  opacity: 0.12 !important;
}

/* Day Mode Header */
html.light header,
body.theme-light header {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-bottom: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

html.light header button[onclick="toggleSideDrawer()"] {
  background-color: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #1e293b !important;
}

/* Brand Logo & Gradient Text (Sapphire royal blue gradient) */
html.light .text-glow-blue,
html.light .bg-clip-text {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
}

html.light header span.bg-blue-950\/60 {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

html.light #headerLocBtn {
  background-color: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0284c7 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}
html.light #headerLocBtn span {
  color: #0f172a !important;
}

html.light header a[href="provider.php"] {
  background-color: #eff6ff !important;
  border: 1.5px solid #bfdbfe !important;
  color: #1d4ed8 !important;
}

/* Theme Toggle Button */
html.light #themeToggleBtn,
html.light .theme-toggle-btn {
  background-color: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #2563eb !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}
html.light #themeToggleBtn:hover,
html.light .theme-toggle-btn:hover {
  background-color: #eff6ff !important;
  border-color: #3b82f6 !important;
}

/* Hero Section Banner */
html.light section .bg-gradient-to-r.from-blue-950\/60,
body.theme-light section .bg-gradient-to-r.from-blue-950\/60 {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 50%, #eff6ff 100%) !important;
  border: 1.5px solid #bfdbfe !important;
  box-shadow: 0 10px 30px -5px rgba(37, 99, 235, 0.08) !important;
}
html.light section .bg-blue-500\/10 {
  background-color: #eff6ff !important;
  border: 1px solid #93c5fd !important;
  color: #1d4ed8 !important;
}

/* Hero Search Bar */
html.light .bg-slate-950\/80.border-blue-500\/40,
html.light #searchInput {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
html.light #searchInput::placeholder {
  color: #94a3b8 !important;
}
html.light #heroGpsBtn {
  background-color: #e0f2fe !important;
  border: 1.5px solid #7dd3fc !important;
  color: #0369a1 !important;
}

/* Hamari 9 Services Heading */
html.light h2.text-blue-300,
html.light h2.text-blue-300 * {
  color: #1e40af !important;
}

/* Inactive Service Pills */
html.light .service-pill:not(.active-pill) {
  background-color: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #1e293b !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}
html.light .service-pill:not(.active-pill) i {
  color: #0284c7 !important;
}
html.light .service-pill:not(.active-pill) span {
  color: #1e293b !important;
  font-weight: 700 !important;
}
html.light .service-pill:not(.active-pill):hover {
  background-color: #f0f9ff !important;
  border-color: #93c5fd !important;
  color: #0284c7 !important;
}

/* Active Service Pill */
html.light .service-pill.active-pill,
html.light .active-pill {
  background: linear-gradient(135deg, #2563eb, #0284c7) !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}
html.light .service-pill.active-pill * {
  color: #ffffff !important;
}

/* Available Experts Heading & Badge */
html.light #providerCountBadge {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

/* Provider Card Container */
html.light .card-shining,
body.theme-light .card-shining {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.07) !important;
}
html.light .card-shining:hover,
body.theme-light .card-shining:hover {
  border-color: #3b82f6 !important;
  box-shadow: 0 10px 25px -3px rgba(37, 99, 235, 0.15) !important;
}

/* Category Name on Provider Card (Top Left) */
html.light .provider-card .text-cyan-300 {
  color: #0284c7 !important;
  font-weight: 800 !important;
}

/* Verified Contractor Badge */
html.light .provider-card span[title="APSRVE Verified Contractor"] {
  background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
  border: 1px solid #f59e0b !important;
  color: #78350f !important;
  font-weight: 800 !important;
}
html.light .provider-card span[title="APSRVE Verified Contractor"] i {
  color: #d97706 !important;
}

/* Status Badges */
html.light .badge-available {
  background-color: #ecfdf5 !important;
  border: 1.5px solid #a7f3d0 !important;
  color: #047857 !important;
  font-weight: 800 !important;
}
html.light .badge-onsite {
  background-color: #fffbeb !important;
  border: 1.5px solid #fde68a !important;
  color: #b45309 !important;
  font-weight: 800 !important;
}
html.light .badge-unavailable {
  background-color: #fff1f2 !important;
  border: 1.5px solid #fecdd3 !important;
  color: #e11d48 !important;
  font-weight: 800 !important;
}

/* Provider Card Inner Details / Price Box */
html.light .provider-card .bg-slate-900\/80,
body.theme-light .provider-card .bg-slate-900\/80 {
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}
html.light .provider-card .dist-badge-box {
  background-color: #e0f2fe !important;
  border: 1px solid #7dd3fc !important;
  color: #0369a1 !important;
}
html.light .provider-card .text-cyan-300 {
  color: #0284c7 !important;
}
html.light .provider-card .text-amber-300 {
  color: #b45309 !important;
}
html.light .provider-card .text-emerald-400 {
  color: #059669 !important;
}

/* Provider Card Secondary Buttons */
html.light .provider-card button.bg-slate-800 {
  background-color: #f1f5f9 !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #1e293b !important;
  font-weight: 700 !important;
}
html.light .provider-card button.bg-slate-800:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}
html.light .provider-card a.bg-emerald-600\/20 {
  background-color: #dcfce7 !important;
  border: 1.5px solid #86efac !important;
  color: #15803d !important;
}
html.light .provider-card a.bg-emerald-600\/20:hover {
  background-color: #16a34a !important;
  color: #ffffff !important;
}

/* General Text Colors */
html.light .text-white,
body.theme-light .text-white {
  color: #0f172a !important;
}
html.light .text-slate-100,
html.light .text-slate-200,
html.light .text-slate-300 {
  color: #334155 !important;
}
html.light .text-slate-400,
html.light .text-slate-500 {
  color: #64748b !important;
}

/* Map Radar Section */
html.light #mapSection > div {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}
html.light #liveMap {
  border: 1.5px solid #cbd5e1 !important;
}

/* Modals & Popups */
html.light #bookingModal > div,
html.light #profileModal > div,
html.light #successModal > div,
html.light #locationModal > div,
html.light #adminDuesModal > div,
html.light #unlockRouteModal > div,
html.light #contractorModal > div,
html.light #rechargeModal > div,
html.light #custAuthModal > div,
html.light #custBookingsModal > div {
  background-color: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

/* Form Elements in Modals */
html.light input:not([type="checkbox"]):not([type="radio"]),
html.light select,
html.light textarea {
  background-color: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
}
html.light label {
  color: #334155 !important;
  font-weight: 700 !important;
}
html.light #bmDynamicServiceSection,
html.light #bmBillBreakdownBox {
  background-color: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
}
html.light #bmBillTotalAmount {
  color: #059669 !important;
}

/* Bottom Navigation Bar */
html.light #bottomNavBar,
body.theme-light #bottomNavBar {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-top: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06) !important;
}
html.light #bottomNavBar button.text-slate-400 {
  color: #64748b !important;
}
html.light #bottomNavBar button.text-cyan-400 {
  color: #2563eb !important;
}
html.light #navTabBookings {
  border: 3px solid #ffffff !important;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35) !important;
}

/* Side Drawer */
html.light #sideDrawerMenu,
body.theme-light #sideDrawerMenu {
  background-color: #ffffff !important;
  border-right: 1.5px solid #e2e8f0 !important;
  color: #0f172a !important;
}
html.light #drawerProfileCard {
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
}
html.light #drawerCustName {
  color: #0f172a !important;
}
html.light #drawerCustSub {
  color: #64748b !important;
}
html.light #sideDrawerMenu nav button {
  background-color: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #1e293b !important;
}
html.light #sideDrawerMenu nav button:hover {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0284c7 !important;
}

/* Primary Action Buttons stay Crisp White text */
html.light .bg-blue-600,
html.light button.bg-blue-600,
html.light a.bg-blue-600,
html.light .btn-primary,
html.light #submitBookingBtn,
html.light #resTrackBtn,
html.light button.bg-gradient-to-r,
html.light a.bg-gradient-to-r {
  color: #ffffff !important;
}
html.light .bg-blue-600 *,
html.light #submitBookingBtn *,
html.light #resTrackBtn *,
html.light button.bg-gradient-to-r *,
html.light a.bg-gradient-to-r * {
  color: #ffffff !important;
}
