/* ============================================================================
   Street Medics — Interactive Flutter App Simulator Styles (v1.4.0)
   1:1 Match with Flutter Engine Screenshots (docs/ui-inventory/screenshots)
   ============================================================================ */

.phone-screen-viewport {
  aspect-ratio: 460 / 1024;
  width: 100%;
  background: #FFF8F6;
  line-height: 1.35;
  text-align: left;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
}

#phone-interactive-root {
  width: 100%;
  height: 100%;
  position: relative;
}

.sm-app-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #FFF8F6;
  color: #201A19;
  overflow: hidden;
  user-select: none;
}

/* ---------- Top AppBar ---------- */
.sm-appbar {
  height: 44px;
  background: #FFDAD6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  flex-shrink: 0;
}

.sm-appbar-title {
  font-size: 15.5px;
  font-weight: 400;
  color: #201A19;
  letter-spacing: -0.01em;
}

.sm-duty-dot {
  color: #2E7D32;
  font-size: 11px;
}

/* ---------- Main Scroll / View Area ---------- */
.sm-main-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sm-tab-content.sm-sos-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 13px 18px;
  scrollbar-width: none;
}

.sm-tab-content.sm-sos-scroll::-webkit-scrollbar {
  display: none;
}

/* ---------- SOS Tab ---------- */
.sm-asterisk-wrap {
  display: flex;
  justify-content: center;
  margin: 4px 0 8px;
}

.sm-sos-h2 {
  font-size: 19px;
  font-weight: 700;
  text-align: center;
  color: #201A19;
  margin: 0 0 5px;
}

.sm-sos-lead {
  font-size: 11.2px;
  color: #534341;
  text-align: center;
  line-height: 1.38;
  margin: 0 0 12px;
  padding: 0 4px;
}

.sm-field-outline {
  border: 1px solid #857370;
  border-radius: 4px;
  background: transparent;
  padding: 9px 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s;
}

.sm-field-outline:focus-within {
  border-color: #8C4A43;
  box-shadow: 0 0 0 1px #8C4A43;
}

.sm-field-outline input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  color: #201A19;
  font-family: inherit;
}

.sm-field-outline input::placeholder {
  color: #534341;
  opacity: 0.9;
}

.sm-field-hint {
  font-size: 9.8px;
  color: #534341;
  margin: -6px 0 8px 10px;
}

.sm-prefill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #8C4A43;
  font-size: 11.2px;
  font-weight: 600;
  padding: 4px 6px;
  margin-bottom: 10px;
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
}

.sm-prefill-btn:hover {
  background: rgba(140, 74, 67, 0.08);
}

/* Card Blessures */
.sm-injuries-card {
  background: #FFF0EE;
  border: 1px solid #201A19;
  border-radius: 10px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.sm-injuries-card:hover {
  background: #FCE2DF;
}

.sm-inj-card-body {
  flex: 1;
  min-width: 0;
}

.sm-inj-card-body strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #201A19;
  line-height: 1.2;
}

.sm-inj-card-body span {
  display: block;
  font-size: 10.2px;
  color: #786966;
  margin-top: 2px;
}

.sm-inj-clear-btn {
  background: rgba(32, 26, 25, 0.08);
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  color: #534341;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sm-inj-mini-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sm-inj-mini-pill {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 600;
  padding: 1.5px 6px;
  border-radius: 5px;
  border: 1px solid transparent;
}

/* Primary Buttons */
.sm-btn-sos-main {
  width: 100%;
  background: #EF4336;
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 12px 12px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  margin-bottom: 9px;
  font-family: inherit;
  transition: transform 0.1s, background 0.15s;
}

.sm-btn-sos-main:hover {
  background: #E53935;
}

.sm-btn-sos-main:active {
  transform: scale(0.98);
}

.sm-sos-badge-icon {
  border: 1.4px solid #FFFFFF;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 800;
  padding: 0.5px 3px;
  line-height: 1.1;
}

.sm-active-sos-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 9px;
  padding: 4px 6px;
  background: #FFF0E5;
  border: 1px solid #F59E0B;
  border-radius: 8px;
}

