/* Breakdown Man — Rescue Me page.
 * Standalone, mobile-app style. No dependency on the main site CSS bundle
 * or Google Fonts (system font stack only) so it renders fully offline. */

:root {
  --rm-red: #c8102e;
  --rm-red-dark: #9c0c23;
  --rm-bg: #16181d;
  --rm-card: #21242c;
  --rm-card-2: #2b2f3a;
  --rm-text: #f2f3f5;
  --rm-muted: #9aa0ab;
  --rm-wa: #25d366;
  --rm-sms: #f5a623;
  --rm-line: #343a46;
  --rm-header-h: 116px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--rm-bg);
  color: var(--rm-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body { padding-top: var(--rm-header-h); }

/* ---- Sticky header (no nav) ---- */
.rm-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--rm-red);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
  padding-top: env(safe-area-inset-top);
}
.rm-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
}
.rm-header__brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.rm-header__brand img { height: 30px; width: auto; display: block; }
.rm-header__brand b {
  font-size: 15px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: #fff;
}
.rm-header__call {
  display: flex; align-items: center; gap: 7px;
  background: #fff; color: var(--rm-red);
  font-weight: 800; font-size: 15px;
  padding: 10px 15px; border-radius: 999px;
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.rm-header__call svg { width: 18px; height: 18px; }

.rm-header__loc {
  display: flex; align-items: center; gap: 7px;
  background: var(--rm-red-dark);
  color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 9px 13px;
  min-height: 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.rm-header__loc .rm-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #ffd23f; flex: none;
  box-shadow: 0 0 0 0 rgba(255, 210, 63, 0.7);
  animation: rm-pulse 1.8s infinite;
}
.rm-header__loc.is-fixed .rm-dot { background: #34d27b; animation: none; }
.rm-header__loc.is-error .rm-dot { background: #ff5b5b; animation: none; }
@keyframes rm-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 210, 63, 0.7); }
  70% { box-shadow: 0 0 0 9px rgba(255, 210, 63, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 210, 63, 0); }
}

/* ---- Layout ---- */
main { max-width: 560px; margin: 0 auto; padding: 12px 12px 40px; }

.rm-offline {
  background: #3a2a08; color: #ffd98a;
  border: 1px solid #6b4d12; border-radius: 12px;
  padding: 11px 13px; font-size: 13.5px; font-weight: 600;
  margin-bottom: 12px;
}

.rm-map {
  height: 40vh; min-height: 230px; max-height: 360px;
  border-radius: 16px; overflow: hidden;
  background: var(--rm-card);
  border: 1px solid var(--rm-line);
}
.rm-map .leaflet-control-attribution { font-size: 10px; }

.rm-coords {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: 10px 0 4px;
  background: var(--rm-card); border: 1px solid var(--rm-line);
  border-radius: 12px; padding: 10px 13px;
}
.rm-coords__main { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rm-coords__sub { font-size: 12px; color: var(--rm-muted); margin-top: 2px; }
.rm-coords__tag {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--rm-muted);
}

/* ---- Cards ---- */
.rm-card {
  background: var(--rm-card);
  border: 1px solid var(--rm-line);
  border-radius: 16px;
  padding: 15px 15px 16px;
  margin-top: 12px;
}
.rm-card h2 {
  margin: 0 0 11px; font-size: 16px; font-weight: 800;
}
.rm-card h2 .rm-em { color: #ff9aa6; }

/* ---- Buttons ---- */
.rm-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 9px;
  width: 100%; min-height: 56px;
  border: 0; border-radius: 14px;
  font-size: 16.5px; font-weight: 800;
  text-decoration: none; cursor: pointer;
  padding: 12px 16px; color: #fff;
  font-family: inherit;
}
.rm-btn svg { width: 22px; height: 22px; flex: none; }
.rm-btn + .rm-btn { margin-top: 9px; }
.rm-btn:active { transform: scale(0.985); }

.rm-btn--call { background: var(--rm-red); }
.rm-btn--xl { min-height: 66px; font-size: 19px; margin-top: 12px;
  box-shadow: 0 6px 18px rgba(200, 16, 46, 0.45); }
.rm-btn--xl small { display: block; font-size: 12px; font-weight: 600; opacity: 0.85; }
.rm-btn--wa { background: var(--rm-wa); color: #06351a; }
.rm-btn--sms { background: var(--rm-sms); color: #3a2700; }
.rm-btn--999 { background: #1f2733; border: 1.5px solid #3f5170; margin-top: 12px; }
.rm-btn--999 b { color: #ff8a8a; }
.rm-btn--ghost {
  background: var(--rm-card-2); color: var(--rm-text);
  border: 1px solid var(--rm-line); min-height: 50px; font-size: 15px;
}
.rm-btn[disabled] { opacity: 0.5; pointer-events: none; }

.rm-hint { font-size: 12.5px; color: var(--rm-muted); margin: 10px 2px 0; text-align: center; }

/* ---- Lists ---- */
.rm-list { list-style: none; margin: 0; padding: 0; }
.rm-list li {
  position: relative; padding: 8px 0 8px 30px;
  font-size: 14.5px; line-height: 1.45;
  border-bottom: 1px solid var(--rm-line);
}
.rm-list li:last-child { border-bottom: 0; }
.rm-list li::before {
  content: ""; position: absolute; left: 2px; top: 12px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--rm-red);
}
.rm-list li::after {
  content: ""; position: absolute; left: 6.5px; top: 15.5px;
  width: 4px; height: 8px; border: solid #fff;
  border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.rm-list.rm-list--tell li::before { background: var(--rm-card-2); border: 1.5px solid var(--rm-sms); }
.rm-list.rm-list--tell li::after { display: none; }
.rm-list.rm-list--tell li { padding-left: 18px; }
.rm-list.rm-list--tell li::before { left: 0; top: 13px; width: 8px; height: 8px; }

/* ---- Install / footer ---- */
.rm-install { margin-top: 14px; }
.rm-install .rm-btn { background: #2b3b5c; border: 1px solid #4a6298; }
.rm-foot {
  text-align: center; color: var(--rm-muted);
  font-size: 12.5px; line-height: 1.6; margin-top: 22px;
}
.rm-foot a { color: var(--rm-muted); }
.rm-foot strong { color: var(--rm-text); }

.rm-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px);
  background: #fff; color: #16181d; font-weight: 700; font-size: 14px;
  padding: 11px 18px; border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  z-index: 2000;
}
.rm-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
