/* =====================================================================
   Kéthajós 3D-nézet (elonyszam_3d.php, assets/js/rs_vpp_3d.js). Csak az rs-theme.css változóira épül.
   ===================================================================== */
.d3-note { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0 0 1rem; padding: 0.7rem 0.9rem; border: 1px solid var(--rs-accent-line);
    border-radius: var(--rs-radius); background: var(--rs-accent-soft); color: var(--rs-text-2); font-size: 0.9rem; line-height: 1.45; }
.d3-note i { color: var(--rs-accent); margin-top: 0.1rem; }
.d3 { padding: 1rem 1.1rem 1.2rem; }
.d3-controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem 0.8rem; align-items: end; }
.d3-controls [hidden] { display: none !important; }
.d3-ctl output { font-family: var(--rs-font-mono); color: var(--rs-heading); text-transform: none; letter-spacing: 0; margin-left: 0.3rem; }
.d3-ctl .form-range { accent-color: var(--rs-accent); height: 36px; }
.d3-ctl { display: flex; flex-direction: column; gap: 0.25rem; margin: 0; min-width: 0; }
.d3-ctl > span { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rs-muted); }
.d3-ctl .form-select { background-color: var(--rs-input); color: var(--rs-text); border-color: var(--rs-border-strong); min-height: 36px; }
.d3-go { min-height: 36px; white-space: nowrap; font-weight: 700; }
.d3-key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.4rem; vertical-align: 0; }
.d3-key-a { background: #3fa9f5; }
.d3-key-b { background: #f59e3f; }
.d3-status { min-height: 1.5rem; margin: 0.6rem 0 0.4rem; font-size: 0.88rem; color: var(--rs-muted); }
.d3-status.is-error { color: #ff8a80; }
.d3.is-loading .d3-stage { opacity: 0.6; transition: opacity 0.15s; }

.d3-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 72vh; border-radius: var(--rs-radius); overflow: hidden;
    background: #5d7f9c; border: 1px solid var(--rs-border); user-select: none; }
.d3-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.d3-canvas:active { cursor: grabbing; }
.d3-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.d3-label { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 0.78rem; font-weight: 700; color: #fff; padding: 0.15rem 0.5rem;
    border-radius: 999px; background: rgba(8, 20, 32, 0.72); }
.d3-label i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.35rem; }
.d3-hud { position: absolute; left: 0.6rem; top: 0.6rem; padding: 0.45rem 0.6rem; border-radius: var(--rs-radius-sm); background: rgba(8, 20, 32, 0.78);
    color: #e9f1f7; font-size: 0.78rem; pointer-events: none; max-width: calc(100% - 1.2rem); }
.d3-hud:empty { display: none; }
.d3-hud-time { font-family: var(--rs-font-mono); font-size: 1.05rem; font-weight: 700; margin-bottom: 0.2rem; }
.d3-hud-time small { font-family: var(--rs-font-body); font-size: 0.72rem; font-weight: 600; color: #a9bccb; margin-left: 0.4rem; }
.d3-hud table { border-collapse: collapse; }
.d3-hud th, .d3-hud td { padding: 0.08rem 0.45rem 0.08rem 0; text-align: right; font-variant-numeric: tabular-nums; }
.d3-hud thead th { font-weight: 600; color: #a9bccb; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; }
.d3-hud tbody th { text-align: left; }
.d3-hud tbody th i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.3rem; }
.d3-hud-lead { margin-top: 0.25rem; font-weight: 700; color: #ffd27a; }
.d3-views { position: absolute; right: 0.6rem; bottom: 0.6rem; display: inline-flex; border-radius: 999px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(8, 20, 32, 0.72); }
.d3-zoom { position: absolute; right: 0.6rem; bottom: 3.1rem; display: inline-flex; flex-direction: column; border-radius: var(--rs-radius-sm); overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(8, 20, 32, 0.72); }
.d3-zoom button { border: 0; background: transparent; color: #dbe6ee; width: 34px; height: 32px; }
.d3-zoom button + button { border-top: 1px solid rgba(255, 255, 255, 0.18); }
.d3-hint { font-size: 0.78rem; color: var(--rs-faint); margin: 0.35rem 0 0; }
.d3-views button, .d3-speed button { border: 0; background: transparent; color: #dbe6ee; font-weight: 600; font-size: 0.8rem; min-height: 32px; padding: 0 0.7rem; }
.d3-views button + button, .d3-speed button + button { border-left: 1px solid rgba(255, 255, 255, 0.18); }
.d3-views button[aria-pressed="true"], .d3-speed button[aria-pressed="true"] { background: var(--rs-accent); color: var(--rs-accent-ink); }
.d3-wind { position: absolute; right: 0.6rem; top: 0.6rem; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.35rem 0.5rem;
    border-radius: var(--rs-radius-sm); background: rgba(8, 20, 32, 0.72); color: #fff; font-size: 0.72rem; font-weight: 700; pointer-events: none; }
.d3-wind i { font-size: 1.4rem; line-height: 1; color: #8fe3a8; display: inline-block; }
.d3-nojs { position: absolute; inset: auto 1rem 1rem; color: #fff; }

.d3-timeline { position: relative; display: flex; align-items: center; gap: 0.7rem; margin-top: 0.7rem; flex-wrap: wrap; }
.d3-ticks { position: absolute; left: calc(40px + 0.7rem + 8px); right: calc(4.2em + 0.7rem + 220px + 0.7rem + 8px); top: -6px; height: 14px; pointer-events: none; }
.d3-tick { position: absolute; width: 3px; height: 7px; margin-left: -1px; border-radius: 1px; opacity: 0.9; }
.d3-tick-boja { height: 7px; width: 5px; margin-left: -2px; border-radius: 50%; }
.d3-tick-cel { width: 2px; background: #fff !important; height: 14px; }
.d3-timeline input[type=range] { flex: 1 1 240px; accent-color: var(--rs-accent); min-width: 0; }
.d3-timeline output { font-family: var(--rs-font-mono); color: var(--rs-heading); min-width: 4.2em; }
.d3-speed { display: inline-flex; border: 1px solid var(--rs-border-strong); border-radius: 999px; overflow: hidden; }
.d3-speed button { color: var(--rs-text-2); }
.d3-timeline .btn { min-width: 40px; min-height: 34px; }

.d3-result { margin-top: 1rem; }
.d3-h3 { font-size: 1rem; font-weight: 700; color: var(--rs-heading); margin: 0 0 0.5rem; }
.d3-table-wrap { overflow-x: auto; }
.d3-table { font-size: 0.86rem; margin-bottom: 0.4rem; }
.d3-table th, .d3-table td { padding: 0.3rem 0.55rem; vertical-align: top; white-space: nowrap; }
.d3-table th small { display: block; color: var(--rs-muted); font-size: 0.72rem; font-weight: 400; }
.d3-sum { font-size: 0.9rem; color: var(--rs-text-2); margin: 0; }
.d3-flag { color: #ffd27a; }
[data-bs-theme="light"] .d3-flag { color: var(--rs-accent-text); }
.d3-table tfoot td { font-weight: 600; border-top: 1px solid var(--rs-border-strong); }
.d3-table tr.d3-leg-first td, .d3-table tr.d3-leg-first th { border-top: 1px solid var(--rs-border-strong); }
.d3-about { margin-top: 1.2rem; padding: 1rem 1.2rem; font-size: 0.9rem; color: var(--rs-text-2); line-height: 1.5; }
.d3-about ul { padding-left: 1.1rem; margin-bottom: 0.8rem; }
.d3-h2 { font-size: 1.02rem; font-weight: 700; color: var(--rs-heading); margin: 0.2rem 0 0.4rem; }

@media (max-width: 991px) {
    .d3-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .d3-ticks { display: none; }
    .d3-go { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
    .d3 { padding: 0.8rem; }
    .d3-stage { aspect-ratio: 4 / 5; max-height: 78vh; }
    .d3-hud { font-size: 0.7rem; left: 0.4rem; top: 0.4rem; padding: 0.35rem 0.45rem; }
    .d3-hud th, .d3-hud td { padding-right: 0.3rem; }
    .d3-hud th:nth-child(5), .d3-hud td:nth-child(5) { display: none; }   /* mobilon a VMG-oszlop nélkül, hogy kevesebbet takarjon */
    .d3-views { right: 0.4rem; bottom: 0.4rem; }
    .d3-views button { padding: 0 0.5rem; }
    .d3-zoom { right: 0.4rem; bottom: 2.8rem; }
    .d3-wind { top: auto; bottom: 7.2rem; right: 0.4rem; }
}
