/* Evotic Edge — SOS overlays (Sprint D 2026-05-21) */

/* Sprint D SOS — FAB layout
 * 1. Force the home-only-fab to stay floating at the bottom over content
 *    (defensive vs any parent transform/filter that breaks position:fixed).
 * 2. Embed the SOS label INSIDE the FAB, under the camera icon.
 */
.home-only-fab {
  position: fixed !important;
  z-index: 9000 !important;
  /* Sprint D — make sure long-press doesn't trigger native context menu,
     text selection, or touch-callout on iOS/Android. Without these, the
     browser cancels our touch tracking after ~500 ms. */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.home-only-fab .fa-camera {
  /* Shift the camera icon up so the SOS label fits under it inside the circle */
  transform: translateY(-7px);
  font-size: 22px;
}
.home-only-fab .home-fab-sos-label {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.10em;
  background: rgba(220, 38, 38, .85);
  padding: 1px 7px;
  border-radius: 999px;
  pointer-events: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .45);
  line-height: 1.15;
}

/* Drag-up hint that appears when the user starts pressing the FAB.
 * Shows an upward arrow + instructional text + progress bar that fills
 * as the user drags the finger upward toward the SOS threshold. */
.sos-drag-hint {
  position: fixed;
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: linear-gradient(180deg, #DC2626, #991B1B);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  z-index: 9500;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease-out, transform .18s ease-out;
  box-shadow: 0 8px 24px rgba(220, 38, 38, .35);
  min-width: 220px;
  text-align: center;
}
.sos-drag-hint.on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.sos-drag-hint.ready {
  background: linear-gradient(180deg, #FBBF24, #DC2626);
  transform: translateX(-50%) translateY(-4px) scale(1.05);
}
.sos-drag-hint-arrow {
  font-size: 22px;
  line-height: 1;
  animation: sos-arrow-bounce 0.7s ease-in-out infinite;
  margin-bottom: 4px;
}
.sos-drag-hint.ready .sos-drag-hint-arrow {
  animation: none;
  color: #fff;
}
@keyframes sos-arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.sos-drag-hint-txt {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.sos-drag-hint-bar {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, .25);
  border-radius: 999px;
  overflow: hidden;
}
.sos-drag-hint-fill {
  height: 100%;
  width: 0%;
  background: var(--card-bg);
  border-radius: 999px;
  transition: width .08s linear;
}

.sos-overlay {
  position: fixed; inset: 0;
  z-index: 99998;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; transition: opacity .2s ease-out;
  user-select: none;
  touch-action: none;
}
.sos-overlay.on { opacity: 1; }

/* Countdown — fullscreen red, big number, legal warning */
.sos-countdown {
  background: radial-gradient(ellipse at center, #DC2626 0%, #7F1D1D 75%, #4C0519 100%);
}
.sos-countdown-inner {
  text-align: center; color: #fff;
  max-width: 480px; padding: 0 16px;
  animation: sos-pulse 1s ease-in-out infinite;
}
.sos-countdown-num {
  font-size: 180px;
  font-weight: 900;
  line-height: 1;
  margin: 0 0 16px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}
.sos-countdown-msg {
  font-size: 18px; font-weight: 800;
  margin: 0 0 24px;
}
.sos-countdown-warn {
  font-size: 13px;
  background: rgba(0, 0, 0, .35);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 28px;
  line-height: 1.5;
  text-align: left;
}
.sos-countdown-warn i { color: #FBBF24; margin-right: 6px; }
.sos-cancel-big {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 340px;
  background: var(--card-bg);
  color: #991B1B;
  border: none;
  border-radius: 16px;
  padding: 18px 24px;
  font-size: 18px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.sos-cancel-big:active { transform: scale(.97); }
@keyframes sos-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* Stealth lockscreen — pure black background, big clock, no SOS hint.
 * Pretends the phone is locked. Recording happens in background invisibly.
 * Highest z-index possible to cover the whole app (including notifications). */
.sos-stealth {
  position: fixed; inset: 0;
  background: #000;
  z-index: 99999;
  color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  user-select: none;
  touch-action: manipulation;
  padding: 40px 24px;
}
.sos-stealth-time {
  font-size: 88px;
  font-weight: 200;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 0 0 6px;
}
.sos-stealth-date {
  font-size: 16px;
  font-weight: 400;
  opacity: 0.85;
  text-transform: capitalize;
  margin: 0 0 50px;
}
.sos-stealth-hint {
  position: absolute;
  bottom: 50px;
  font-size: 12px;
  opacity: 0.45;
  font-weight: 500;
}
/* Discreet info / error line under the date — shows quota/geo/mic errors
   so the user knows whether the SOS actually went through. Stealth-friendly:
   small orange, doesn't scream "SOS" if someone is looking at the screen. */
.sos-stealth-info {
  font-size: 12px;
  color: #FBBF24;
  font-weight: 500;
  margin-top: 12px;
  max-width: 280px;
  text-align: center;
  line-height: 1.45;
  opacity: 0.85;
}
.sos-stealth-pin-wrap {
  margin-top: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.sos-stealth-pin-label {
  font-size: 12px;
  opacity: 0.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sos-stealth-pin-wrap input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 32px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.5em;
  text-align: center;
  border-radius: 12px;
  padding: 10px 16px;
  width: 200px;
  outline: none;
}
.sos-stealth-pin-wrap input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}
.sos-stealth-pin-err {
  color: #FCA5A5;
  font-size: 13px;
  margin: 0;
}

/* Success — green checkmark, calm message */
.sos-success {
  background: rgba(10, 30, 14, .92);
  backdrop-filter: blur(10px);
}
.sos-success-inner {
  background: linear-gradient(180deg, #14532D 0%, #052E16 100%);
  color: #fff;
  border-radius: 20px;
  padding: 26px 22px;
  max-width: 380px; width: 100%;
  text-align: center;
  border: 1px solid rgba(34, 197, 94, .25);
  box-shadow: 0 8px 32px rgba(34, 197, 94, .25);
}
.sos-success-icon {
  font-size: 64px;
  color: #4ADE80;
  margin: 0 0 12px;
  line-height: 1;
  animation: sos-success-pop .45s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes sos-success-pop {
  0% { transform: scale(.4); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.sos-success-inner h3 {
  margin: 0 0 8px; font-size: 22px; font-weight: 900;
  color: #4ADE80;
}
.sos-success-inner p {
  margin: 0 0 10px; font-size: 14px; line-height: 1.45;
  color: rgba(255, 255, 255, .92);
}
.sos-success-inner p strong { color: #FBBF24; }
.sos-success-sub {
  color: rgba(255, 255, 255, .65) !important;
  font-size: 13px !important;
  font-style: italic;
}
.sos-success-btn {
  margin-top: 16px;
  background: #4ADE80;
  color: #052E16;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 15px; font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.sos-success-btn:active { transform: scale(.97); }
