/* ==========================================================================
   Tomorrow Today Mobile Health Service - Brand Design System
   Palette:
   - Deep Teal:      #1E817C
   - Soft Teal:      #A5CECC
   - Dark Slate:     #334452
   - Clean White:    #FEFEFE
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600&display=swap');

:root {
  --color-primary: #1E817C;
  --color-primary-dark: #166561;
  --color-primary-light: #e6f3f2;
  --color-accent: #A5CECC;
  --color-accent-soft: #dbeeed;
  --color-dark: #334452;
  --color-dark-muted: #536b7f;
  --color-surface: #FEFEFE;
  --color-border: #e2e8f0;
}

/* --------------------------------------------------------------------------
   GLOBAL FONT: MONTSERRAT
   -------------------------------------------------------------------------- */
*, html, body, button, input, select, textarea, h1, h2, h3, h4, h5, h6, a, p, span {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* --------------------------------------------------------------------------
   CUSTOM MEDICAL CROSS CURSOR
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3V21M3 12H21' stroke='%23ffffff' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M12 4V20M4 12H20' stroke='%231E817C' stroke-width='2.5' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='12' r='2' fill='%23A5CECC'/%3E%3C/svg%3E") 12 12, crosshair !important;
}

button, a, input, select, textarea, [role="button"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28' fill='none'%3E%3Ccircle cx='14' cy='14' r='10' fill='%231E817C' fill-opacity='0.15' stroke='%231E817C' stroke-width='1.5' stroke-dasharray='3 2'/%3E%3Cpath d='M14 6V22M6 14H22' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round'/%3E%3Cpath d='M14 7V21M7 14H21' stroke='%23166561' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='14' cy='14' r='2' fill='%23A5CECC'/%3E%3C/svg%3E") 14 14, pointer !important;
}

body {
  color: var(--color-dark);
  background-color: #fbfcff;
  line-height: 1.6;
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  padding-bottom: 90px; /* Space for the floating bottom navbar */
}

/* Ensure smooth offset for sections when scrolled to */
section[id] {
  scroll-margin-top: 72px;
}

/* --------------------------------------------------------------------------
   FLOATING BOTTOM PILL NAVBAR (RESPONSIVE & REACTIVE)
   -------------------------------------------------------------------------- */
.floating-bottom-nav {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(165, 206, 204, 0.55);
  box-shadow: 0 10px 30px -4px rgba(51, 68, 82, 0.16), 0 4px 12px -2px rgba(30, 129, 124, 0.08);
  border-radius: 9999px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 24px);
  max-width: 440px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-nav-item {
  flex: 1 1 0%;
  padding: 8px 2px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
  color: #536b7f;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  text-align: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.bottom-nav-item:hover {
  color: #1E817C;
  background-color: #f1f7f7;
}

/* Active tab state with soft green-teal capsule */
.bottom-nav-item.active {
  background-color: #c9e8e6;
  color: #166561;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(30, 129, 124, 0.15);
}

@media (min-width: 640px) {
  .floating-bottom-nav {
    width: auto;
    max-width: none;
    bottom: 24px;
    padding: 6px 8px;
    gap: 4px;
  }
  .bottom-nav-item {
    flex: initial;
    padding: 8px 18px;
    font-size: 13px;
  }
}

/* --------------------------------------------------------------------------
   TOP HEADER
   -------------------------------------------------------------------------- */
.top-header {
  background: rgba(254, 254, 254, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(165, 206, 204, 0.3);
  box-shadow: 0 2px 10px -2px rgba(30, 129, 124, 0.04);
}

/* Micro-animations */
@keyframes floatGentle {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}
.animate-float {
  animation: floatGentle 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(30, 129, 124, 0.25); }
  50% { box-shadow: 0 0 0 8px rgba(30, 129, 124, 0); }
}
.animate-pulse-glow {
  animation: pulseGlow 2.5s infinite;
}

/* Buttons */
.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.6rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  box-shadow: 0 4px 10px -1px rgba(30, 129, 124, 0.25);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -2px rgba(30, 129, 124, 0.35);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.6rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-2px);
  color: var(--color-primary-dark);
}

/* Modern Cards */
.modern-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.modern-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
  box-shadow: 0 16px 30px -8px rgba(30, 129, 124, 0.12);
}

/* Live Active Indicator */
.pulse-indicator {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
}

.pulse-indicator::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  background-color: #10b981;
  opacity: 0.6;
  animation: pulseAnim 2s infinite;
}

@keyframes pulseAnim {
  0% { transform: scale(1); opacity: 0.6; }
  70% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Modals */
.modal-backdrop {
  background: rgba(51, 68, 82, 0.65);
  backdrop-filter: blur(6px);
  transition: opacity 0.2s ease-in-out;
}

.modal-content {
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Print Voucher */
@media print {
  body * {
    visibility: hidden;
  }
  #printableVoucher, #printableVoucher * {
    visibility: visible;
  }
  #printableVoucher {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
    box-shadow: none;
    border: 1px solid #000;
  }
  .no-print, .floating-bottom-nav {
    display: none !important;
  }
}
