/* =========================================================
   DroneCJ — STATUS PAGE (Apple-friendly / Premium)
   File: status.css
   Aligns with status.js IDs and states.
   ========================================================= */

:root{
  --bg0:#f7faff;
  --bg1:#eef4ff;
  --ink:#0b1220;
  --muted:#41506a;

  --line:rgba(11,18,32,.10);
  --line2:rgba(11,18,32,.14);

  --glass:rgba(255,255,255,.66);
  --glass2:rgba(255,255,255,.50);

  --shadow:0 20px 60px rgba(0,0,0,.10);
  --shadow2:0 10px 30px rgba(0,0,0,.08);

  --a:#2f6bff;
  --b:#00d4ff;
  --c:#7c4dff;
  --accent:linear-gradient(90deg,var(--a),var(--b),var(--c));

  --ok:#22c55e;
  --maint:#f59e0b;
  --incident:#ef4444;
  --pending:#8b5cf6;

  --r16:16px;
  --r20:20px;
  --r24:24px;

  --max: 980px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  color:var(--ink);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background:
    radial-gradient(900px 520px at 18% 12%, rgba(0,212,255,.20), transparent 55%),
    radial-gradient(820px 520px at 86% 26%, rgba(124,77,255,.18), transparent 58%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; text-underline-offset:3px; }
img{ max-width:100%; display:block; }

.container{
  width:min(var(--max), calc(100% - 40px));
  margin:0 auto;
}

/* ---------- FX ---------- */
body::before{
  content:"";
  position:fixed;
  inset:-2px;
  pointer-events:none;
  background:
    radial-gradient(1200px 700px at 40% -10%, rgba(47,107,255,.10), transparent 55%),
    radial-gradient(1000px 680px at 110% 25%, rgba(0,212,255,.10), transparent 58%),
    radial-gradient(980px 640px at 0% 70%, rgba(124,77,255,.09), transparent 62%);
  z-index:-2;
}
body::after{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.10;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  z-index:-1;
}

/* ---------- Nav (use same pattern as site) ---------- */
.nav{
  position:sticky;
  top:14px;
  z-index:50;
  padding:10px 0;
}

.nav__wrap,
.nav .inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 14px;
  border-radius:999px;
  background: var(--glass);
  border:1px solid var(--line);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand,
.logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:950;
  letter-spacing:.01em;
}
.brand img,
.logo img{
  width:28px; height:28px;
  border-radius:9px;
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
}

.nav__links,
.links{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.nav__links a,
.links a{
  font-weight:800;
  font-size:13px;
  color:rgba(11,18,32,.78);
  padding:10px 10px;
  border-radius:999px;
  border:1px solid transparent;
  text-decoration:none;
}
.nav__links a:hover,
.links a:hover{
  background: rgba(255,255,255,.55);
  border-color: var(--line);
  text-decoration:none;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.60);
  font-weight:900;
  font-size:13px;
  box-shadow: 0 10px 20px rgba(0,0,0,.06);
  text-decoration:none !important;
}
.btn:hover{ background: rgba(255,255,255,.75); }
.btn.primary,
.btn.cta{
  border-color: rgba(47,107,255,.22);
  background: linear-gradient(180deg, rgba(47,107,255,.16), rgba(255,255,255,.55));
}
.btn.report{
  border-color: rgba(11,18,32,.14);
}
.btn.disabled,
.btn[aria-disabled="true"]{
  opacity:.55;
  cursor:not-allowed;
  pointer-events:none;
}

/* ---------- Page header / hero ---------- */
main{
  padding: 22px 0 84px;
}

.statusHero{
  margin-top: 18px;
  border-radius: 28px;
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.70), rgba(255,255,255,.52));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow:hidden;
  position:relative;
}

.statusHero::before{
  content:"";
  position:absolute;
  inset:-1px;
  pointer-events:none;
  background:
    radial-gradient(900px 300px at 18% 10%, rgba(0,212,255,.18), transparent 60%),
    radial-gradient(820px 300px at 92% 14%, rgba(124,77,255,.14), transparent 60%);
  opacity:.65;
}

.statusHero__inner{
  position:relative;
  padding: 22px 20px 18px;
}

.statusTopRow{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

h1, #status-title{
  margin: 0;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -.02em;
}

.statusSub, #status-sub{
  margin: 10px 0 0;
  color: rgba(11,18,32,.78);
  font-weight: 650;
}

/* Badge (data-state set by status.js) */
#status-badge,
.statusBadge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.58);
  box-shadow: 0 10px 20px rgba(0,0,0,.06);
  font-weight: 900;
  font-size: 13px;
  user-select:none;
}

#status-badge .dot,
.statusBadge .dot{
  width:10px; height:10px;
  border-radius:999px;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}

