/* Dynamic Emergency Care Desk + Whole-Bangladesh Ambulance Booking Styles */
.dh-sos-scope {
  box-sizing: border-box;
}
.dh-sos-scope *, .dh-sos-scope *::before, .dh-sos-scope *::after {
  box-sizing: border-box;
}

/* Scoped Responsive 12-Col Grid (works without external Bootstrap CSS on public pages) */
.dh-sos-scope .row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: start;
}
.dh-sos-scope .row.g-2 { gap: 0.65rem; }
.dh-sos-scope .row.g-3 { gap: 0.95rem; }
.dh-sos-scope .row.g-4 { gap: 1.35rem; }
.dh-sos-scope [class*="col-"] { grid-column: span 12; min-width: 0; }
.dh-sos-scope .col-6 { grid-column: span 6; }

@media (min-width: 576px) {
  .dh-sos-scope .col-sm-2 { grid-column: span 2; }
  .dh-sos-scope .col-sm-4 { grid-column: span 4; }
  .dh-sos-scope .col-sm-6 { grid-column: span 6; }
}
@media (min-width: 768px) {
  .dh-sos-scope .col-md-4 { grid-column: span 4; }
  .dh-sos-scope .col-md-5 { grid-column: span 5; }
  .dh-sos-scope .col-md-6 { grid-column: span 6; }
  .dh-sos-scope .col-md-7 { grid-column: span 7; }
  .dh-sos-scope .col-md-8 { grid-column: span 8; }
}
@media (min-width: 992px) {
  .dh-sos-scope .col-lg-4 { grid-column: span 4; }
  .dh-sos-scope .col-lg-5 { grid-column: span 5; }
  .dh-sos-scope .col-lg-6 { grid-column: span 6; }
  .dh-sos-scope .col-lg-7 { grid-column: span 7; }
  .dh-sos-scope .col-lg-8 { grid-column: span 8; }
}