.sm-active-sos-pill {
  background: none;
  border: none;
  color: #B45309;
  font-size: 10.8px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

.sm-btn-text-sm {
  background: none;
  border: none;
  color: #8C4A43;
  font-size: 10.2px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
}

.sm-btn-emerg-outline {
  width: 100%;
  background: transparent;
  color: #EF4336;
  border: 1px solid #EF4336;
  border-radius: 999px;
  padding: 9.5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  margin-bottom: 10px;
  font-family: inherit;
}

.sm-btn-emerg-outline:hover {
  background: rgba(239, 67, 54, 0.06);
}

.sm-divider {
  height: 1px;
  background: #E7D6D3;
  margin: 10px 0 12px;
}

.sm-btn-medic-start {
  width: 100%;
  background: #4CAF50;
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 11px 12px;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  font-family: inherit;
}

.sm-btn-medic-start:hover {
  background: #43A047;
}

.sm-btn-medic-stop {
  width: 100%;
  background: #D32F2F;
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 11px 12px;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  font-family: inherit;
}

/* ---------- Map Tab ---------- */
.sm-map-view {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #E5E3DF;
}

.sm-osm-canvas {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.45) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(0deg, rgba(255,255,255,0.45) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(35deg, transparent 46%, #F7F2E7 47%, #F7F2E7 52%, transparent 53%),
    linear-gradient(-25deg, transparent 60%, #F7F2E7 61%, #F7F2E7 65%, transparent 66%),
    #EAE6DF;
}

.sm-osm-tile {
  position: absolute;
  object-fit: cover;
  opacity: 0.92;
  pointer-events: none;
}

.sm-map-blip {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
  z-index: 4;
  padding: 0;
  transition: transform 0.15s;
}

.sm-map-blip:hover {
  transform: translate(-50%, -50%) scale(1.15);
}

.sm-blip-sos {
  background: #EF4336;
}

.sm-blip-sos.claimed {
  background: #F59E0B;
}

.sm-blip-pulse {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid #EF4336;
  animation: sm-pulse 1.8s infinite;
  pointer-events: none;
}

@keyframes sm-pulse {
  0% { transform: scale(0.85); opacity: 0.9; }
  100% { transform: scale(1.55); opacity: 0; }
}

.sm-blip-medic {
  background: #4CAF50;
}

.sm-map-counter-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #FFF0EE;
  border: 1px solid #201A19;
  border-radius: 999px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #201A19;
  z-index: 5;
}

.sm-map-emerg-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #FFF0EE;
  border: 1px solid #201A19;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}

.sm-map-fabs {
  position: absolute;
  bottom: 12px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 5;
}

.sm-map-fab {
  background: #FFDAD6;
  border: 3px solid #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.sm-map-fab-sm {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.sm-map-fab-lg {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

/* ---------- Settings Tab ---------- */
.sm-settings-section {
  margin-bottom: 4px;
}

.sm-settings-title {
  font-size: 13px;
  font-weight: 700;
  color: #201A19;
  margin-bottom: 6px;
}

.sm-settings-sub {
  font-size: 10.2px;
  color: #786966;
  line-height: 1.35;
  margin: 0 0 8px;
}

.sm-select {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  color: #201A19;
  font-family: inherit;
  cursor: pointer;
}

.sm-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px;
}

.sm-slider {
  flex: 1;
  accent-color: #8C4A43;
  cursor: pointer;
}

.sm-slider-val {
  font-size: 11.5px;
  color: #201A19;
  min-width: 42px;
  text-align: right;
}

.sm-btn-outline-pill {
  width: 100%;
  background: transparent;
  color: #8C4A43;
  border: 1px solid #857370;
  border-radius: 999px;
  padding: 8.5px 12px;
  font-size: 11.2px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
}

.sm-btn-outline-pill:hover {
  background: rgba(140, 74, 67, 0.06);
}

.sm-version-foot {
  font-size: 10.2px;
  color: #786966;
  margin-top: 8px;
}

/* ---------- Bottom NavigationBar ---------- */
.sm-navbar {
  height: 56px;
  background: #FCEAE8;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  flex-shrink: 0;
}

.sm-nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: #534341;
  padding: 4px 0;
  font-family: inherit;
}

.sm-nav-item.locked {
  color: #ABA09E;
}

.sm-nav-pill {
  width: 48px;
  height: 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.sm-nav-item.active .sm-nav-pill {
  background: #FFDAD6;
  color: #410E0B;
}

.sm-nav-sos-box {
  border: 1.5px solid currentColor;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 800;
  padding: 0.5px 3px;
  line-height: 1.1;
}

.sm-nav-label {
  font-size: 10px;
  font-weight: 500;
}

.sm-nav-item.active .sm-nav-label {
  font-weight: 700;
  color: #201A19;
}

/* ---------- SnackBar ---------- */
.sm-snackbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 56px;
  background: #362F2E;
  color: #FBEAE7;
  font-size: 11px;
  padding: 10px 12px;
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}

.sm-snackbar.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Dialogs & Bottom Sheets ---------- */
.sm-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.54);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: sm-fade-in 0.15s ease;
}

.sm-scrim.sm-scrim-bottom {
  align-items: flex-end;
  padding: 0;
}

@keyframes sm-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sm-dialog {
  width: 100%;
  background: #FCEAE6;
  border-radius: 22px;
  padding: 16px 15px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.sm-dialog-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.sm-dialog-title {
  font-size: 16.5px;
  font-weight: 600;
  text-align: center;
  color: #201A19;
  margin: 0 0 8px;
  line-height: 1.25;
}

.sm-dialog-body {
  font-size: 11px;
  color: #534341;
  line-height: 1.42;
  margin: 0 0 10px;
}

.sm-perm-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

.sm-perm-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 10.6px;
  color: #201A19;
  line-height: 1.32;
}

.sm-perm-row svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.sm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.sm-dialog-actions-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sm-btn-text {
  background: none;
  border: none;
  color: #8C4A43;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
}

.sm-btn-brown {
  background: #8C4A43;
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.sm-check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.2px;
  color: #201A19;
  cursor: pointer;
  margin: 8px 0 10px;
}

