/* ----- Base styles ----- */

body {
  font-family: Arial, sans-serif;
  margin: 20px;
  background: #fafafa;
}

h1 {
  font-family: 'Titillium Web', 'Raleway', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  color: #007acc;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.subtitle {
  font-family: 'Quicksand', sans-serif;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #6b4c3b;
  text-align: center;
  margin-bottom: 30px;
  font-weight: 500;
}

/* ----- Desktop logo — stays exactly as it is now ----- */
.logo-desktop {
  position: absolute;
  top: 15px;           /* Moves logo closer to top edge */
  left: 24px;
  height: 90px;        /* Slightly larger than 64px or 72px */
  width: auto;
  margin-top: -4px;    /* Nudges it upward relative to its container */
  z-index: 1000;
}

/* Mobile logo — hidden by default */
.logo-mobile {
  display: none;
  max-width: 80px;
  height: auto;
  margin: 1rem auto 0.5rem; /* centers and adds breathing room */
}
/* ----- Tabs ----- */

.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
  transition: box-shadow 0.5s ease;
}

.tab {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  background: #007acc;
  color: #fff;
  margin: 5px;
  transition: background 0.3s ease;
}

.tab:hover { background: #005f99; }
.tab.active { background: #004d80; }
.tab.spotlight {
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.5),     /* softer outline */
    0 0 60px rgba(255, 255, 255, 0.6),     /* strong mid glow */
    0 0 150px rgba(255, 255, 255, 0.4),    /* wide halo */
    0 0 300px rgba(255, 255, 255, 0.3),    /* extended aura */
    0 0 600px rgba(255, 255, 255, 0.2);    /* ultra‑wide spotlight */
  transition: box-shadow 0.4s ease;
  animation: tabPulse 3s ease-in-out infinite;
}

/* ----- Search box ----- */

#searchBox {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
}
#searchBox.spotlight {
  box-shadow:
    0 0 0 12px rgba(255, 255, 255, 0.9),     /* thick bright outline */
    0 0 100px rgba(255, 255, 255, 1),       /* intense mid glow */
    0 0 250px rgba(255, 255, 255, 0.8),     /* wide halo */
    0 0 500px rgba(255, 255, 255, 0.6),     /* extended aura */
    0 0 900px rgba(255, 255, 255, 0.4);     /* ultra‑wide spotlight */
  transition: box-shadow 0.4s ease;
  animation: searchPulse 3s ease-in-out infinite;
}

@keyframes searchPulse {
  0% {
    box-shadow:
      0 0 0 12px rgba(255,255,255,0.9),
      0 0 100px rgba(255,255,255,1),
      0 0 250px rgba(255,255,255,0.8),
      0 0 500px rgba(255,255,255,0.6),
      0 0 900px rgba(255,255,255,0.4);
  }
  50% {
    box-shadow:
      0 0 0 14px rgba(255,255,255,1),
      0 0 150px rgba(255,255,255,1),
      0 0 350px rgba(255,255,255,0.9),
      0 0 700px rgba(255,255,255,0.7),
      0 0 1200px rgba(255,255,255,0.5);
  }
  100% {
    box-shadow:
      0 0 0 12px rgba(255,255,255,0.9),
      0 0 100px rgba(255,255,255,1),
      0 0 250px rgba(255,255,255,0.8),
      0 0 500px rgba(255,255,255,0.6),
      0 0 900px rgba(255,255,255,0.4);
  }
}

/* ----- Table ----- */

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

th, td {
  padding: 12px;
  border: 1px solid #ccc;
  text-align: left;
  position: relative;
}

th {
  background: #007acc;
  color: #fff !important;
  font-weight: bold;
}

th:nth-child(1), td:nth-child(1) { width: 20%; }
th:nth-child(2), td:nth-child(2) {
  width: 20%;
  text-align: center;
  font-weight: bold;
  font-size: 15px;
  color: #007acc;
}
th:nth-child(3), td:nth-child(3) { width: 60%; }

