/* assets/css/style.css */

:root {
  --primary-color: #0284c7;
  --primary-hover: #0369a1;
  --secondary-color: #0ea5e9;
  --accent-color: #06b6d4;
  --bg-color: #f0f9ff;
  --surface-color: rgba(255, 255, 255, 0.85);
  --text-color: #0f172a;
  --text-muted: #64748b;
  --border-color: rgba(14, 165, 233, 0.12);
  --card-shadow: 0 15px 35px -5px rgba(14, 165, 233, 0.08), 0 5px 15px -5px rgba(0, 0, 0, 0.03);
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-blur: blur(16px);
  --glass-border: rgba(255, 255, 255, 0.5);
  --footer-bg: #091528;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, .brand-text {
  font-family: var(--font-heading);
  font-weight: 600;
}

/* Glassmorphism navbar styling */
.navbar-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.brand-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-color);
}

.logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(2, 132, 199, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: inset 0 2px 4px rgba(2, 132, 199, 0.15);
}

.nav-link {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-color);
  background: rgba(2, 132, 199, 0.08);
}

.btn-theme-toggle {
  border: none;
  background: rgba(2, 132, 199, 0.08);
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-theme-toggle:hover {
  background: var(--primary-color);
  color: #fff;
  transform: rotate(15deg);
}

.btn-cart-badge {
  background: rgba(2, 132, 199, 0.08);
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: all 0.2s ease;
}

.btn-cart-badge:hover {
  background: var(--primary-color);
  color: #fff;
}

.btn-user-profile {
  background: rgba(2, 132, 199, 0.08);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  padding: 0.35rem 1rem;
  transition: all 0.2s ease;
}

.btn-user-profile:hover {
  background: rgba(2, 132, 199, 0.15);
}

/* Premium Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border: none !important;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: #fff !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
  transform: translateY(-2px) !important;
}

/* Premium Cards */
.card-premium {
  background: var(--surface-color);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.card-premium:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -15px rgba(2, 132, 199, 0.18);
}

/* Footer customized styles - Professional Redesign */
.footer-professional {
  background-color: #ffffff !important;
  color: #1e293b !important;
  border-top: 1px solid rgba(14, 165, 233, 0.12);
  padding: 4rem 0 2.5rem 0;
  position: relative;
}

.footer-logo {
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.footer-logo:hover {
  opacity: 0.9;
}

.footer-desc {
  color: #64748b !important;
  line-height: 1.6;
}

/* Professional Social Icons */
.social-icon-professional {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.04);
  border: 1px solid rgba(14, 165, 233, 0.12);
  color: #64748b !important;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 0.9rem;
}

.social-icon-professional:hover {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #fff !important;
  transform: translateY(-2px);
}

/* Quick links styling */
.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: #475569 !important;
  transition: all 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary-color) !important;
  padding-left: 4px;
  text-decoration: none !important;
}

/* Newsletter Form styling */
.newsletter-form-professional {
  display: flex;
  gap: 8px;
}

.newsletter-form-professional .form-control {
  background-color: #f8fafc !important;
  border: 1px solid rgba(14, 165, 233, 0.15) !important;
  color: #0f172a !important;
  border-radius: 30px !important;
  padding: 0.45rem 1rem !important;
  font-size: 0.85rem !important;
}

.newsletter-form-professional .form-control:focus {
  border-color: var(--primary-color) !important;
  box-shadow: none !important;
}

.newsletter-form-professional .form-control::placeholder {
  color: #94a3b8 !important;
}

.newsletter-form-professional button {
  border-radius: 30px !important;
  padding: 0.45rem 1.25rem !important;
  font-weight: 600;
  font-size: 0.82rem !important;
  background-color: var(--primary-color) !important;
  border: none !important;
  transition: all 0.2s ease !important;
  color: #fff !important;
  white-space: nowrap;
}

.newsletter-form-professional button:hover {
  background-color: var(--primary-hover) !important;
  transform: translateY(-1px);
}

.hover-link-professional {
  color: #64748b !important;
  transition: color 0.2s ease;
}

.hover-link-professional:hover {
  color: var(--primary-color) !important;
}

/* Content Container wrapper */
.content-wrapper {
  flex-grow: 1;
}