/* Scoped Flex, Spacing, Forms, Cards, Badges, Alerts, Tables & Buttons */
.dh-sos-scope .d-none { display: none !important; }
.dh-sos-scope .d-flex { display: flex; }
.dh-sos-scope .d-block { display: block; }
.dh-sos-scope .flex-wrap { flex-wrap: wrap; }
.dh-sos-scope .justify-content-between { justify-content: space-between; }
.dh-sos-scope .align-items-center { align-items: center; }
.dh-sos-scope .align-items-end { align-items: flex-end; }
.dh-sos-scope .align-items-start { align-items: flex-start; }
.dh-sos-scope .gap-2 { gap: 0.5rem; }
.dh-sos-scope .gap-3 { gap: 0.9rem; }
.dh-sos-scope .vstack { display: flex; flex-direction: column; }
.dh-sos-scope .w-100 { width: 100%; }
.dh-sos-scope .me-1 { margin-right: 0.4rem; }
.dh-sos-scope .ms-1 { margin-left: 0.4rem; }
.dh-sos-scope .ms-2 { margin-left: 0.6rem; }
.dh-sos-scope .mt-1 { margin-top: 0.25rem; }
.dh-sos-scope .mt-2 { margin-top: 0.5rem; }
.dh-sos-scope .mt-3 { margin-top: 1rem; }
.dh-sos-scope .mb-0 { margin-bottom: 0; }
.dh-sos-scope .mb-1 { margin-bottom: 0.25rem; }
.dh-sos-scope .mb-2 { margin-bottom: 0.5rem; }
.dh-sos-scope .mb-3 { margin-bottom: 1rem; }
.dh-sos-scope .pb-2 { padding-bottom: 0.5rem; }
.dh-sos-scope .pb-3 { padding-bottom: 1rem; }
.dh-sos-scope .pt-2 { padding-top: 0.5rem; }
.dh-sos-scope .p-2 { padding: 0.6rem; }
.dh-sos-scope .p-3 { padding: 1rem; }
.dh-sos-scope .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.dh-sos-scope .px-3 { padding-left: 1rem; padding-right: 1rem; }
.dh-sos-scope .px-4 { padding-left: 1.35rem; padding-right: 1.35rem; }
.dh-sos-scope .small { font-size: 0.85rem; }
.dh-sos-scope .fw-bold { font-weight: 700; }
.dh-sos-scope .fw-semibold { font-weight: 600; }
.dh-sos-scope .text-muted { color: #64748b; }
.dh-sos-scope .text-danger { color: #dc2626; }
.dh-sos-scope .text-success { color: #059669; }
.dh-sos-scope .text-primary { color: #0b5ed7; }
.dh-sos-scope .text-teal { color: #0d9488; }
.dh-sos-scope .text-info { color: #67e8f9; }
.dh-sos-scope .text-white-50 { color: rgba(255, 255, 255, 0.72); }
.dh-sos-scope .text-end { text-align: right; }
.dh-sos-scope .text-uppercase { text-transform: uppercase; }
.dh-sos-scope .bg-light { background: #f8fafc; }
.dh-sos-scope .bg-white { background: #ffffff; }
.dh-sos-scope .rounded { border-radius: 10px; }
.dh-sos-scope .border { border: 1px solid #e2e8f0; }
.dh-sos-scope .border-top { border-top: 1px solid #e2e8f0; }
.dh-sos-scope .border-bottom { border-bottom: 1px solid #e2e8f0; }
.dh-sos-scope .border-success { border-color: #10b981; }
.dh-sos-scope .shadow-sm { box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06); }

.dh-sos-scope .form-label {
  display: block;
  font-size: 0.82rem;
  color: #334155;
  margin-bottom: 0.25rem;
}
.dh-sos-scope .form-control,
.dh-sos-scope .form-select {
  display: block;
  width: 100%;
  padding: 0.5rem 0.72rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #0f172a;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dh-sos-scope .form-control:focus,
.dh-sos-scope .form-select:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.dh-sos-scope .card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
}
.dh-sos-scope .card-header {
  padding: 0.72rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.88rem;
}
.dh-sos-scope .card-body {
  padding: 1rem;
}

.dh-sos-scope .badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 999px;
}
.dh-sos-scope .bg-primary { background: #0b5ed7; color: #ffffff; }
.dh-sos-scope .bg-success, .dh-sos-scope .text-bg-success { background: #059669; color: #ffffff; }
.dh-sos-scope .bg-danger, .dh-sos-scope .text-bg-danger { background: #dc2626; color: #ffffff; }
.dh-sos-scope .bg-warning { background: #f59e0b; color: #1e293b; }
.dh-sos-scope .bg-dark { background: #0f172a; color: #ffffff; }
.dh-sos-scope .bg-secondary { background: #64748b; color: #ffffff; }

.dh-sos-scope .alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.88rem;
}
.dh-sos-scope .alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.dh-sos-scope .alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.dh-sos-scope .alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.dh-sos-scope .alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

.dh-sos-scope .table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.dh-sos-scope .table td, .dh-sos-scope .table th {
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid #e2e8f0;
}
.dh-sos-scope .table-light { background: #f8fafc; }

.dh-sos-scope .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.86rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: all 0.16s ease;
}
.dh-sos-scope .btn-sm, .dh-sos-scope .btn-xs { padding: 0.42rem 0.82rem; font-size: 0.82rem; }
.dh-sos-scope .btn-primary { background: #0d9488; color: #ffffff; border-color: #0d9488; }
.dh-sos-scope .btn-primary:hover { background: #0f766e; }
.dh-sos-scope .btn-danger { background: #dc2626; color: #ffffff; border-color: #dc2626; }
.dh-sos-scope .btn-danger:hover { background: #b91c1c; }
.dh-sos-scope .btn-warning { background: #f59e0b; color: #0f172a; border-color: #f59e0b; }
.dh-sos-scope .btn-warning:hover { background: #d97706; }
.dh-sos-scope .btn-outline-secondary { background: #ffffff; color: #334155; border-color: #cbd5e1; }
.dh-sos-scope .btn-outline-secondary:hover { background: #f1f5f9; }
.dh-sos-scope .btn-outline-primary { background: #ffffff; color: #0d9488; border-color: #0d9488; }
.dh-sos-scope .btn-outline-primary:hover { background: #f0fdfa; }

.dh-sos-workspace {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.dh-sos-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  background: #f1f5f9;
  padding: 0.38rem;
  border-radius: 14px;
  margin-bottom: 1.5rem;
}

.dh-sos-tab-btn {
  border: 0;
  background: transparent;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.18s ease;
}

.dh-sos-tab-btn.is-active {
  background: #ffffff;
  color: #0b2d5b;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.09);
}

.dh-sos-tab-btn--red.is-active {
  background: #dc2626;
  color: #ffffff;
}

.dh-sos-tab-pane { display: none; }
.dh-sos-tab-pane.is-active { display: block; animation: dhSosFade 0.25s ease; }

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

/* Severity selector cards */
.dh-sev-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.dh-sev-card {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  background: #ffffff;
  text-align: left;
  transition: all 0.16s ease;
}

.dh-sev-card strong { display: block; font-size: 0.86rem; }
.dh-sev-card span { display: block; font-size: 0.72rem; color: #64748b; }

.dh-sev-card.is-selected[data-sev="critical"] { border-color: #dc2626; background: #fef2f2; color: #991b1b; }
.dh-sev-card.is-selected[data-sev="high"] { border-color: #ea580c; background: #fff7ed; color: #9a3412; }
.dh-sev-card.is-selected[data-sev="medium"] { border-color: #0284c7; background: #f0f9ff; color: #075985; }
.dh-sev-card.is-selected[data-sev="low"] { border-color: #0d9488; background: #f0fdfa; color: #115e59; }

.dh-symptom-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.dh-symptom-chip {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dh-symptom-chip:hover,
.dh-symptom-chip.is-used {
  background: #0b2d5b;
  border-color: #0b2d5b;
  color: #ffffff;
}

.dh-ticket-card {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  border: 1.5px solid #10b981;
  border-radius: 16px;
  padding: 1.2rem;
}

/* Ambulance Booking & Fleet Cards */
.dh-amb-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.dh-amb-preset {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0b2d5b;
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.dh-amb-preset:hover,
.dh-amb-preset.is-active {
  background: #0d9488;
  border-color: #0d9488;
  color: #ffffff;
}

.dh-fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.dh-fleet-card {
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 0.75rem;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.16s ease;
  position: relative;
}

.dh-fleet-card.is-selected {
  border-color: #0d9488;
  background: #f0fdfa;
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.14);
}

.dh-fleet-card .fleet-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  margin-bottom: 0.3rem;
}

.dh-fleet-card.is-selected .fleet-badge {
  background: #0d9488;
  color: #ffffff;
}

.dh-fleet-card .fleet-title {
  font-weight: 800;
  font-size: 0.86rem;
  color: #0b2d5b;
  margin-bottom: 0.2rem;
}

.dh-fleet-card .fleet-price {
  font-weight: 800;
  font-size: 0.96rem;
  color: #0f766e;
}

.dh-fleet-card ul {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
  font-size: 0.72rem;
  color: #64748b;
}

.dh-fare-box {
  background: linear-gradient(155deg, #062538 0%, #0b3a5c 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 1.25rem;
  position: sticky;
  top: 1.25rem;
}

.dh-fare-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
}

.dh-fare-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.18rem;
  font-weight: 800;
  padding: 0.65rem 0 0.35rem;
  color: #5eead4;
}

.dh-pay-pill-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.75rem 0;
}

.dh-pay-pill {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.dh-pay-pill.is-selected {
  background: #14b8a6;
  border-color: #14b8a6;
  color: #062538;
}

@media (max-width: 768px) {
  .dh-sos-tabs { grid-template-columns: 1fr; }
  .dh-sev-grid { grid-template-columns: 1fr 1fr; }
}
