/* General reset */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: #f7f9fc;
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 80px;
  margin: 0;
  padding: 0;
}

/* Header - centered with stacked layout */
#app-header {
  background: linear-gradient(90deg, #1976d2, #2196f3);
  color: white;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#logo {
  height: 100px; /* slightly smaller than before */
  width: auto;
  margin-bottom: 0.5rem;
}

.header-title {
  font-size: 2rem; /* smaller than before */
  font-weight: 600;
  margin-bottom: 0.3rem;
}

#header-date {
  font-size: 1.5rem;
  opacity: 0.9;
}


/* Doctor cards */
.doctor-card {
  background: white;
  margin: 0.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  overflow: hidden;
}
.doctor-card h2 {
  background: #d1eeff;
  padding: 0.75rem 1rem;
  font-size: 1.5rem;
  border-bottom: 1px solid #e0e6ed;
}
.doctor-card h3 {
  padding: 1rem 1rem 0.15rem;
  font-size: 1.2rem;
  font-style:italic;
  font-weight: bolder;
  color: #1976d2;
  /* border-top: 1px solid #e0e6ed; */
}

/* Doctor row */
.doctor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #d1eeff;
}
.doctor-info {
  display: flex;
  flex-direction: column;
}
.doctor-info strong {
  font-size: 1rem;
}
.doctor-info span {
  font-size: 0.85rem;
  color: #666;
}
.contact-icons {
  display: flex;
  gap: 0.5rem;
}
.icon-link svg {
  width: 28px;
  height: 28px;
  transition: transform 0.2s ease;
}
.icon-link:hover svg {
  transform: scale(1.2);
}

/* Footer */
#app-footer {
  text-align: center;
  padding: 0.8rem;
  font-size: 0.8rem;
  color: #666;
  border-top: 1px solid #ddd;
  margin-top: auto;
  margin-bottom: 10px;
}

/* Loading spinner */
/*.loading-spinner {
  border: 6px solid #eee;
  border-top: 6px solid #1976d2;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 16px auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
} */

/* Mobile */
@media (max-width: 600px) {
  .header-title {
    font-size: 2rem;
  }
  #logo {
    height: 100px;
  }
}

.loader-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60vh;
}

/* From Uiverse.io by Nawsome */ 
.loader {
  --background: linear-gradient(135deg, #23C4F8, #275EFE);
  --shadow: rgba(39, 94, 254, 0.28);
  --text: #6C7486;
  --page: rgba(255, 255, 255, 0.36);
  --page-fold: rgba(255, 255, 255, 0.52);
  --duration: 3s;
  width: 200px;
  height: 140px;
  position: relative;
}

.loader:before, .loader:after {
  --r: -6deg;
  content: "";
  position: absolute;
  bottom: 8px;
  width: 120px;
  top: 80%;
  box-shadow: 0 16px 12px var(--shadow);
  transform: rotate(var(--r));
}

.loader:before {
  left: 4px;
}

.loader:after {
  --r: 6deg;
  right: 4px;
}

.loader div {
  width: 100%;
  height: 100%;
  border-radius: 13px;
  position: relative;
  z-index: 1;
  perspective: 600px;
  box-shadow: 0 4px 6px var(--shadow);
  background-image: var(--background);
}

.loader div ul {
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
}

.loader div ul li {
  --r: 180deg;
  --o: 0;
  --c: var(--page);
  position: absolute;
  top: 10px;
  left: 10px;
  transform-origin: 100% 50%;
  color: var(--c);
  opacity: var(--o);
  transform: rotateY(var(--r));
  -webkit-animation: var(--duration) ease infinite;
  animation: var(--duration) ease infinite;
}

.loader div ul li:nth-child(2) {
  --c: var(--page-fold);
  -webkit-animation-name: page-2;
  animation-name: page-2;
}

.loader div ul li:nth-child(3) {
  --c: var(--page-fold);
  -webkit-animation-name: page-3;
  animation-name: page-3;
}

.loader div ul li:nth-child(4) {
  --c: var(--page-fold);
  -webkit-animation-name: page-4;
  animation-name: page-4;
}

.loader div ul li:nth-child(5) {
  --c: var(--page-fold);
  -webkit-animation-name: page-5;
  animation-name: page-5;
}

.loader div ul li svg {
  width: 90px;
  height: 120px;
  display: block;
}

.loader div ul li:first-child {
  --r: 0deg;
  --o: 1;
}

.loader div ul li:last-child {
  --o: 1;
}

.loader span {
  display: block;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 20px;
  text-align: center;
  color: var(--text);
}

@keyframes page-2 {
  0% {
    transform: rotateY(180deg);
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  35%, 100% {
    opacity: 0;
  }

  50%, 100% {
    transform: rotateY(0deg);
  }
}

@keyframes page-3 {
  15% {
    transform: rotateY(180deg);
    opacity: 0;
  }

  35% {
    opacity: 1;
  }

  50%, 100% {
    opacity: 0;
  }

  65%, 100% {
    transform: rotateY(0deg);
  }
}

@keyframes page-4 {
  30% {
    transform: rotateY(180deg);
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  65%, 100% {
    opacity: 0;
  }

  80%, 100% {
    transform: rotateY(0deg);
  }
}

@keyframes page-5 {
  45% {
    transform: rotateY(180deg);
    opacity: 0;
  }

  65% {
    opacity: 1;
  }

  80%, 100% {
    opacity: 0;
  }

  95%, 100% {
    transform: rotateY(0deg);
  }
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 16px; /* distance from bottom of viewport */
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid #ccc;
  border-radius: 9999px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 220px;
  height: 60px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  z-index: 50;
  transition: all 0.2s ease;
}

/* Push page content above navbar */
body, #main-content {
  padding-bottom: 80px; /* navbar height (60px) + bottom offset (16px) + extra 16px */
}

.bottom-nav button {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.bottom-nav button:hover {
  transform: scale(1.1);
}

.bottom-nav button svg {
  width: 28px;
  height: 28px;
  fill: #555;
  transition: fill 0.15s ease;
}

.bottom-nav button.active svg {
  fill: #1976d2; /* Active color */
}

.bottom-nav button span {
  font-size: 11px;
  color: #555;
  margin-top: 2px;
  transition: color 0.15s ease;
}

.bottom-nav button.active span {
  color: #1976d2;
}

/* Mobile touch-friendly padding */
@media (max-width: 400px) {
  .bottom-nav {
    width: 180px;
    height: 50px;
  }
  .bottom-nav button svg {
    width: 24px;
    height: 24px;
  }
  .bottom-nav button span {
    font-size: 9px;
  }

  body, #main-content {
    padding-bottom: 82px; /* adjust for smaller navbar */
  }
}



/*loading dots blinking*/
.dots {
  display: inline-block;
}

.dots::after {
  content: '.';
  animation: blink 1s steps(3, end) infinite;
}

@keyframes blink {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}