.sm-checkbox {
  width: 16px;
  height: 16px;
  border: 1.6px solid #534341;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sm-checkbox.checked {
  background: #8C4A43;
  border-color: #8C4A43;
}

.sm-btn-commit {
  width: 100%;
  background: #E4D4D1;
  color: #8B7B78;
  border: none;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: not-allowed;
  font-family: inherit;
  text-align: center;
}

.sm-btn-commit.enabled {
  background: #8C4A43;
  color: #FFFFFF;
  cursor: pointer;
}

/* ---------- Bottom Sheets ---------- */
.sm-sheet {
  width: 100%;
  background: #FFF4F2;
  border-radius: 22px 22px 0 0;
  padding: 12px 14px 16px;
  max-height: 88%;
  overflow-y: auto;
}

.sm-drag-handle {
  width: 30px;
  height: 3.5px;
  background: #534341;
  border-radius: 3px;
  margin: 0 auto 10px;
}

.sm-sheet-title-center {
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  color: #201A19;
  margin-bottom: 10px;
}

.sm-emerg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 6px;
  border-radius: 8px;
  cursor: pointer;
}

.sm-emerg-row:hover {
  background: rgba(140, 74, 67, 0.08);
}

.sm-emerg-info {
  flex: 1;
}

.sm-emerg-info strong {
  display: block;
  font-size: 13px;
  color: #201A19;
}

.sm-emerg-info span {
  display: block;
  font-size: 10.5px;
  color: #786966;
}

/* ---------- BodyMap Sheet (09, 10, 11) ---------- */
.sm-sheet.sm-sheet-bodymap {
  height: 86%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 8px 13px 12px;
}

.sm-bm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.sm-bm-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #201A19;
}

.sm-segmented {
  display: inline-flex;
  border: 1px solid #857370;
  border-radius: 999px;
  overflow: hidden;
}

.sm-seg-btn {
  background: transparent;
  border: none;
  padding: 4px 11px;
  font-size: 10.5px;
  font-weight: 600;
  color: #201A19;
  cursor: pointer;
  font-family: inherit;
}

.sm-seg-btn + .sm-seg-btn {
  border-left: 1px solid #857370;
}

.sm-seg-btn.active {
  background: #FFDAD6;
  color: #410E0B;
}

.sm-bm-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  margin: 2px 0;
}

.sm-bm-canvas {
  position: relative;
  height: 96%;
  aspect-ratio: 147.998 / 318.455;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center center;
}

.sm-body-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sm-body-front {
  color: rgba(32, 26, 25, 0.22);
}

.sm-body-back {
  color: rgba(74, 111, 165, 0.65);
}

.sm-zones-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sm-zone-poly {
  cursor: pointer;
  transition: fill 0.15s, stroke 0.15s;
}

.sm-zone-poly:hover:not(.marked) {
  fill: rgba(211, 47, 47, 0.18);
  stroke: rgba(211, 47, 47, 0.45);
}

.sm-bm-hint {
  text-align: center;
  font-size: 10.2px;
  color: #857370;
  margin: 4px 0 8px;
}

.sm-bm-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: 4px 0 8px;
}

.sm-bm-chip {
  background: transparent;
  border: 1px solid #C8B8B5;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 10px;
  color: #201A19;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

.sm-bm-chip.selected {
  background: #FFDAD6;
  border-color: #FFDAD6;
  font-weight: 600;
}

.sm-bm-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sm-btn-outline-brown {
  background: transparent;
  color: #8C4A43;
  border: 1px solid #857370;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.sm-btn-fill-brown {
  background: #8C4A43;
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* ---------- My SOS Sheet (12) & Details (13, 14) ---------- */
.sm-sheet-h3 {
  font-size: 14px;
  font-weight: 700;
  color: #201A19;
  margin: 0 0 3px;
}

.sm-sheet-sub {
  font-size: 10.2px;
  color: #786966;
  margin: 0 0 10px;
}

.sm-mysos-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #EBDAD7;
}

.sm-mysos-text {
  flex: 1;
  min-width: 0;
}

.sm-mysos-text strong {
  display: block;
  font-size: 12px;
  color: #201A19;
}

.sm-mysos-text span {
  display: block;
  font-size: 10px;
  color: #786966;
}

.sm-detail-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  color: #201A19;
  margin-bottom: 6px;
}

.sm-detail-desc {
  font-size: 12.5px;
  color: #201A19;
  margin-bottom: 4px;
}

.sm-detail-coords {
  font-size: 10.5px;
  color: #786966;
  margin-bottom: 4px;
}

.sm-detail-status {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
}

.sm-btn-blue-pill {
  width: 100%;
  background: #1E88E5;
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  margin-bottom: 7px;
  font-family: inherit;
}

.sm-btn-green-pill {
  width: 100%;
  background: #4CAF50;
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  margin-bottom: 9px;
  font-family: inherit;
}

.sm-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sm-btn-chip-outline {
  background: transparent;
  color: #5E4E76;
  border: 1px solid #857370;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 10.8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.sm-btn-chip-outline:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
