@import url('https://fonts.googleapis.com/css2?family=Anuphan:wght@100;200;300;400;500;600;700;800;900&display=swap');

.material-symbols-outlined {
  font-size: 24px;
  width: 1em;
  height: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}

/* Material Symbols Overrides by Selector */
.search-icon .material-symbols-outlined {
  font-size: 20px;
}

.search-clear-btn .material-symbols-outlined {
  font-size: 18px;
}

.empty-state-icon .material-symbols-outlined {
  font-size: 48px;
}

.patient-card-icon .material-symbols-outlined {
  font-size: 28px;
}

.upload-icon {
  font-size: 28px;
  width: 28px;
  height: 28px;
}

.photo-remove-btn .material-symbols-outlined {
  font-size: 18px;
}

.location-banner-icon .material-symbols-outlined {
  font-size: 24px;
}

:root {
  /* Colors - Palette Tokens */
  --primary-30-base: #008858;
  --primary-40: #00b274;
  --primary-95: #ebfaf4;
  --secondary-40-main: #325fb4;
  --secondary-90: #dfe7f6;
  --secondary-95: #eff3fa;
  --neutral-0: #000000;
  --neutral-10: #151618;
  --neutral-20: #25272a;
  --neutral-25: #2a2d31;
  --neutral-30: #2f3337;
  --neutral-40: #373c41;
  --neutral-50: #3d4349;
  --neutral-60: #62676c;
  --neutral-70: #8b9094;
  --neutral-80: #b4b8bb;
  --neutral-90: #dde0e2;
  --neutral-94: #ebecee;
  --neutral-96: #f1f3f3;
  --neutral-98: #f8f9f9;
  --neutral-100: #ffffff;
  
  --danger-40: #d92d20;
  --danger-95: #fef3f2;
  --positive-50: #17b26a;
  --positive-95: #ecfdf3;
  --warning-50: #f79009;
  --warning-95: #fffaeb;

  /* Semantic Colors */
  --canvas-default: var(--neutral-98);
  --canvas-white: var(--neutral-100);
  --background-primary-dark: var(--primary-30-base);
  --background-primary-lighter: var(--primary-95);
  --background-secondary-medium: var(--secondary-40-main);
  --background-neutral-lighter: var(--neutral-100);
  --background-neutral-light: var(--neutral-98);
  --background-neutral-medium: var(--neutral-96);
  --background-neutral-dark: var(--neutral-94);
  --background-negative-solid: var(--danger-40);
  --background-negative-light: var(--danger-95);
  --background-positive-medium: var(--positive-50);
  --background-positive-light: var(--positive-95);
  --background-warning-medium: var(--warning-50);
  --background-warning-light: var(--warning-95);

  --foreground-neutral-default: var(--neutral-20);
  --foreground-neutral-light: var(--neutral-40);
  --foreground-neutral-lighter: var(--neutral-60);
  --foreground-primary-default: var(--primary-30-base);
  --foreground-secondary-default: var(--secondary-40-main);
  --foreground-negative-default: var(--danger-40);
  
  --stroke-neutral-default: var(--neutral-90);
  --stroke-neutral-lighter: var(--neutral-94);
  --stroke-primary-default: var(--primary-30-base);

  /* Spacing Scale */
  --spacing-none: 0px;
  --spacing-xxs: 2px;
  --spacing-xs: 4px;
  --spacing-sm: 6px;
  --spacing-md: 8px;
  --spacing-lg: 12px;
  --spacing-xl: 16px;
  --spacing-2xl: 20px;
  --spacing-3xl: 24px;
  --spacing-4xl: 32px;
  --spacing-5xl: 40px;
  --spacing-6xl: 48px;

  /* Border Radius Scale */
  --radius-none: 0px;
  --radius-xxs: 2px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 20px;
  --radius-4xl: 24px;
  --radius-full: 1000px;

  /* Shadows */
  --shadow-custom: 0 4px 6px -1px rgba(62, 67, 76, 0.05);
  --shadow-custom-lg: 0 10px 15px -3px rgba(62, 67, 76, 0.1), 0 4px 6px -2px rgba(62, 67, 76, 0.05);
  --shadow-custom-xl: 0 20px 25px -5px rgba(62, 67, 76, 0.1), 0 10px 10px -5px rgba(62, 67, 76, 0.04);

  /* Typography scale */
  --font-size-label-s: 11px;     --line-height-label-s: 16px;
  --font-size-body-s: 12px;      --line-height-body-s: 16px;
  --font-size-label-m: 12px;     --line-height-label-m: 18px;
  --font-size-title-s: 14px;     --line-height-title-s: 20px;
  --font-size-body-m: 14px;      --line-height-body-m: 20px;
  --font-size-label-l: 14px;     --line-height-label-l: 21px;
  --font-size-title-m: 16px;     --line-height-title-m: 24px;
  --font-size-body-l: 16px;      --line-height-body-l: 24px;
  --font-size-label-xl: 16px;    --line-height-label-xl: 24px;
  --font-size-title-l: 18px;     --line-height-title-l: 26px;
  --font-size-headline-s: 24px;  --line-height-headline-s: 32px;
  --font-size-headline-m: 28px;  --line-height-headline-m: 36px;
  --font-size-headline-l: 32px;  --line-height-headline-l: 40px;
  --font-size-display-s: 36px;   --line-height-display-s: 44px;
}

