/* tycoon-kit.css: shared HUD, panels and labels for the 3D business sims (used with sim3d.css) */
#game-root .sim-controls-help { margin-top: 14px; }
.tk-reset { margin-top: 10px; border: 1px dashed rgba(255, 255, 255, .3); background: transparent; color: inherit; border-radius: 10px; padding: 8px 12px; font: 700 13px system-ui, sans-serif; cursor: pointer; }
.tk-hud { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; max-width: 62%; pointer-events: none; }
.tk-hud > div { background: rgba(8, 16, 28, .74); border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; padding: 5px 10px; font: 800 15px system-ui, sans-serif; color: #fff; white-space: nowrap; }
.tk-hud .is-alert { background: rgba(147, 51, 234, .9); pointer-events: auto; cursor: pointer; animation: tk-pulse 1s ease-in-out infinite alternate; }
.tk-hud .is-hidden { display: none; }
@keyframes tk-pulse { to { transform: scale(1.06); } }

.tk-label { position: absolute; left: 0; top: 0; pointer-events: none; background: rgba(255, 255, 255, .94); color: #111827; border-radius: 10px; padding: 3px 8px 5px; font: 800 12px/1.25 system-ui, sans-serif; white-space: nowrap; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); will-change: transform; }
.tk-label::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: rgba(255, 255, 255, .94); }
.tk-label i { display: block; height: 4px; margin-top: 3px; border-radius: 2px; background: #e5e7eb; overflow: hidden; }
.tk-label u { display: block; height: 100%; background: #22c55e; }
.tk-label.is-cross u { background: #ef4444; }
.tk-label.is-sad { background: #fee2e2; }
.tk-label.is-small { font-size: 11px; padding: 2px 6px 3px; }

.tk-panel { position: absolute; z-index: 3; right: 10px; top: 10px; width: min(340px, calc(100% - 20px)); background: rgba(8, 16, 28, .92); border: 1px solid rgba(255, 255, 255, .2); border-radius: 14px; padding: 9px 11px; color: #fff; font: 600 13px/1.4 system-ui, sans-serif; opacity: 0; transform: translateY(-12px); pointer-events: none; transition: opacity .18s, transform .18s; }
.tk-panel.is-on { opacity: 1; transform: none; pointer-events: auto; }
.tk-panel h5 { margin: 0 0 6px; font-size: 14px; }
.tk-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tk-panel button { border: 2px solid rgba(255, 255, 255, .22); background: rgba(30, 58, 95, .92); color: #fff; border-radius: 10px; padding: 5px 9px; font: 800 13px system-ui, sans-serif; cursor: pointer; min-height: 36px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.tk-panel button:hover:not(:disabled) { background: rgba(37, 99, 235, .95); }
.tk-panel button:focus-visible { outline: 3px solid #ffd54a; outline-offset: 1px; }
.tk-panel button:disabled { opacity: .45; cursor: not-allowed; }
.tk-panel .tk-go { background: rgba(22, 163, 74, .92); }
.tk-panel .tk-warn { background: rgba(185, 28, 28, .9); }
.tk-lcd { background: #052e16; border: 2px solid #14532d; border-radius: 8px; padding: 3px 9px; font: 800 19px/1.15 ui-monospace, "Courier New", monospace; color: #4ade80; text-align: right; }
.tk-lcd small { display: block; font-size: 12px; color: #86efac; }

.tk-float { position: absolute; transform: translate(-50%, -50%); font: 900 17px system-ui, sans-serif; color: #fde047; text-shadow: 0 2px 4px #000; animation: tk-up 1.6s ease-out forwards; pointer-events: none; white-space: nowrap; z-index: 2; }
.tk-float.is-gold { color: #fff; font-size: 20px; text-shadow: 0 0 8px #f59e0b, 0 2px 4px #000; }
.tk-float.is-bad { color: #fca5a5; }
@keyframes tk-up { to { transform: translate(-50%, -170%); opacity: 0; } }

.tk-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-top: 8px; }
.tk-box { background: var(--color-bg-alt, #1c1f27); border: 1px solid var(--color-border, #2d3240); border-radius: 12px; padding: 8px; min-width: 0; }
.tk-box h4 { margin: 0 0 6px; font-size: 14px; display: flex; justify-content: space-between; gap: 6px; }
.tk-box h4 small { font-weight: 600; opacity: .7; font-size: 11px; }
.tk-list { display: flex; flex-direction: column; gap: 5px; }
.tk-side button { border: 1px solid rgba(255, 255, 255, .16); background: rgba(34, 197, 94, .16); color: inherit; border-radius: 9px; padding: 5px 8px; font: 700 12px system-ui, sans-serif; cursor: pointer; }
.tk-side button:focus-visible { outline: 3px solid #ffd54a; outline-offset: 1px; }
.tk-side button.is-dim, .tk-side button:disabled { opacity: .5; background: rgba(255, 255, 255, .05); }
.tk-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; }
.tk-item > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-item small { opacity: .7; }
.tk-list > button { display: flex; justify-content: space-between; gap: 8px; text-align: left; font-size: 13px; }
.tk-bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.tk-bar u { display: block; height: 100%; background: #22c55e; }
.tk-note { margin: 2px 0 0; font-size: 12px; opacity: .8; }
.tk-goal { font-size: 12px; opacity: .75; padding: 2px 0; } .tk-goal.is-done { opacity: 1; color: #facc15; }
.tk-report { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 14px; }
.tk-report td { padding: 3px 4px; border-bottom: 1px solid rgba(255, 255, 255, .1); text-align: left; }
.tk-report td + td { text-align: right; font-weight: 800; }

@container (max-width: 560px) {
  .tk-hud { max-width: 100%; right: 8px; }
  .tk-hud > div { font-size: 13px; padding: 4px 8px; }
  .tk-panel { top: auto; bottom: 6px; right: 8px; width: calc(100% - 16px); padding: 7px 8px; max-height: 62%; overflow: auto; }
  .tk-panel button { padding: 5px 7px; font-size: 12px; }
  .tk-label { font-size: 11px; padding: 2px 6px 4px; }
}
@media (prefers-reduced-motion: reduce) { .tk-hud .is-alert { animation: none; } .tk-float { animation-duration: .01s; } }
