/* 
 * The Tooth Club Clinic — Official Blue & White Brand Theme
 * Palette:
 *   Deep Navy: #0B2545
 *   Dark Midnight: #07182C
 *   Electric Cyan: #00B4D8
 *   Vibrant Sky: #0284C7
 *   Ice Blue: #F0F8FF
 *   Pure White: #FFFFFF
 */

@layer base {
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  body {
    background-color: #F8FAFC;
    color: #0F172A;
    overflow-x: hidden;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: #E2EDF8;
}
::-webkit-scrollbar-thumb {
  background: #0B2545;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: #00B4D8;
}

/* Pulsing Realtime Status Beacon */
.status-beacon {
  position: relative;
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #10B981;
}

.status-beacon::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  background-color: rgba(16, 185, 129, 0.45);
  animation: pulse-beacon 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-beacon.closed {
  background-color: #EF4444;
}
.status-beacon.closed::after {
  background-color: rgba(239, 68, 68, 0.4);
}

@keyframes pulse-beacon {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Subtle Architectural Grid */
.bg-grid-medical {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(11, 37, 69, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 37, 69, 0.04) 1px, transparent 1px);
}

/* Card Hover Lift & Border Shimmer */
.card-hover-cyan {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-hover-cyan:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 35px -10px rgba(11, 37, 69, 0.12), 0 0 0 1.5px rgba(0, 180, 216, 0.4);
}

/* Nav Link Underline Hover */
.nav-link-hover {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link-hover::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2.5px;
  background: #00B4D8;
  transition: width 0.25s ease;
  border-radius: 2px;
}

.nav-link-hover:hover::after,
.nav-link-hover.active-nav::after {
  width: 100%;
}

.nav-link-hover.active-nav {
  color: #00B4D8;
  font-weight: 700;
}

/* Native Dialog Modal */
dialog#serviceDialog {
  border: none;
  border-radius: 24px;
  padding: 0;
  max-width: 620px;
  width: 92%;
  box-shadow: 0 25px 60px -15px rgba(11, 37, 69, 0.45);
  background: #FFFFFF;
  overflow: hidden;
}

dialog#serviceDialog::backdrop {
  background: rgba(7, 24, 44, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

dialog#serviceDialog[open] {
  animation: dialog-fade-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dialog-fade-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Luxury Form Inputs */
.form-input-luxury {
  width: 100%;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14.5px;
  color: #0F172A;
  transition: all 0.2s ease;
  outline: none;
}

.form-input-luxury:focus {
  border-color: #00B4D8;
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.18);
}

.form-input-luxury.is-invalid {
  border-color: #EF4444 !important;
  background-color: #FEF2F2;
}

.form-input-luxury.is-valid {
  border-color: #10B981 !important;
}

.field-error-msg {
  display: none;
  font-size: 12px;
  color: #EF4444;
  margin-top: 5px;
  font-weight: 600;
}

.is-invalid + .field-error-msg {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Floating Action Hub */
.floating-hub {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.hub-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 24px rgba(11, 37, 69, 0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.hub-btn:hover {
  transform: scale(1.1);
}

.hub-btn.whatsapp {
  background: #25D366;
}

.hub-btn.call {
  background: #0B2545;
  border: 1.5px solid rgba(0, 180, 216, 0.4);
}

.hub-btn.top {
  background: #FFFFFF;
  color: #0B2545;
  border: 1.5px solid #E2E8F0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.hub-btn.top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hub-btn .tooltip {
  position: absolute;
  right: 64px;
  background: #07182C;
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.hub-btn:hover .tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Filter Tab Active */
.filter-tab.active {
  background-color: #0B2545;
  color: #FFFFFF;
  border-color: #0B2545;
  box-shadow: 0 4px 14px rgba(11, 37, 69, 0.25);
}