/* Global Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Anuphan', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--canvas-default);
  color: var(--foreground-neutral-default);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--background-neutral-light);
}
::-webkit-scrollbar-thumb {
  background: var(--stroke-neutral-default);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--foreground-neutral-lighter);
}

/* Screen reader only utility class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Page Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--background-neutral-lighter);
  border-bottom: 1px solid var(--stroke-neutral-default);
  box-shadow: var(--shadow-custom);
  padding: var(--spacing-md) var(--spacing-xl);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1024px;
  margin: 0 auto;
  width: 100%;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  background-color: var(--background-primary-dark);
  color: var(--neutral-100);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.logo-icon svg,
.logo-icon .material-symbols-outlined {
  width: 18px;
  height: 18px;
  font-size: 18px;
  fill: currentColor;
}

.logo-text h1 {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--foreground-neutral-default);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.logo-text p {
  display: none;
  font-size: var(--font-size-label-s);
  line-height: var(--line-height-label-s);
  color: var(--foreground-neutral-lighter);
}

/* Action Controls & Unified Segmented Language Toggle */
.header-actions {
  display: flex;
  align-items: center;
}

.header-actions nav {
  display: flex;
  background-color: var(--background-neutral-medium);
  border: 1px solid var(--stroke-neutral-default);
  border-radius: var(--radius-full);
  padding: 2px;
  gap: 2px;
}

.btn-toggle {
  background-color: transparent;
  border: none;
  color: var(--foreground-neutral-light);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--font-size-label-m);
  font-weight: 700;
  height: 28px;
  width: 38px;
  padding: 0;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-toggle:hover {
  color: var(--foreground-neutral-default);
}

.btn-toggle:focus-visible {
  outline: 2px solid var(--stroke-primary-default);
  outline-offset: 2px;
}

.btn-toggle.active {
  background-color: var(--background-primary-dark);
  color: var(--neutral-100);
  box-shadow: var(--shadow-custom);
}

/* Responsive adjustments for extremely small screens */
@media (max-width: 360px) {
  .logo-text h1 {
    font-size: 12px;
  }
  .logo-icon {
    width: 28px;
    height: 28px;
  }
  .logo-icon svg,
  .logo-icon .material-symbols-outlined {
    width: 14px;
    height: 14px;
    font-size: 14px;
  }
}

/* Main Content Wrapper */
.main-content {
  flex: 1;
  padding: var(--spacing-xl);
  max-width: 1024px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2xl);
}

/* Search Bar Styles */
.search-section {
  position: relative;
  width: 100%;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: var(--spacing-xl);
  color: var(--foreground-neutral-lighter);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-lg) calc(var(--spacing-xl) * 2.5);
  font-family: inherit;
  font-size: var(--font-size-body-l);
  line-height: var(--line-height-body-l);
  color: var(--neutral-10);
  background-color: var(--canvas-white);
  border: 1px solid var(--stroke-neutral-default);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-custom);
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--stroke-primary-default);
  box-shadow: 0 0 0 4px var(--primary-95);
}