/* data-state mapping */
#status-badge[data-state="ok"] .dot{ background: var(--ok); box-shadow:0 0 0 4px rgba(34,197,94,.12); }
#status-badge[data-state="maintenance"] .dot{ background: var(--maint); box-shadow:0 0 0 4px rgba(245,158,11,.14); }
#status-badge[data-state="incident"] .dot{ background: var(--incident); box-shadow:0 0 0 4px rgba(239,68,68,.14); }
#status-badge[data-state="update-pending"] .dot{ background: var(--pending); box-shadow:0 0 0 4px rgba(139,92,246,.14); }

/* ---------- Cards grid ---------- */
.statusGrid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:14px;
  margin-top: 14px;
}

.card{
  border-radius: var(--r24);
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.70), rgba(255,255,255,.52));
  box-shadow: var(--shadow2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow:hidden;
  position:relative;
}

.card::before{
  content:"";
  position:absolute;
  inset:-1px;
  pointer-events:none;
  background:
    radial-gradient(800px 240px at 10% 8%, rgba(0,212,255,.14), transparent 62%),
    radial-gradient(780px 240px at 92% 16%, rgba(124,77,255,.10), transparent 60%);
  opacity:.55;
}

.card > *{ position:relative; }

.cardHeader{
  padding: 16px 16px 10px;
  border-bottom: 1px solid rgba(11,18,32,.06);
}
.cardBody{
  padding: 14px 16px 16px;
}

.cardTitle{
  margin:0;
  font-size: 14px;
  letter-spacing: -.01em;
  font-weight: 950;
}
.small{
  font-size: 13px;
  color: rgba(65,80,106,.92);
}

.kv{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(11,18,32,.06);
}
.kv:last-child{ border-bottom:0; }
.kv b{ font-weight: 950; }
.kv span{ color: rgba(11,18,32,.78); font-weight: 650; }

/* Pill state (id used by status.js) */
#state-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.58);
  font-weight: 950;
  font-size: 13px;
  box-shadow: 0 10px 20px rgba(0,0,0,.06);
}
#state-pill.ok{ border-color: rgba(34,197,94,.22); }
#state-pill.maintenance{ border-color: rgba(245,158,11,.24); }
#state-pill.incident{ border-color: rgba(239,68,68,.24); }
#state-pill.update-pending{ border-color: rgba(139,92,246,.24); }

/* Message */
#state-message{
  margin-top: 10px;
  color: rgba(11,18,32,.84);
  font-weight: 650;
}

/* Maintenance schedule area (ids used by status.js) */
.hidden{ display:none !important; }

#schedule{
  margin-top: 12px;
  padding: 12px 12px;
  border-radius: 18px;
  border: 1px solid rgba(245,158,11,.22);
  background: linear-gradient(180deg, rgba(245,158,11,.12), rgba(255,255,255,.48));
}
#countdown{
  margin-top: 6px;
  font-weight: 950;
}

/* Affected services */
#affected{
  margin-top: 12px;
  padding: 12px 12px;
  border-radius: 18px;
  border: 1px solid rgba(11,18,32,.12);
  background: rgba(255,255,255,.52);
}
#affected-list{
  margin: 8px 0 0;
  padding-left: 18px;
}
#affected-list li{
  margin: 6px 0;
  color: rgba(11,18,32,.84);
  font-weight: 650;
}

/* ---------- History list ---------- */
#history-list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}

#history-list li{
  padding: 12px 12px;
  border-radius: 18px;
  border: 1px solid rgba(11,18,32,.10);
  background: rgba(255,255,255,.56);
  position:relative;
  overflow:hidden;
}

#history-list li::before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width:4px;
  background: var(--ok);
  opacity:.95;
}

#history-list li.ok::before{ background: var(--ok); }
#history-list li.maintenance::before{ background: var(--maint); }
#history-list li.incident::before{ background: var(--incident); }
#history-list li.update-pending::before{ background: var(--pending); }

#history-list li strong{
  display:block;
  font-weight: 950;
  letter-spacing: -.01em;
}
#history-list li .t-meta{
  display:block;
  margin-top: 2px;
  font-size: 12px;
  color: rgba(65,80,106,.92);
  font-weight: 750;
}
#history-list li div{
  margin-top: 6px;
  color: rgba(11,18,32,.82);
  font-weight: 650;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .statusGrid{ grid-template-columns: 1fr; }
}

@media (max-width: 820px){
  .nav{ top:10px; }
  .nav__links, .links{ display:none; }
  main{ padding: 14px 0 70px; }
  .statusHero{ border-radius: 22px; }
  .statusHero__inner{ padding: 18px 16px 14px; }
  .card{ border-radius: 20px; }
  .container{ width:min(var(--max), calc(100% - 28px)); }
}
