/* Gasty Status — a LANDING arculata (dark-900 háttér, #14CACF primary), világos módban is */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0f989c;
  --primary-strong: #0a6669;

  --ok: #10b981;
  --degraded: #eab308;
  --partial: #f97316;
  --major: #ef4444;
  --maintenance: #3b82f6;
  --none: #cbd5e1;

  --ok-bg: #ecfdf5;
  --degraded-bg: #fefce8;
  --partial-bg: #fff7ed;
  --major-bg: #fef2f2;
  --maintenance-bg: #eff6ff;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 8px rgba(15, 23, 42, .04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090e1b;
    --surface: #111827;
    --surface-2: #1e293b;
    --border: #1e293b;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --primary: #14cacf;
    --primary-strong: #47e9ed;
    --none: #334155;

    --ok-bg: rgba(16, 185, 129, .12);
    --degraded-bg: rgba(234, 179, 8, .12);
    --partial-bg: rgba(249, 115, 22, .12);
    --major-bg: rgba(239, 68, 68, .14);
    --maintenance-bg: rgba(59, 130, 246, .14);
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-strong); text-decoration: underline; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* ── Fejléc ───────────────────────────────────────── */
.site-header { padding: 28px 0 8px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; color: var(--text); }
.logo { height: 34px; width: auto; display: block; }
.brand-sub {
  font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); border-left: 1px solid var(--border); padding-left: 10px;
}
.lang-switch {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px;
}
.lang-switch:hover { color: var(--text); text-decoration: none; border-color: var(--muted); }

/* ── Fő banner ────────────────────────────────────── */
.banner {
  display: flex; align-items: center; gap: 16px;
  margin: 24px 0; padding: 22px 24px; border-radius: var(--radius);
  color: #fff; background: var(--ok);
}
.banner h1 { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 700; }
.banner-meta { margin: 2px 0 0; font-size: 13px; opacity: .9; }
.banner-icon {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .22) center / 20px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.banner-degraded { background: #ca8a04; }
.banner-partial_outage { background: var(--partial); }
.banner-major_outage { background: var(--major); }
.banner-maintenance { background: var(--maintenance); }
.banner-unknown { background: var(--surface-2); color: var(--text); }
.banner-degraded .banner-icon,
.banner-partial_outage .banner-icon,
.banner-major_outage .banner-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E");
}
.banner-maintenance .banner-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0-5.4 5.4L3 18l3 3 6.3-6.3a4 4 0 0 0 5.4-5.4l-2.6 2.6-2.4-.6-.6-2.4z'/%3E%3C/svg%3E");
}

/* ── Értesítések ──────────────────────────────────── */
.notice {
  margin: 16px 0; padding: 14px 18px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
}
.notice h2 { margin: 0 0 4px; font-size: 16px; }
.notice p { margin: 0; }
.notice-external { border-left: 4px solid var(--partial); background: var(--partial-bg); }
.notice-stale { border-left: 4px solid var(--degraded); background: var(--degraded-bg); font-size: 14px; }

/* ── Szekciók, kártyák ────────────────────────────── */
.section { margin: 32px 0; }
.section-title { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.muted { color: var(--muted); }
.small { font-size: 13px; }

.pill {
  display: inline-block; vertical-align: middle;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
}
.pill-maintenance { background: var(--maintenance-bg); color: var(--maintenance); }
.pill-investigating { background: var(--major-bg); color: var(--major); }
.pill-identified { background: var(--partial-bg); color: var(--partial); }
.pill-monitoring { background: var(--degraded-bg); color: #ca8a04; }
.pill-resolved { background: var(--ok-bg); color: var(--ok); }

/* Incidensek */
.incident, .maintenance { padding: 16px 20px; margin-bottom: 12px; border-left: 4px solid var(--major); }
.incident-minor { border-left-color: var(--degraded); }
.incident-none { border-left-color: var(--muted); }
.maintenance { border-left-color: var(--maintenance); }
.incident h3, .maintenance h3 { margin: 0 0 6px; font-size: 16px; }
.incident p, .maintenance p { margin: 4px 0; }

/* ── Komponensek ──────────────────────────────────── */
.component { padding: 18px 20px; }
.component + .component { border-top: 1px solid var(--border); }
.component-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.component-name { display: flex; align-items: center; gap: 8px; font-weight: 600; flex-wrap: wrap; }
.component-status { font-size: 13px; font-weight: 600; white-space: nowrap; }
.component-desc { margin: 2px 0 0 18px; font-size: 13px; color: var(--muted); }
.component-note {
  margin: 8px 0 0; padding: 8px 12px; border-radius: 8px;
  font-size: 13px; background: var(--surface-2);
}
.component-note a { margin-left: 6px; white-space: nowrap; }

.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ok); }
.dot-degraded { background: var(--degraded); }
.dot-partial_outage { background: var(--partial); }
.dot-major_outage { background: var(--major); }
.dot-maintenance { background: var(--maintenance); }