.search-clear-btn {
  position: absolute;
  right: var(--spacing-lg);
  background: none;
  border: none;
  color: var(--foreground-neutral-lighter);
  cursor: pointer;
  padding: var(--spacing-xs);
  border-radius: var(--radius-full);
  display: none; /* Controlled by JS */
  align-items: center;
  justify-content: center;
}

.search-clear-btn:hover {
  background-color: var(--background-neutral-medium);
  color: var(--foreground-neutral-default);
}

/* Info Banner */
.info-banner {
  background-color: var(--background-primary-lighter);
  border: 1px solid var(--primary-40);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  display: flex;
  gap: var(--spacing-lg);
  align-items: flex-start;
  transition: all 0.3s ease;
}

.info-banner-icon {
  color: var(--foreground-primary-default);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-top: 2px;
}

.info-banner-text h3 {
  font-size: var(--font-size-title-s);
  line-height: var(--line-height-title-s);
  font-weight: 700;
  color: var(--foreground-primary-default);
  margin-bottom: var(--spacing-xs);
}

.info-banner-text p {
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
  color: var(--foreground-neutral-light);
}

/* Quick Calls Grid */
.quick-calls-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.section-title {
  font-size: var(--font-size-title-l);
  line-height: var(--line-height-title-l);
  font-weight: 700;
  color: var(--foreground-neutral-default);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.section-title svg,
.section-title .material-symbols-outlined {
  color: var(--foreground-primary-default);
  font-size: 20px;
}

.quick-calls-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

/* Quick Card styling */
.quick-card {
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-2xl);
  padding: var(--spacing-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-custom);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.quick-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.quick-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-custom-lg);
}

.quick-card:active {
  transform: translateY(0);
}

.quick-card:focus-visible {
  outline: 3px solid var(--foreground-neutral-default);
  outline-offset: 2px;
}

/* Themed backgrounds for quick calls */
.quick-card.medical {
  background: linear-gradient(135deg, #e02d1b 0%, #a61208 100%);
  color: var(--neutral-100);
}
.quick-card.police {
  background: linear-gradient(135deg, #274b8c 0%, #172e59 100%);
  color: var(--neutral-100);
}
.quick-card.fire {
  background: linear-gradient(135deg, #e65c00 0%, #b33600 100%);
  color: var(--neutral-100);
}
.quick-card.tourist {
  background: linear-gradient(135deg, #008858 0%, #004d31 100%);
  color: var(--neutral-100);
}

.quick-card-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xxs);
}

.quick-card-label {
  font-size: var(--font-size-label-m);
  font-weight: 500;
  text-transform: uppercase;
  opacity: 0.9;
  letter-spacing: 0.5px;
}

.quick-card-dept {
  font-size: var(--font-size-title-m);
  font-weight: 700;
  line-height: var(--line-height-title-m);
}

.quick-card-number {
  font-size: var(--font-size-display-s);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-top: var(--spacing-xs);
}

.quick-card-call-icon {
  background-color: rgba(255, 255, 255, 0.2);
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-100);
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.quick-card:hover .quick-card-call-icon {
  background-color: rgba(255, 255, 255, 0.35);
}

/* Category Filter Navigation */
.category-nav {
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  margin: 0 calc(var(--spacing-xl) * -1);
  padding: var(--spacing-xs) var(--spacing-xl);
}

.category-nav::-webkit-scrollbar {
  display: none; /* Safari/Chrome */
}

.category-list {
  display: flex;
  gap: var(--spacing-sm);
  list-style: none;
  width: max-content;
}

.category-tab {
  background-color: var(--canvas-white);
  border: 1px solid var(--stroke-neutral-default);
  color: var(--foreground-neutral-light);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--font-size-body-m);
  font-weight: 500;
  height: 40px;
  padding: 0 var(--spacing-xl);
  border-radius: var(--radius-full);
  white-space: nowrap;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-custom);
}

.category-tab:hover {
  background-color: var(--background-neutral-medium);
  color: var(--foreground-neutral-default);
}

.category-tab:focus-visible {
  outline: 2px solid var(--stroke-primary-default);
  outline-offset: 2px;
}

.category-tab.active {
  background-color: var(--background-primary-lighter);
  color: var(--foreground-primary-default);
  border-color: var(--stroke-primary-default);
  font-weight: 600;
}