tr:nth-child(even) { background: #f9f9f9; }
tr:hover { background: #e6f7ff; }

/* ----- Select dropdown ------ */

select {
  appearance: none;
  background-color: #fff;
  color: #555;
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  min-width: 120px;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="12" viewBox="0 0 24 24" width="12" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  transition: color 0.3s ease, background-color 0.3s ease;
}
select:hover { color: #333; background-color: #f5f5f5; }
select:focus { color: #007acc; }

/* ----- Info icon + tooltip ----- */

.info-icon {
  all: unset; /* reset default button styles */
  position: relative; /* needed for ::after hit area */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;   /* visual size */
  height: 18px;
  margin-left: 8px;
  background-color: #007acc;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
  touch-action: manipulation; /* prevents double-tap zoom delay */
  -webkit-tap-highlight-color: transparent; /* suppress Chrome/Safari ripple */
}
.info-icon:hover { background-color: #005f99; }

.info-icon:focus,
.info-icon:focus-visible {
  outline: none;
}

/* ✅ Invisible hit area to enlarge tap target */
.info-icon::after {
  content: "";
  position: absolute;
  top: -12px;
  left: -12px;
  width: 42px;
  height: 42px;
  background: transparent;
}

/* ✅ Suppress the square highlight on mobile tap */
.info-icon:focus,
.info-icon:focus-visible {
  outline: none;
}

/* ----- Tooltip styles (centered + compact + consistent) ----- */
/* ----- Tooltip styles ----- */
.tooltip {
  position: absolute;
  background: #f9f9f9;
  color: #333;
  padding: 6px 8px;              /* compact padding */
  border-radius: 4px;
  font-size: 12px;
  left: 25px;                    /* anchored relative to icon */
  white-space: normal;
  z-index: 999;
  max-width: 240px;
  line-height: 1.3;
  border: 1px solid #ccc;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Show state */
.tooltip.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Default below placement */
.tooltip.below {
  top: 140%;
  bottom: auto;
}

/* Arrow pointing up (for below) */
.tooltip.below::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 12px;
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #f9f9f9 transparent;
}

/* Flipped above placement */
.tooltip.above {
  bottom: 140%;
  top: auto;
  transform: translateY(-6px);
}

.tooltip.above.show {
  transform: translateY(0);
}

/* Arrow pointing down (for above) */
.tooltip.above::before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 12px;
  border-width: 6px;
  border-style: solid;
  border-color: #f9f9f9 transparent transparent transparent;
}

/* ----- Mobile-specific override: show on tap ----- */
@media (hover: none) and (pointer: coarse) {
  .tooltip { display: none; }
  .tooltip.show { display: block; }
}

/* ----- No-results doctor + caption with spotlight ----- */
.no-results {
  text-align: center;
  margin-top: 30px;
  background: none;
  padding: 0;
  display: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.no-results.show {
  display: block;
  opacity: 1;
}

/* ----- Shimmer animation ----- */
@keyframes shimmer {
  0%   { box-shadow: 0 0 40px rgba(255, 255, 255, 0.3); }
  50%  { box-shadow: 0 0 60px rgba(255, 255, 255, 0.5); }
  100% { box-shadow: 0 0 40px rgba(255, 255, 255, 0.3); }
}

.doctor-wrapper {
  display: inline-block;
  position: relative;
  z-index: 2;
  animation: bounce 1.2s ease-in-out infinite, pulseGlow 4s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2); /* softer glow */
  background: radial-gradient(circle at center, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.1) 80%);
  border-radius: 50%;
  padding: 16px;
}
.doctor-static {
  width: 100%;          /* scales with container */
  max-width: 250px;     /* never grows beyond 250px */
  height: auto;         /* keeps proportions */
  filter: drop-shadow(0 5px 5px rgba(0,0,0,0.2));
  transition: transform 0.3s ease;
}

 .no-results-caption {
     font-family: 'Nunito', 'Quicksand', sans-serif;
     font-size: clamp(1rem, 2vw, 1.25rem);
     font-weight: 500;
     color: #6b4c3b; /* warm brown from doctor’s palette */
     margin-top: 14px;
     text-align: center;
     text-shadow: 0.5px 0.5px 1px rgba(0, 0, 0, 0.1);
     animation: fadeIn 0.6s ease forwards;
    }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulseGlow {
  0%   { box-shadow: 0 0 30px rgba(255,255,255,0.2); }
  50%  { box-shadow: 0 0 50px rgba(255,255,255,0.4); }
  100% { box-shadow: 0 0 30px rgba(255,255,255,0.2); }
}

@keyframes tabPulse {
  0% {
    box-shadow:
      0 0 0 8px rgba(255,255,255,0.5),
      0 0 60px rgba(255,255,255,0.6),
      0 0 150px rgba(255,255,255,0.4),
      0 0 300px rgba(255,255,255,0.3),
      0 0 600px rgba(255,255,255,0.2);
  }
  50% {
    box-shadow:
      0 0 0 10px rgba(255,255,255,0.7),
      0 0 90px rgba(255,255,255,0.7),
      0 0 200px rgba(255,255,255,0.5),
      0 0 400px rgba(255,255,255,0.4),
      0 0 800px rgba(255,255,255,0.25);
  }
  100% {
    box-shadow:
      0 0 0 8px rgba(255,255,255,0.5),
      0 0 60px rgba(255,255,255,0.6),
      0 0 150px rgba(255,255,255,0.4),
      0 0 300px rgba(255,255,255,0.3),
      0 0 600px rgba(255,255,255,0.2);
  }
}

/* --- Overlay effect --- */
#overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle at center, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.01) 100%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}
#overlay.show {
  opacity: 1;
}

/* --- Highlight effect --- */
#highlight {
  position: relative;
  z-index: 1000; /* sits above overlay */
  text-align: center;
  color: white;
  display: none; /* hidden until triggered */
}

/* ----- Responsive settings for small phones ----- */

@media (max-width: 480px) {
  h1 { font-size: 1.2rem; }
  .tab { font-size: 12px; padding: 6px 10px; width: 100%; }
  #searchBox { font-size: 14px; }
  th, td { font-size: 0.8rem; padding: 6px; }
  .doctor-static { max-width: 150px; }
}

/* ----- Responsive settings for larger phones & small tablets */

@media (max-width: 768px) {
  h1 { font-size: 1.4rem; }
  .tabs { flex-direction: column; align-items: stretch; }
  .tab { font-size: 14px; padding: 8px 12px; }
  #searchBox { font-size: 15px; }
  th, td { font-size: 0.9rem; }
  .doctor-static { max-width: 180px; }
}

/* ----- tablets & small laptops ----- */

@media (max-width: 1024px) {
  h1 { font-size: 1.6rem; }
  .tab { font-size: 15px; }
  table { font-size: 0.95rem; }
  .doctor-static { max-width: 200px; }
}

/* Mobile override — swap logos */
@media (max-width: 600px) {
  .logo-desktop { display: none; }
  .logo-mobile { display: block; }
}

/* Desktop hover tooltips */
@media (hover: hover) and (pointer: fine) {
  .info-icon:hover + .tooltip {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}