/* Scrollbar customized styles */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: rgba(2, 132, 199, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Advanced Features: Hydration Wave Meter */
.hydration-circle-wrap {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  background: rgba(2, 132, 199, 0.05);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 4px 10px rgba(2, 132, 199, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hydration-wave-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%; /* Dynamic height */
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

/* Wave crest simulation overlay */
.hydration-wave-fill::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -50%;
  width: 200%;
  height: 40px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 40%;
  animation: waveMotion 8s linear infinite;
}

.hydration-value-display {
  position: relative;
  z-index: 2;
  font-weight: 800;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-color);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

@keyframes waveMotion {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Advanced Features: Checkout Scratch Card */
.scratch-card-box {
  width: 100%;
  max-width: 320px;
  height: 140px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  margin: 0 auto;
}

.scratch-card-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  cursor: crosshair;
}

.scratch-card-underlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Mobile PWA Bottom Navbar */
.mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  z-index: 1030;
  height: calc(60px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.05) !important;
}

/* Dark mode override for bottom nav */
body.dark-mode .mobile-bottom-nav {
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav-link {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  width: 20%;
  text-align: center;
}

.mobile-nav-link i {
  font-size: 1.25rem;
  transition: transform 0.2s ease;
}

.mobile-nav-link:hover, 
.mobile-nav-link:active {
  color: var(--primary-color) !important;
}

/* Tapped scaling feedback */
.mobile-nav-link:active i {
  transform: scale(0.85);
}

.btn-primary:active, 
.btn-outline-primary:active,
.btn-user-profile:active,
.card-premium:active {
  transform: scale(0.97) !important;
  transition: transform 0.1s ease;
}

/* Animated Hamburguer Menu */
.navbar-toggler {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 16px;
  cursor: pointer;
  box-shadow: none !important;
  outline: none !important;
}

.navbar-toggler:focus {
  box-shadow: none !important;
  outline: none !important;
}

.toggler-icon-bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-color);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

/* Animations to Form 'X' when open */
.navbar-toggler:not(.collapsed) .top-bar {
  transform: translateY(7px) rotate(45deg);
  background-color: var(--primary-color) !important;
}

.navbar-toggler:not(.collapsed) .middle-bar {
  opacity: 0;
  transform: scaleX(0);
}

.navbar-toggler:not(.collapsed) .bottom-bar {
  transform: translateY(-7px) rotate(-45deg);
  background-color: var(--primary-color) !important;
}

/* Add spacing at the bottom of the body on mobile so content isn't cut off by the sticky bottom nav */
@media (max-width: 767.98px) {
  body {
    margin-bottom: calc(65px + env(safe-area-inset-bottom, 0px)) !important;
  }
  
  /* Remove Footer in App View */
  footer {
    display: none !important;
  }
  
  /* Hide desktop sidebar in Customer/Admin/Delivery Dashboards */
  .dashboard-sidebar {
    display: none !important;
  }
  
  .dashboard-wrapper {
    flex-direction: column !important;
  }
  
  .dashboard-main-content {
    padding: 0.75rem !important;
  }
  
  /* Make Profile Card scale properly on mobile viewports */
  .max-w-700 {
    max-width: 100% !important;
    margin: 0 !important;
  }
  
  /* Cart Page Responsive Table */
  .table-responsive table thead {
    display: none !important;
  }
  
  .table-responsive table tbody tr {
    display: block !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1.25rem 0.25rem !important;
    position: relative !important;
  }
  
  .table-responsive table tbody td {
    display: block !important;
    border: none !important;
    padding: 0.35rem 0 !important;
    text-align: left !important;
  }
  
  /* First cell: Product Name */
  .table-responsive table tbody td:first-child {
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    padding-right: 40px !important; /* Space for the trash button */
  }
  
  /* Second cell: Price */
  .table-responsive table tbody td:nth-child(2) {
    color: var(--text-muted) !important;
    font-size: 0.88rem !important;
  }
  
  .table-responsive table tbody td:nth-child(2)::before {
    content: "Price: " !important;
    font-weight: 600 !important;
    color: var(--text-color) !important;
  }
  
  /* Third cell: Quantity selector */
  .table-responsive table tbody td:nth-child(3) {
    margin: 0.5rem 0 !important;
  }
  
  .table-responsive table tbody td:nth-child(3) .input-group {
    margin-left: 0 !important; /* Left-align the picker */
  }
  
  /* Fourth cell: Total price */
  .table-responsive table tbody td:nth-child(4) {
    font-weight: 700 !important;
    font-size: 1.15rem !important;
  }
  
  .table-responsive table tbody td:nth-child(4)::before {
    content: "Total: " !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
  }
  
  /* Last cell: Trash delete button */
  .table-responsive table tbody td:last-child {
    position: absolute !important;
    top: 1.25rem !important;
    right: 0.25rem !important;
    padding: 0 !important;
  }
  
  .table-responsive table tbody td:last-child button {
    font-size: 1.25rem !important;
    padding: 0.25rem !important;
  }
}



/* Interactive Mineral Showcase styling */
.active-mineral-card {
  border: 1.5px solid var(--primary-color) !important;
  background-color: rgba(2, 132, 199, 0.05) !important;
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.12) !important;
  transform: translateY(-2px) scale(1.01);
}

.bottle-water-level {
  transition: y 0.8s cubic-bezier(0.16, 1, 0.3, 1), height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}