/* Cards Section */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-body-s);
  color: var(--foreground-neutral-lighter);
  font-weight: 500;
}

.numbers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

/* Standard Number Card */
.number-card {
  background-color: var(--canvas-white);
  border: 1px solid var(--stroke-neutral-default);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  box-shadow: var(--shadow-custom);
  transition: all 0.2s ease;
}

.number-card:hover {
  border-color: var(--stroke-neutral-default);
  box-shadow: var(--shadow-custom-lg);
}

.number-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.number-card-main {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xxs);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-full);
  font-size: var(--font-size-label-s);
  font-weight: 600;
  padding: var(--spacing-xxs) var(--spacing-md);
  border: 1px solid transparent;
  width: fit-content;
}

.badge.medical {
  background-color: var(--danger-95);
  color: var(--danger-40);
}

.badge.police {
  background-color: var(--secondary-95);
  color: var(--secondary-40-main);
}

.badge.fire {
  background-color: var(--background-warning-light);
  color: var(--foreground-warning-default);
}

.badge.public {
  background-color: var(--background-primary-lighter);
  color: var(--foreground-primary-default);
}

.badge.utility {
  background-color: var(--background-neutral-medium);
  color: var(--foreground-neutral-light);
}

.number-card-title {
  font-size: var(--font-size-title-l);
  font-weight: 700;
  color: var(--foreground-neutral-default);
  line-height: var(--line-height-title-l);
}

.number-card-desc {
  font-size: var(--font-size-body-m);
  line-height: var(--line-height-body-m);
  color: var(--foreground-neutral-light);
}

.number-card-hotline {
  font-size: var(--font-size-headline-m);
  font-weight: 900;
  color: var(--foreground-primary-default);
  line-height: 1;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.number-card-hotline svg,
.number-card-hotline .icon-call,
.number-card-hotline .material-symbols-outlined {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

/* Call Button (Pill shaped, min 48px height) */
.btn-call {
  background-color: var(--primary-30-base);
  color: var(--neutral-100);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--font-size-body-l);
  font-weight: 600;
  min-height: 48px;
  width: 100%;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: var(--shadow-custom);
}

.btn-call:hover {
  background-color: var(--primary-40);
}

.btn-call:active {
  transform: scale(0.98);
}

.btn-call:focus-visible {
  outline: 2px solid var(--stroke-primary-default);
  outline-offset: 2px;
}

/* Call button medical overrides */
.number-card.medical .btn-call {
  background-color: var(--danger-40);
}
.number-card.medical .btn-call:hover {
  background-color: #f04438;
}
.number-card.medical .number-card-hotline {
  color: var(--danger-40);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-5xl) var(--spacing-xl);
  text-align: center;
  background-color: var(--canvas-white);
  border-radius: var(--radius-xl);
  border: 1px dashed var(--stroke-neutral-default);
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.empty-state-icon {
  color: var(--foreground-neutral-lighter);
  margin-bottom: var(--spacing-sm);
}

.empty-state-title {
  font-size: var(--font-size-title-l);
  font-weight: 700;
  color: var(--foreground-neutral-default);
}

.empty-state-desc {
  font-size: var(--font-size-body-m);
  color: var(--foreground-neutral-lighter);
  max-width: 320px;
}

/* Footer styling */
.sticky-footer {
  background-color: var(--background-neutral-lighter);
  border-top: 1px solid var(--stroke-neutral-default);
  padding: var(--spacing-xl);
  text-align: center;
  font-size: var(--font-size-body-s);
  color: var(--foreground-neutral-lighter);
  margin-top: auto;
}

.footer-content {
  max-width: 1024px;
  margin: 0 auto;
}

.footer-disclaimer {
  line-height: var(--line-height-label-s);
}

/* DESKTOP STYLING (Breakpoints - 1024px and above) */
@media (min-width: 1024px) {
  .sticky-header {
    padding: var(--spacing-lg) var(--spacing-4xl);
  }

  .logo-text h1 {
    font-size: var(--font-size-title-l);
    line-height: var(--line-height-title-l);
  }

  .main-content {
    padding: var(--spacing-3xl) var(--spacing-4xl);
    gap: var(--spacing-3xl);
  }

  .quick-calls-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
  }

  .quick-card {
    padding: var(--spacing-xl);
    height: 160px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: space-between;
  }

  .quick-card-call-icon {
    align-self: flex-end;
  }

  .category-nav {
    margin: 0;
    padding: 0;
  }

  .numbers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
  }

  .number-card {
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
  }

  .number-card-top {
    flex-direction: column;
    width: 100%;
  }

  .btn-call {
    margin-top: auto;
  }

}