.status-operational { color: var(--ok); }
.status-degraded { color: #ca8a04; }
.status-partial_outage { color: var(--partial); }
.status-major_outage { color: var(--major); }
.status-maintenance { color: var(--maintenance); }

/* 90 napos sáv */
.bars { display: flex; gap: 2px; height: 34px; margin-top: 14px; }
.bar {
  flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--ok);
  transition: opacity .1s; cursor: default; outline: none;
}
.bar:hover, .bar:focus-visible { opacity: .65; }
.bar-degraded { background: var(--degraded); }
.bar-partial_outage { background: var(--partial); }
.bar-major_outage { background: var(--major); }
.bar-maintenance { background: var(--maintenance); }
.bar-none { background: var(--none); }

.bars-legend {
  display: flex; align-items: center; gap: 10px; margin-top: 6px;
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
.legend-line { flex: 1; height: 1px; background: var(--border); }
.bars-legend .l30 { display: none; }

/* Keskeny képernyőn csak az utolsó 30 nap */
@media (max-width: 600px) {
  .bars .bar:nth-child(-n+60) { display: none; }
  .bars-legend .l90 { display: none; }
  .bars-legend .l30 { display: inline; }
  .banner { padding: 18px; }
  .banner h1 { font-size: 19px; }
  .component { padding: 16px; }
}

/* Tooltip */
.tooltip {
  position: fixed; z-index: 10; max-width: 260px; pointer-events: none;
  padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45;
  background: var(--text); color: var(--bg); box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}
.tooltip strong { display: block; }
.tooltip .tip-inc { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(127, 127, 127, .35); }

/* Korábbi incidensek */
.past-item { padding: 12px 20px; display: flex; flex-direction: column; gap: 2px; }
.past-item + .past-item { border-top: 1px solid var(--border); }
.past-title { font-weight: 600; }
.impact-major, .impact-critical { color: var(--major); }
.impact-minor { color: #ca8a04; }

/* Feliratkozás gomb a fejlécben */
.header-nav { display: flex; align-items: center; gap: 8px; }
.btn-subscribe {
  display: inline-block; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 8px;
  background: var(--primary); color: #fff;
}
.btn-subscribe:hover { color: #fff; text-decoration: none; background: var(--primary-strong); }
@media (prefers-color-scheme: dark) { .btn-subscribe, .btn-subscribe:hover { color: #090e1b; } }

/* Nyilvános űrlapok (feliratkozás, beállítások) */
.form-card { padding: 24px 26px; margin: 8px 0 24px; }
.form-card h1 { font-size: 22px; margin: 0 0 8px; }
.pub-form { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.pub-form .field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.pub-form input[type=email], .pub-form select {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; max-width: 420px;
}
.pub-form input:focus, .pub-form select:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.pub-form .check, .pub-form .radio { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.pub-form input[type=checkbox], .pub-form input[type=radio] { accent-color: var(--primary); margin-top: 3px; }
.sub-components { border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin: 0; }
.sub-components legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.sub-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; margin: 6px 0 0 24px; }
.sub-group { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 6px; }
@media (max-width: 600px) { .sub-list { grid-template-columns: 1fr; } }
.consent { color: var(--muted); }
.btn-pub {
  align-self: flex-start; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  padding: 10px 20px; border-radius: 8px; border: 0; background: var(--primary); color: #fff;
}
.btn-pub:hover { background: var(--primary-strong); }
.btn-pub-danger { background: var(--major); }
.btn-pub-danger:hover { background: #dc2626; }
.danger-link { color: var(--major); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice-error { border-left: 4px solid var(--major); background: var(--major-bg); }
.notice-ok { border-left: 4px solid var(--ok); background: var(--ok-bg); }

/* Előzmények */
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 20px; }
.history-head h1 { font-size: 24px; margin: 0; }
.month-nav { display: flex; align-items: center; gap: 14px; font-weight: 600; }
.month-nav a { padding: 2px 10px; border: 1px solid var(--border); border-radius: 8px; }
.month-nav a:hover { text-decoration: none; border-color: var(--muted); }
.past-day + .past-day { border-top: 1px solid var(--border); }
.past-date { font-size: 14px; margin: 0; padding: 14px 20px 0; color: var(--muted); }
.past-day .past-item + .past-item { border-top: 0; padding-top: 4px; }

/* Incidens oldal */
.incident-head h1 { font-size: 24px; margin: 8px 0; }
.incident-head p { margin: 4px 0; }
.timeline { padding: 4px 20px; margin-top: 20px; }
.timeline-item { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 0; }
.timeline-item + .timeline-item { border-top: 1px solid var(--border); }
.timeline-item p { margin: 0 0 4px; }
.timeline-status { font-weight: 700; }
@media (max-width: 600px) {
  .timeline-item { grid-template-columns: 1fr; gap: 4px; }
}

/* ── Lábléc ───────────────────────────────────────── */
.site-footer { margin: 48px 0 32px; font-size: 13px; color: var(--muted); }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--border); padding-top: 20px;
}
.footer-links { display: flex; gap: 16px; }
