/*
 * Osservatorio — sovrapposizione autonoma.
 * Usa i token del tema Pitch: nessun colore proprio, cosi resta allineato
 * al resto dell'applicazione anche se la palette cambia.
 */

.mh-obs-overlay[hidden] { display: none; }

.mh-obs-overlay {
  position: fixed;
  z-index: 10000;
  inset: 0;
  overflow: auto;
  color: var(--mh-text, #f2eff0);
  background: var(--mh-canvas-0, #0b0a0a);
  font-family: var(--mh-font-ui, Inter, system-ui, sans-serif);
}

html.mh-obs-open { overflow: hidden; }

.mh-obs-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 64px;
}

.mh-obs-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 6px 2px 16px;
}

.mh-obs-kicker {
  display: block;
  color: var(--mh-text-muted, #928a8c);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mh-obs-topbar h1 {
  margin: 3px 0 0;
  font-size: 24px;
  font-weight: 720;
  letter-spacing: -.02em;
}

.mh-obs-close {
  width: 40px;
  height: 40px;
  color: var(--mh-text-secondary, #bdb5b7);
  background: var(--mh-surface-raised, #1c1a1b);
  border: 1px solid var(--mh-line-strong, #454041);
  border-radius: var(--mh-radius-md, 10px);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.mh-obs-close:hover { color: var(--mh-text, #f2eff0); background: var(--mh-surface-hover, #262626); }

.mh-obs-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--mh-surface-raised, #1c1a1b);
  border: 1px solid var(--mh-line, #2f2c2d);
  border-radius: var(--mh-radius-md, 10px);
}

.mh-obs-tabs button {
  min-height: 34px;
  padding: 0 16px;
  color: var(--mh-text-muted, #928a8c);
  background: transparent;
  border: 0;
  border-radius: var(--mh-radius-sm, 6px);
  font: inherit;
  font-size: 13px;
  font-weight: 620;
  cursor: pointer;
  transition: color .14s ease, background-color .14s ease;
}

.mh-obs-tabs button:hover { color: var(--mh-text-secondary, #bdb5b7); }

.mh-obs-tabs button.active {
  color: var(--mh-primary-strong, #ff2f52);
  background: var(--mh-primary-soft, #2a0a10);
}

.mh-obs-notice { min-height: 20px; padding: 10px 2px 0; font-size: 12.5px; color: var(--mh-text-secondary, #bdb5b7); }
.mh-obs-notice.success { color: var(--mh-signal, #2fbf6a); }
.mh-obs-notice.error { color: #ff8a8e; }

.mh-obs-content { display: grid; gap: 16px; margin-top: 8px; }
.mh-obs-loading { padding: 40px; text-align: center; color: var(--mh-text-muted, #928a8c); }

:where(.mh-obs-overlay button, .mh-obs-overlay input, .mh-obs-overlay textarea):focus-visible {
  outline: 2px solid var(--mh-primary, #ef002b);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .mh-obs-overlay * { transition-duration: .001ms !important; }
}

@media (max-width: 720px) {
  .mh-obs-shell { width: calc(100% - 20px); }
}