/* ==========================================================================
   1669 Emergency Reporting Modal
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(21, 22, 24, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1500;
  padding: var(--spacing-md);
  box-sizing: border-box;
  animation: fadeIn 0.3s ease-out;
}

.modal-container {
  background-color: var(--canvas-white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  border: 1px solid var(--neutral-90);
}

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

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid var(--neutral-94);
}

.modal-header-title {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-title-m);
  line-height: var(--line-height-title-m);
  font-weight: 700;
  color: var(--text-dark-primary);
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-dark-secondary);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: background-color 0.2s, color 0.2s;
}

.modal-close-btn:hover {
  background-color: var(--neutral-94);
  color: var(--text-dark-primary);
}

.modal-body {
  padding: var(--spacing-xl);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

/* Fast Call Button */
.fast-call-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.btn-fast-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  background-color: var(--danger-40);
  color: var(--neutral-100);
  width: 100%;
  padding: var(--spacing-lg);
  border-radius: var(--radius-full);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body-l);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 6px -1px rgba(217, 45, 32, 0.2), 0 2px 4px -1px rgba(217, 45, 32, 0.1);
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-fast-call:hover {
  background-color: #b92217;
  box-shadow: 0 10px 15px -3px rgba(217, 45, 32, 0.3);
}

.btn-fast-call:active {
  transform: scale(0.98);
}

.btn-fast-call svg,
.btn-fast-call .icon-call {
  animation: shakePhone 2s infinite ease-in-out;
}

@keyframes shakePhone {
  0%, 100% { transform: rotate(0); }
  10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
  20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

.fast-call-hint {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body-s);
  color: var(--text-dark-secondary);
  margin: var(--spacing-xs) 0 0 0;
}

/* Divider */
.modal-divider {
  display: flex;
  align-items: center;
  text-align: center;
  width: 100%;
  color: var(--text-dark-secondary);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body-s);
  font-weight: 500;
}

.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px dashed var(--neutral-80);
}

.modal-divider:not(:empty)::before {
  margin-right: var(--spacing-md);
}

.modal-divider:not(:empty)::after {
  margin-left: var(--spacing-md);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  width: 100%;
}

.form-label {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body-m);
  font-weight: 600;
  color: var(--text-dark-primary);
}

.form-input {
  width: 100%;
  box-sizing: border-box;
  padding: var(--spacing-md);
  border: 1px solid var(--neutral-80);
  border-radius: var(--radius-md);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body-m);
  background-color: var(--canvas-white);
  color: var(--text-dark-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--primary-30-base);
  box-shadow: 0 0 0 3px rgba(0, 136, 88, 0.1);
}

/* Patient Selector Grid */
.patient-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
  width: 100%;
}

.patient-card {
  background-color: var(--canvas-white);
  border: 2px solid var(--neutral-90);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg) var(--spacing-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  cursor: pointer;
  font-family: var(--font-family-sans);
  font-weight: 600;
  color: var(--text-dark-secondary);
  transition: all 0.2s ease-in-out;
}

.patient-card-icon {
  color: var(--neutral-60);
  transition: color 0.2s;
}

.patient-card:hover {
  border-color: var(--neutral-60);
  background-color: var(--neutral-98);
}

.patient-card.active {
  border-color: var(--secondary-40-main);
  background-color: var(--secondary-95);
  color: var(--secondary-40-main);
  box-shadow: 0 4px 6px -1px rgba(50, 95, 180, 0.1);
}

.patient-card.active .patient-card-icon {
  color: var(--secondary-40-main);
}

/* Symptom Chips */
.symptom-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  width: 100%;
}

