/* Shared styling for MCrashCraft Alert System (MAS) feature pages */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; background: #0e0e10; color: #efeff1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: #58b8ff; text-decoration: none; }
a:hover { text-decoration: underline; }

nav.topnav {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 10px 16px; background: rgba(24,24,27,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.08); position: sticky; top: 0; z-index: 50;
}
nav.topnav .brand { font-weight: 700; margin-right: 10px; color: #efeff1; }
nav.topnav .brand .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #e91916; margin-right: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
nav.topnav a { color: #adadb8; padding: 5px 10px; border-radius: 6px; font-size: 13px; }
nav.topnav a:hover { background: #26262c; color: #efeff1; text-decoration: none; }
nav.topnav a.active { background: #9147ff; color: #fff; }

.wrap { max-width: 980px; margin: 0 auto; padding: 20px 16px 60px; }
header.page h1 { font-size: 22px; margin-bottom: 4px; }
header.page p { color: #adadb8; font-size: 13px; margin-bottom: 16px; }

.locbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: #18181b; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 12px; margin-bottom: 16px; }
.locbar input[type="text"] { flex: 1; min-width: 180px; padding: 9px 12px; font-size: 14px;
  background: #26262c; color: #efeff1; border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; outline: none; }
.locbar input:focus { border-color: #9147ff; }
.locbar .hint { width: 100%; color: #85858f; font-size: 11px; }

/* .rp: the admin panel's and amber/BOLO report form's own text/select/
   textarea fields (login, setup, manual alert, AMBER/BOLO reports) — same
   dark-theme treatment as the location bar's input above, just not scoped
   to .locbar. These had no styling at all before (plain white browser-
   default fields on a dark page), not just a mobile-only issue. */
.rp { padding: 9px 12px; font-size: 14px; background: #26262c; color: #efeff1;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; outline: none; }
.rp:focus { border-color: #9147ff; }
select.rp { cursor: pointer; }

button { background: #2f2f35; color: #efeff1; border: none; border-radius: 8px;
  padding: 9px 14px; font-size: 13px; cursor: pointer; }
button:hover { background: #3f3f46; }
button.primary { background: #9147ff; }
button.primary:hover { background: #772ce8; }
button.small { padding: 5px 9px; font-size: 12px; }
button.chip { border-radius: 999px; font-size: 12px; padding: 5px 11px; }
button.chip.on { background: #9147ff; }

.swrow { display: inline-flex; align-items: center; gap: 8px; color: #d3d3db; font-size: 13px; }
.switch { position: relative; width: 38px; height: 20px; cursor: pointer; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: #3f3f46; border-radius: 12px; transition: background .18s; }
.switch i:before { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px;
  background: #adadb8; border-radius: 50%; transition: transform .18s, background .18s; }
.switch input:checked + i { background: #9147ff; }
.switch input:checked + i:before { transform: translateX(18px); background: #fff; }

.grid { display: grid; gap: 12px; }
.card { background: #18181b; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 14px; }
.card h3 { font-size: 14px; margin-bottom: 6px; }
.card .meta { color: #adadb8; font-size: 12px; line-height: 1.5; }
.card .desc { color: #d3d3db; font-size: 12px; line-height: 1.5; margin-top: 8px; max-height: 180px; overflow-y: auto; }
.card.accent { border-left: 4px solid var(--ac, #9147ff); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #111; background: #adadb8; }
.status-line { color: #85858f; font-size: 12px; margin: 10px 2px; }
.mock-note { background: rgba(255,210,0,0.08); border: 1px solid rgba(255,210,0,0.3);
  color: #ffd24d; border-radius: 8px; padding: 8px 12px; font-size: 12px; margin-bottom: 12px; }
#minimap { height: 320px; border-radius: 10px; margin-bottom: 14px; background: #101013; }
.count { color: #85858f; font-weight: 400; font-size: 13px; }
pre.script { white-space: pre-wrap; background: #101013; border-radius: 8px; padding: 12px;
  font-size: 13px; line-height: 1.6; color: #d3d3db; font-family: inherit; }
/* Touch targets: the desktop sizes above (tuned for a mouse pointer) are
   too small to tap reliably on a touchscreen — bump them without changing
   anything about desktop's own layout or spacing. 900px covers phones and
   tablets alike (verified at ~390px and ~820px), not just phones. */
@media (max-width: 900px) {
  nav.topnav { padding: 8px 10px; gap: 2px; }
  nav.topnav a { padding: 8px 10px; font-size: 14px; }
  button { padding: 11px 16px; min-height: 40px; }
  button.small { padding: 8px 12px; min-height: 34px; }
  button.chip { padding: 8px 14px; }
  .locbar input[type="text"] { padding: 12px; font-size: 16px; } /* 16px prevents iOS auto-zoom-on-focus */
  .switch { width: 42px; height: 24px; }
  .switch i:before { width: 20px; height: 20px; }
  .switch input:checked + i:before { transform: translateX(18px); }
  .card { padding: 12px; }
  .card h3 { font-size: 15px; }
  .card .meta, .card .desc { font-size: 13px; }
  .rp { padding: 12px; font-size: 16px; min-height: 44px; } /* 16px prevents iOS auto-zoom-on-focus */
}
@media (max-width: 620px) {
  header.page h1 { font-size: 18px; }
}
