/* ==========================================================================
   Prevádzka ako oddelená kópia (docs/SPEC_V4.md §3 R13, round 13 S3; views/operation.js) — prefix .op-
   Used by Domov, Prevádzka and Scenáre: the mode badge, the banners of a pair (simulácia ↔ prevádzka), the one-time banner of
   the migration, the sheet „Spustiť prevádzku“ and the typed-name deletion. Colours only through tokens (the Nova 2 look of
   v2.css; the classic look and dark mode fall back to app.css). Phone first: ≥ 44 px targets on touch, long names wrap.
   ========================================================================== */

/* ---- mode badge: „Prevádzka od 17. 10. 2026“ (green) / „Simulácia“ (grey) ---- */
.op-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 28px;
  padding: 3px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--grey-soft, var(--surface-2));
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}
.op-badge[data-mode="operation"] {
  border-color: transparent;
  background: var(--green-soft, var(--good-soft));
  color: var(--green-text, var(--good-text));
}
.op-badge .icon { flex: none; }

/* ---- banners of an open scenario (Domov, Prevádzka) ---- */
.op-banners { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.op-banners[hidden], .op-banner[hidden] { display: none; }
.op-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 14px);
  background: var(--surface);
}
.op-banner--copy { background: var(--green-tint, var(--good-soft)); }
.op-banner--migrated { background: var(--accent-soft); }
.op-banner-icon { flex: none; margin-top: 2px; color: var(--green-text, var(--good-text)); }
.op-banner--migrated .op-banner-icon { color: var(--link); }
.op-banner-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.op-banner-title { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.op-banner-text { color: var(--text-2); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.op-banner-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  color: var(--link);
  text-decoration: none;
}
.op-banner-link:hover { text-decoration: underline; }
.op-banner-link .icon { flex: none; }
.op-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.op-banner-actions .btn { white-space: normal; }

/* ---- the sheet „Spustiť prevádzku“ ---- */
.modal.op-sheet .modal-body { display: flex; flex-direction: column; gap: 12px; }
.op-sheet-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.op-sheet-body:focus { outline: none; }
.op-lead { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.op-points { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.op-points li { display: flex; align-items: flex-start; gap: 8px; min-width: 0; color: var(--text-2); font-size: 14px; line-height: 1.4; }
.op-points li .icon { flex: none; margin-top: 2px; color: var(--green-text, var(--good-text)); }
.op-points li span { min-width: 0; overflow-wrap: anywhere; }
.op-error { margin: 0; color: var(--critical-text, var(--critical)); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.op-error[hidden], .op-exists[hidden] { display: none; }
.op-exists { display: inline-flex; align-items: center; min-height: 36px; font-weight: 600; overflow-wrap: anywhere; }
.modal.op-sheet .modal-footer .btn, .modal.op-delete-sheet .modal-footer .btn { white-space: normal; }

/* ---- Scenáre: a pair of cards, the link to the partner, the migration notice ---- */
.op-pair {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 32px;
  color: var(--link);
  font-size: 13px;
  text-decoration: none;
}
.op-pair:hover { text-decoration: underline; }
.op-pair .icon { flex: none; }
.op-pair-text { min-width: 0; overflow-wrap: anywhere; }
.op-pair-label { color: var(--text-2); }
.sc-card.op-in-pair { border-color: var(--border-strong); }
.sc-card.op-in-pair[data-mode="operation"] { box-shadow: inset 4px 0 0 var(--green, var(--good)); }
.op-card-notice {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius, 10px);
  background: var(--accent-soft);
  font-size: 13px;
  line-height: 1.4;
}
.op-card-notice p { margin: 0; overflow-wrap: anywhere; }
.op-card-notice-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.op-card-notice-actions .btn { white-space: normal; }

/* ---- touch: ≥ 44 px ---- */
@media (pointer: coarse) {
  .op-banner-link, .op-exists, .op-pair { min-height: 44px; }
  .op-banner-actions .btn, .op-card-notice-actions .btn { min-height: 44px; }
  .modal.op-sheet .modal-footer .btn, .modal.op-delete-sheet .modal-footer .btn { min-height: 44px; }
  .modal.op-sheet .input, .modal.op-delete-sheet .input { min-height: 44px; }
}

@media print {
  .op-banners, .op-banner-actions, .op-card-notice-actions { display: none !important; }
}