.symptom-chip {
  background-color: var(--canvas-white);
  border: 1px solid var(--neutral-80);
  border-radius: var(--radius-full);
  padding: var(--spacing-xs) var(--spacing-md);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body-s);
  font-weight: 500;
  color: var(--text-dark-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  transition: all 0.2s;
  border-color: var(--neutral-80);
}

.symptom-chip .material-symbols-outlined {
  font-size: 18px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.symptom-chip:hover {
  background-color: var(--neutral-98);
  border-color: var(--neutral-60);
}

.symptom-chip.active {
  background-color: var(--primary-95);
  border-color: var(--primary-30-base);
  color: var(--primary-30-base);
  font-weight: 600;
}

/* Photo Uploader */
.photo-uploader-container {
  position: relative;
  border: 2px dashed var(--neutral-80);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: var(--neutral-98);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  min-height: 100px;
}

.photo-uploader-container:hover {
  border-color: var(--primary-30-base);
  background-color: var(--primary-95);
}

.photo-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.photo-uploader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  pointer-events: none;
}

.upload-icon {
  color: var(--neutral-70);
  transition: color 0.2s;
}

.photo-uploader-container:hover .upload-icon {
  color: var(--primary-30-base);
}

.upload-text {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body-s);
  font-weight: 600;
  color: var(--text-dark-primary);
}

.upload-hint {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body-xs);
  color: var(--text-dark-secondary);
}

.photo-preview-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--neutral-10);
  max-height: 180px;
  z-index: 10;
}

.photo-preview-wrapper img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
}

.photo-remove-btn {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background-color: rgba(21, 22, 24, 0.7);
  border: none;
  color: var(--neutral-100);
  border-radius: var(--radius-full);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
  z-index: 12;
}

.photo-remove-btn:hover {
  background-color: var(--danger-40);
}

/* Location Banner */
.location-banner {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--neutral-96);
  border-radius: var(--radius-md);
  border: 1px solid var(--neutral-90);
}

.location-banner-icon {
  color: var(--positive-50);
  display: flex;
  align-items: center;
  justify-content: center;
}

.location-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.location-label {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body-s);
  font-weight: 700;
  color: var(--text-dark-primary);
}

.location-coordinates {
  font-family: monospace;
  font-size: var(--font-size-body-xs);
  color: var(--neutral-30);
}

/* Modal Footer Action Buttons */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-md);
  padding: var(--spacing-lg) var(--spacing-xl);
  border-top: 1px solid var(--neutral-94);
  background-color: var(--neutral-98);
}

.btn-secondary-action {
  background-color: var(--canvas-white);
  border: 1px solid var(--neutral-80);
  color: var(--text-dark-primary);
  border-radius: var(--radius-full);
  padding: var(--spacing-md) var(--spacing-xl);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body-m);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary-action:hover {
  background-color: var(--neutral-96);
  border-color: var(--neutral-60);
}

.btn-primary-action {
  background-color: var(--primary-30-base);
  border: none;
  color: var(--neutral-100);
  border-radius: var(--radius-full);
  padding: var(--spacing-md) var(--spacing-xl);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body-m);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  box-shadow: 0 4px 6px -1px rgba(0, 136, 88, 0.2);
  transition: all 0.2s;
}

.btn-primary-action:hover {
  background-color: #007048;
  box-shadow: 0 10px 15px -3px rgba(0, 136, 88, 0.3);
}

.btn-primary-action:active {
  transform: scale(0.98);
}

/* Prevent body scrolling when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Spinner and Loading Button Styles */
.spinner {
  animation: rotate 1s linear infinite;
  width: 18px;
  height: 18px;
  display: inline-block;
}

.spinner .path {
  stroke: currentColor;
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

.btn-primary-action:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translate(-50%, 24px);
  background-color: #1e293b; /* sleek dark slate */
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 50px;
  font-family: var(--font-family-sans);
  font-size: var(--font-size-body-m);
  font-weight: 500;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  z-index: 9999;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-notification.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* Custom Call Icon styling using CSS Mask */
.icon-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.quick-card-call-icon .icon-call {
  width: 24px;
  height: 24px;
  font-size: 24px;
}

.btn-call .icon-call {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

.btn-primary-action .icon-call {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.btn-fast-call .icon-call {
  width: 25px;
  height: 25px;
  font-size: 25px;
}
