/* Sattavisa app layer — sheets, toasts, offline banner, safe areas. Brand: maroon / gold / cream. */
:root { --sv-maroon: #6b1d24; --sv-maroon-2: #8a2a32; --sv-gold: #b8923a; --sv-cream: #f8f7f4; --sv-ink: #1a1a1a; }

/* Notch + home-indicator safe areas inside the iOS app (viewport-fit=cover). */
html.is-native body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); background: var(--sv-cream); }
html.is-native { -webkit-tap-highlight-color: transparent; }
html.is-native body { -webkit-touch-callout: none; overscroll-behavior-y: none; }
html.is-native input, html.is-native textarea, html.is-native [contenteditable] { -webkit-touch-callout: default; }

.sv-offline {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 2147483000;
  background: var(--sv-ink); color: #fff; font: 600 13px/1.35 -apple-system, system-ui, sans-serif;
  padding: 10px 14px; border-radius: 12px; text-align: center; transform: translateY(150%); transition: transform .25s ease;
}
.sv-offline.sv-show { transform: none; }

.sv-sheet-wrap {
  position: fixed; inset: 0; z-index: 2147483001; background: rgba(26, 10, 12, .45);
  display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s ease;
}
.sv-sheet-wrap.sv-open { opacity: 1; }
.sv-sheet {
  width: 100%; max-width: 520px; max-height: 86vh; overflow: auto; background: #fff; color: var(--sv-ink);
  border-radius: 22px 22px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
  font: 15px/1.45 -apple-system, system-ui, sans-serif; transform: translateY(24px); transition: transform .2s ease;
  box-shadow: 0 -8px 30px rgba(0,0,0,.18);
}
.sv-sheet-wrap.sv-open .sv-sheet { transform: none; }
@media (min-width: 600px) { .sv-sheet-wrap { align-items: center; } .sv-sheet { border-radius: 22px; } }
.sv-sheet-title { margin: 0 0 6px; font: italic 700 22px/1.2 'Playfair Display', Georgia, serif; color: var(--sv-maroon); }
.sv-sheet-sub { margin: 0 0 14px; color: #5b5b5b; font-size: 14px; }
.sv-links a { color: var(--sv-maroon); font-weight: 600; }
.sv-terms { margin: 0 0 14px; padding-left: 18px; color: #333; font-size: 14px; }
.sv-terms li { margin: 0 0 8px; }
.sv-reasons { display: grid; gap: 8px; margin-bottom: 12px; }
.sv-reason {
  text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid #e6e1d8; background: var(--sv-cream);
  font: 500 15px/1.3 -apple-system, system-ui, sans-serif; color: var(--sv-ink); min-height: 44px;
}
.sv-reason.sv-on { border-color: var(--sv-maroon); background: #fbeff0; color: var(--sv-maroon); font-weight: 600; }
.sv-note {
  width: 100%; box-sizing: border-box; min-height: 76px; padding: 10px 12px; border-radius: 12px; border: 1px solid #e6e1d8;
  font: 15px/1.4 -apple-system, system-ui, sans-serif; margin-bottom: 14px; resize: vertical;
}
.sv-row { display: flex; gap: 10px; }
.sv-row .sv-btn { flex: 1; }
.sv-btn {
  display: block; width: 100%; min-height: 48px; border-radius: 14px; border: 0; cursor: pointer;
  font: 700 15px/1 -apple-system, system-ui, sans-serif;
}
.sv-primary { background: var(--sv-maroon); color: #fff; }
.sv-primary:disabled { background: #cdb9bb; }
.sv-ghost { background: #f1ede6; color: var(--sv-ink); }
.sv-small { width: auto; min-height: 36px; padding: 0 14px; font-size: 13px; }
.sv-block-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eee; }
.sv-block-row + .sv-btn, .sv-sheet-sub + .sv-btn { margin-top: 14px; }

.sv-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 2147483002;
  transform: translate(-50%, 30px); opacity: 0; transition: all .25s ease;
  background: var(--sv-ink); color: #fff; padding: 11px 16px; border-radius: 12px; font: 600 14px/1.3 -apple-system, system-ui, sans-serif;
  max-width: calc(100% - 40px);
}
.sv-toast.sv-show { transform: translate(-50%, 0); opacity: 1; }

/* Report / Block links injected into the React UI. */
.sv-safety-link {
  background: none; border: 0; padding: 4px 2px; margin: 0; cursor: pointer;
  font: 600 11px/1.2 -apple-system, system-ui, sans-serif; color: #8b8b8b; text-decoration: underline; text-underline-offset: 2px;
}
.sv-safety-link:hover { color: var(--sv-maroon); }
.sv-safety-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; margin-top: 6px; }
