/* Liquid Glass Design System */

.glass-regular {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-regular.glass-nav-open {
  border-bottom-color: transparent;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-regular::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  z-index: -1;
  pointer-events: none;
}

.glass-seamless-dropdown {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: none;
  border-left: none;
  border-right: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.glass-seamless-dropdown.glass-closed {
  border-color: transparent;
  box-shadow: none;
}

.glass-seamless-dropdown::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  z-index: -1;
  pointer-events: none;
}

.glass-thin {
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.liquid-glass {
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.glass-dropdown {
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: rgba(5, 5, 5, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
}

.liquid-glass-card {
  backdrop-filter: blur(60px) saturate(180%);
  -webkit-backdrop-filter: blur(60px) saturate(180%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.12),
              inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-tap-highlight-color: transparent;
}

.text-gradient-amber {
  background: linear-gradient(135deg, #ffc51d 0%, #f1a015 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.bg-gradient-amber {
  background: linear-gradient(135deg, #ffc51d 0%, #f1a015 100%);
  color: white;
}

.input-glass {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-glass:focus {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.25);
  outline: none;
  box-shadow: 0 0 0 2px rgba(245, 197, 70, 0.3);
}

.btn-glass-primary {
  background: #F5C546 !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 4px 14px rgba(245, 197, 70, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  color: #050505 !important;
  border-radius: 9999px !important;
  font-weight: 600 !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-glass-primary:hover {
  background: #FFD700 !important;
  box-shadow: 0 6px 20px rgba(245, 197, 70, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
  transform: translateY(-1px);
}

.btn-glass-primary:active {
  transform: scale(0.97);
}

.morph-transition {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Driver.js Liquid Glass Overrides */
.driver-popover {
  background: rgba(20, 20, 20, 0.3) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  border-radius: 1rem !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
  max-width: 400px !important;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

@media (min-width: 640px) {
  .driver-popover {
    min-width: 340px !important;
  }
}

.driver-popover-title {
  color: #F5C546 !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  text-shadow: none !important;
  -webkit-font-smoothing: antialiased !important;
}

.driver-popover-description {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 0.9rem !important;
  text-shadow: none !important;
  -webkit-font-smoothing: antialiased !important;
}

.driver-popover-close-btn {
  color: rgba(255, 255, 255, 0.5) !important;
}

.driver-popover-close-btn:hover {
  color: white !important;
}

.driver-popover-footer button {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  text-shadow: none !important;
  -webkit-font-smoothing: antialiased !important;
  border-radius: 0.5rem !important;
  padding: 0.4rem 0.8rem !important;
  transition: all 0.2s ease !important;
}

.driver-popover-footer button:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.driver-popover-footer .driver-popover-next-btn {
  background: rgba(245, 197, 70, 0.2) !important;
  border-color: rgba(245, 197, 70, 0.4) !important;
  color: #F5C546 !important;
}

.driver-popover-footer .driver-popover-next-btn:hover {
  background: rgba(245, 197, 70, 0.3) !important;
}

.driver-popover-progress-text {
  color: rgba(255, 255, 255, 0.4) !important;
}

.driver-popover-arrow {
  display: none !important; /* Hide arrows for a cleaner floating glass look */
}

/* Mobile Layout Helpers */
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* Mobile Segmented Control (Tabs) */
.mobile-segmented-control {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  padding: 0.25rem;
  display: flex;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mobile-segmented-control a {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  position: relative;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: rgba(255, 255, 255, 0.5);
}

.mobile-segmented-control a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@media (max-width: 767px) {
  .mobile-dark-glass {
    background: rgba(0, 0, 0, 0.5) !important;
  }
}
