/* gcode-compare-v2.css - a V2 összehasonlító nézet stílusai.
   A gcode-compare-v2.js tölti be (korábban JS-be ágyazott <style> blokk volt).
   A gcv- osztálynevek a V1-gyel kompatibilisek. */

.gcv-overlay { position: fixed; inset: 0; z-index: 1000;
    background: #16181d; color: #ddd;
    font-family: system-ui, sans-serif;
    /* Csempe hatterek: a frame-ek attetszo hatterrel erkeznek (cycles),
       a canvas is attetszo -> ezek a valtozok adjak a hatteret. */
    --gcv-cell-bg: #000;          /* csempe, amin mar van kep */
    --gcv-cell-empty-bg: #16181d; /* ures csempe (meg nincs frame) */ }
/* Tabos (beagyazott) mod: minden reteg attetszo, a hatteret az oldal
   temaja (settings-container) adja. */
.gcv-overlay.gcv-tabs { background: transparent;
    --gcv-cell-bg: transparent; --gcv-cell-empty-bg: transparent; }
/* Inline (beagyazott) mod: a nezegeto a fooldal egy container-eben
   kap fix meretu helyet, nem takarja el a teljes ablakot. */
.gcv-overlay.gcv-inline { position: absolute; inset: 0; z-index: 1;
    border-radius: 8px; }
.gcv-canvas-holder { position: absolute; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
.gcv-cell-ui { position: absolute; inset: 0; pointer-events: none;
    z-index: 2; }
.gcv-cell { position: absolute; pointer-events: none; overflow: hidden;
    background: var(--gcv-cell-empty-bg); }
.gcv-cell.gcv-has-frame { background: var(--gcv-cell-bg); }
.gcv-cell-canvas { position: absolute; inset: 0; width: 100%; height: 100%;
    display: block; pointer-events: none; image-rendering: auto; }
.gcv-cell-label { position: absolute; bottom: 6px; right: 8px;
    background: rgba(0,0,0,.55); color: #fff; font-size: 12px;
    padding: 3px 8px; border-radius: 4px;
    max-width: calc(100% - 24px); overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.gcv-cell-zoom { position: absolute; top: 6px; right: 6px;
    background: rgba(0,0,0,.55); color: #fff; border: none;
    border-radius: 4px; padding: 4px 8px; font-size: 12px;
    cursor: pointer; pointer-events: auto; line-height: 1; }
.gcv-cell-zoom:hover { background: rgba(232,132,44,.9); }
.gcv-cell-border { position: absolute; inset: 0;
    border: 1px solid #2a2d35; pointer-events: none; }
.gcv-panel-toggle { position: absolute; top: 12px; left: 12px;
    background: rgba(24,26,32,.75); color: #ddd;
    border: 1px solid #3a3e48; border-radius: 8px;
    padding: 6px 10px; font-size: 16px; line-height: 1;
    cursor: pointer; z-index: 4; backdrop-filter: blur(4px); }
.gcv-panel-toggle:hover { background: #2c2f37; }
.gcv-panel { position: absolute; top: 52px; left: 12px;
    width: 260px; max-height: calc(100% - 64px); overflow-y: auto;
    background: rgba(24,26,32,.65); border: 1px solid #333;
    border-radius: 10px; padding: 12px; z-index: 3;
    backdrop-filter: blur(4px); }
.gcv-panel.gcv-panel-hidden { display: none; }
.gcv-panel-close { position: absolute; top: 8px; right: 8px;
    background: #22252c; color: #ddd; border: 1px solid #3a3e48;
    border-radius: 6px; padding: 3px 9px; cursor: pointer;
    font-size: 12px; line-height: 1; }
.gcv-panel-close:hover { background: #2c2f37; }
.gcv-panel select { width: 100%; background: #22252c; color: #ddd;
    border: 1px solid #3a3e48; border-radius: 6px;
    padding: 4px 6px; font-size: 12px; box-sizing: border-box; }
.gcv-panel h1 { padding-right: 40px; font-size: 14px; margin: 0 0 4px; }
.gcv-panel .gcv-sub { font-size: 11px; color: #888; margin-bottom: 8px; }
.gcv-codec-status { padding: 5px 7px; margin-bottom: 8px;
    border: 1px solid #3a3e48; border-radius: 5px;
    background: rgba(0,0,0,.25); color: #9ab; font-size: 10px;
    line-height: 1.3; }
.gcv-codec-status.webcodecs { color: #7ee6a8; border-color: #287448; }
.gcv-panel h2 { font-size: 11px; text-transform: uppercase;
    letter-spacing: .06em; color: #9ab; margin: 10px 0 4px;
    border-bottom: 1px solid #2a2d35; padding-bottom: 3px; }
.gcv-panel label { display: flex; align-items: center;
    gap: 6px; font-size: 12px; padding: 2px 0; cursor: pointer;
    user-select: none; }
.gcv-render-btn { width: 100%; margin-top: 6px; padding: 8px;
    background: #e8842c; color: #16181d; border: none;
    border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 13px; }
.gcv-render-btn:disabled { opacity: .5; cursor: wait; }
.gcv-status { font-size: 11px; color: #8a9; min-height: 14px;
    margin-top: 4px; white-space: pre-line; }
.gcv-loading { position: absolute; inset: 0; display: flex;
    align-items: center; justify-content: center;
    background: rgba(22,24,29,.85); z-index: 5; font-size: 14px; }
.gcv-render-exit { position: absolute; top: 12px; right: 16px;
    background: #22252c; color: #ddd; border: 1px solid #3a3e48;
    border-radius: 6px; padding: 6px 14px; cursor: pointer;
    font-size: 13px; z-index: 4; display: none; }
.gcv-render-exit:hover { background: #2c2f37; }
.gcv-cell-render { position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none; }
.gcv-cell-render img { width: 100%; height: 100%;
    object-fit: fill; display: block; }
.gcv-cell-render .gcv-cr-msg { background: rgba(0,0,0,.6);
    color: #fff; font-size: 13px; font-weight: 600;
    padding: 6px 14px; border-radius: 6px; }
.gcv-cell-render.error .gcv-cr-msg { color: #ff8a8a; }
.gcv-cell-wait { position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none; }
.gcv-cell-wait .gcv-cw-msg { background: rgba(0,0,0,.6);
    color: #9ab; font-size: 12px; padding: 5px 12px;
    border-radius: 6px; max-width: calc(100% - 24px);
    display: flex; align-items: center; gap: 8px;
    overflow: hidden; }
.gcv-cell-wait .gcv-cw-text { overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; }
.gcv-cell-wait .gcv-cw-msg.error { color: #ff8a8a; }
.gcv-cw-spinner { width: 14px; height: 14px; flex: none;
    border: 2px solid rgba(255,255,255,.2); border-radius: 50%;
    border-top-color: #6db2ff; display: inline-block;
    animation: gcv-spin .8s linear infinite; }
@keyframes gcv-spin { to { transform: rotate(360deg); } }

/* Ar + Kosarba a csempe bal also sarkaban (az Ar kalkulacio blokk
   stilusat koveti: accent-kek ar, action-button szeru gomb) */
.gcv-cell-price { position: absolute; left: 8px; bottom: 8px; z-index: 3;
    background: rgba(0,0,0,.6); border-radius: 8px;
    padding: 10px 12px; pointer-events: auto; max-width: 72%;
    backdrop-filter: blur(3px); }
.gcv-price-main { color: #6db2ff; font-weight: 700; font-size: 15px;
    margin-bottom: 4px; }
.gcv-price-sub { color: #bbb; font-size: 11px; line-height: 1.5; }
.gcv-price-warn { color: #ffc76b; font-size: 11px; margin-top: 4px; }
.gcv-cart-buttons { display: flex; gap: 6px; margin-top: 8px; }
.gcv-cart-btn-normal, .gcv-cart-btn-strong { flex: 1 1 0; background: #096dd9;
    color: #fff; border: none; border-radius: 6px; padding: 8px 10px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: background .2s, opacity .2s; }
.gcv-cart-btn-normal:hover, .gcv-cart-btn-strong:hover { background: #0050b3; }
.gcv-cart-btn-normal:disabled, .gcv-cart-btn-strong:disabled { background: #6c757d;
    cursor: not-allowed; opacity: .6; }

/* Render confirm modal */
.gcv-modal-bg { position: absolute; inset: 0; z-index: 7;
    background: rgba(0,0,0,.55); display: none;
    align-items: center; justify-content: center; }
.gcv-modal { background: #1c1f26; border: 1px solid #333;
    border-radius: 10px; padding: 20px 22px; max-width: 480px;
    color: #ddd; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.gcv-modal h2 { margin: 0 0 10px; font-size: 15px; color: #fff; }
.gcv-modal p { margin: 6px 0; font-size: 13px; line-height: 1.45; }
.gcv-modal-actions { display: flex; gap: 10px; justify-content: flex-end;
    margin-top: 14px; }
.gcv-modal button { padding: 6px 14px; border-radius: 6px; cursor: pointer;
    border: 1px solid #3a3e48; font-size: 13px;
    background: #2c2f37; color: #ddd; }
.gcv-modal button.primary { background: #e8842c; color: #16181d;
    border-color: #e8842c; font-weight: 600; }
.gcv-fmt-row { display: flex; gap: 4px; margin-bottom: 8px; }
.gcv-fmt-btn { flex: 1; padding: 4px 0; background: #22252c; color: #888;
    border: 1px solid #3a3e48; border-radius: 5px; cursor: pointer;
    font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.gcv-fmt-btn.active { background: #1a3a4a; color: #6cf;
    border-color: #2a6080; }
.gcv-fmt-btn:disabled { opacity: .45; cursor: not-allowed; }
.gcv-fmt-btn:hover:not(.active) { background: #2c2f37; color: #bbb; }
.gcv-wc-status { color: #8a9; font-size: 10px; line-height: 1.3;
    margin: -3px 0 8px; }
.gcv-wc-choice-head { color: #9ab; font-size: 10px;
    text-transform: uppercase; letter-spacing: .05em; margin: 7px 0 3px; }

/* Szekcio-fejlec a features panelben (Drag felbontas stb.) */
.gcv-ds-head { font-size: 11px; text-transform: uppercase;
    letter-spacing: .06em; color: #9ab; margin: 10px 0 4px;
    border-bottom: 1px solid #2a2d35; padding-bottom: 3px; }

/* Rejtett <video> a H264/MSE dekodoloshoz (technikai, nem latszik) */
.gcv-h264-video { position: absolute; opacity: 0;
    pointer-events: none; width: 1px; height: 1px; }

/* ---- Tabos (1 felulet) elrendezes: /kalkulator (nozzle tab-ok) ---- */
.compare-viewer-mount.gcv-mount-tabs { height: auto; min-height: 0;
    width: 100%; overflow: visible; background: none; border-radius: 0; }
.gcv-tabs-wrap { --gcv-frame: var(--button-border, #d1d5db);
    width: 900px; max-width: 100%; margin: 0 auto; }
/* A tabsor es a nezegeto egy "kartya": a tabok a keret felso elen ulnek,
   a keret vonala az aktiv tab alatt megszakad (l. .gcv-tab-active). */
.gcv-tabbar { position: relative; z-index: 2; display: flex; gap: 3px;
    align-items: flex-end; padding-top: 8px; overflow-x: auto;
    overflow-y: hidden; scrollbar-width: none; }
.gcv-tabbar::-webkit-scrollbar { display: none; }
.gcv-tabs-viewport { position: relative; width: 100%; height: 700px;
    margin-top: -1px; border: 1px solid var(--gcv-frame);
    border-radius: 0 0 12px 12px; overflow: hidden;
    background: radial-gradient(ellipse at 50% 40%,
        rgba(255,255,255,.38) 0%, rgba(255,255,255,.10) 45%,
        rgba(0,0,0,.26) 100%);
    box-shadow: inset 0 4px 24px rgba(0,0,0,.30),
        inset 0 -10px 30px rgba(0,0,0,.12),
        inset 0 0 0 1px rgba(255,255,255,.12),
        0 10px 28px var(--container-shadow, rgba(0,0,0,.1)),
        0 2px 6px var(--card-shadow, rgba(0,0,0,.05)); }
/* Tabos modban nincs sotet csempe-szegely; a nezet sarkait a keret adja. */
.gcv-overlay.gcv-tabs { border-radius: 0 0 11px 11px; }
.gcv-overlay.gcv-tabs .gcv-cell-border { display: none; }
/* Tab: az oldal tema-valtozoi (style.css, body.green-theme). Az ikonok
   szine a --gcv-tab-icon-color valtozoval allithato (alap: fekete). 7 tab
   fer el egymas mellett (egyenlo szelesseg); szuk kepernyon gorgetheto. */
.gcv-tab { --gcv-tab-icon-color: #000; --gcv-tab-icon-size: 13px;
    position: relative; flex: 1 1 0; min-width: 80px;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 2px; padding: 6px 3px 6px; font: inherit; font-size: 12px;
    border: 1px solid var(--button-border, #d1d5db);
    border-bottom-color: var(--gcv-frame);
    border-radius: 8px 8px 0 0; background: var(--button-bg, #fff);
    color: var(--text-dark, #333); cursor: pointer;
    box-shadow: 0 -2px 6px var(--card-shadow, rgba(0,0,0,.05));
    transition: background .15s, border-color .15s, box-shadow .15s; }
.gcv-tab:hover { background: var(--button-hover-bg, #f3f4f6);
    border-color: var(--button-hover-border, #9ca3af);
    border-bottom-color: var(--gcv-frame);
    color: var(--text-selected, #333); }
.gcv-tab:focus-visible { outline: 2px solid var(--accent-border, #3b82f6);
    outline-offset: -2px; }
/* Meg nem kesz (szeletel / konvertal / betolt) tab: nem valaszthato, nem
   reagal a hoverre; az allapot-animacio jelzi, hogy dolgozik. */
.gcv-tab-pending, .gcv-tab-pending:hover { cursor: default;
    background: var(--button-bg, #fff);
    border-color: var(--button-border, #d1d5db);
    border-bottom-color: var(--gcv-frame);
    color: var(--text-dark, #333); }
/* Az aktiv tab magasabb, szinezett, es a sajat hatterszinevel "kinyitja"
   a keret felso vonalat -> folytonosan csatlakozik a nezegetohoz. */
.gcv-tab-active, .gcv-tab-active:hover { padding-top: 9px;
    background: var(--button-selected-bg, #afd2ff);
    border-color: var(--button-selected-border, #3b82f6);
    border-bottom-color: var(--button-selected-bg, #afd2ff);
    color: var(--text-selected, #333);
    box-shadow: 0 -3px 10px var(--color-button-shadow,
        rgba(59,130,246,.4)); }
.gcv-tab-label { display: inline-flex; align-items: center; gap: 2px;
    min-width: 0; overflow: hidden; white-space: nowrap;
    font-variant-numeric: tabular-nums; }
.gcv-tab-val { overflow: hidden; text-overflow: ellipsis; }
/* Ikonok: az SVG maszkja + currentColor-szeru hatterszin -> CSS-bol
   szinezheto, atlatszo hatterrel, bongeszofuggetlen alak. */
.gcv-ico { display: inline-block; flex: none;
    width: var(--gcv-tab-icon-size); height: var(--gcv-tab-icon-size);
    background-color: var(--gcv-tab-icon-color);
    -webkit-mask: var(--gcv-ico-url) center / contain no-repeat;
    mask: var(--gcv-ico-url) center / contain no-repeat; }
.gcv-ico-nozzle { --gcv-ico-url: url('/static/img/icons/nozzle.svg'); }
.gcv-ico-layer { --gcv-ico-url: url('/static/img/icons/layer-height.svg'); }
.gcv-ico-hq { --gcv-ico-url: url('/static/img/icons/quality-hq.svg'); }
.gcv-ico-sd { --gcv-ico-url: url('/static/img/icons/quality-sd.svg'); }
/* HQ / SD valto (a nezegeto jobb felso sarkaban): ket felbol allo kapcsolo,
   a tabok vizualis nyelvet kovetve (tema-valtozok, maszkolt ikonok). Az
   aktiv oldal a kivalasztott tab szinet kapja. */
.gcv-quality { --gcv-tab-icon-color: #000; --gcv-tab-icon-size: 13px;
    position: absolute; top: 10px; right: 10px; z-index: 4;
    display: inline-flex;
    border: 1px solid var(--button-border, #d1d5db); border-radius: 8px;
    background: var(--button-bg, #fff);
    box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.gcv-quality[hidden] { display: none; }
.gcv-quality-btn { display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 9px; border: 0; background: transparent; font: inherit;
    font-size: 12px; line-height: 1; cursor: pointer;
    color: var(--text-dark, #333);
    transition: background .15s, color .15s; }
.gcv-quality-btn[data-q="hq"] { border-radius: 7px 0 0 7px; }
.gcv-quality-btn[data-q="sd"] { border-radius: 0 7px 7px 0; }
.gcv-quality-btn + .gcv-quality-btn {
    border-left: 1px solid var(--button-border, #d1d5db); }
.gcv-quality-btn:hover { background: var(--button-hover-bg, #f3f4f6); }
.gcv-quality-btn:focus-visible { outline: 2px solid
    var(--accent-border, #3b82f6); outline-offset: -2px; }
.gcv-quality-btn.gcv-quality-active,
.gcv-quality-btn.gcv-quality-active:hover {
    background: var(--button-selected-bg, #afd2ff);
    color: var(--text-selected, #333); cursor: default; }
.gcv-quality-btn:disabled { cursor: wait; opacity: .7; }
/* HQ nem elerheto jelenleg (eroforrasra var): inaktiv, csikozott, forgo
   jelzovel — nem tiltott, magatol betoltodik. */
.gcv-quality-btn.gcv-quality-pending { opacity: .6; cursor: progress;
    background-image: repeating-linear-gradient(135deg, transparent 0 5px,
        rgba(0,0,0,.07) 5px 10px); }
.gcv-quality-btn.gcv-quality-pending::after { content: ''; flex: none;
    width: 8px; height: 8px; margin-left: 1px; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent;
    animation: gcv-quality-spin .9s linear infinite; }
@keyframes gcv-quality-spin { to { transform: rotate(360deg); } }
/* HQ veglegesen tiltott (a modell tul nagy): teljesen inaktiv gomb */
.gcv-quality-btn.gcv-quality-off, .gcv-quality-btn.gcv-quality-off:hover {
    opacity: .35; cursor: not-allowed; background: transparent; }
.gcv-quality-btn.gcv-quality-off .gcv-ico { opacity: .6; }
.gcv-quality-busy .gcv-quality-active .gcv-ico {
    animation: gcv-quality-pulse .8s ease-in-out infinite alternate; }
@keyframes gcv-quality-pulse { from { opacity: 1; } to { opacity: .3; } }
.gcv-quality-msg { position: absolute; top: calc(100% + 6px); right: 0;
    white-space: nowrap; background: rgba(0,0,0,.7); color: #fff;
    font-size: 11px; padding: 3px 8px; border-radius: 4px;
    pointer-events: none; }
/* Allapot-jelzo (a tab soraban, a nozzle- es a reteg-ikon kozott). A
   "wait" allapotnak 3 szakasza van (.gcv-tab-stage-*), mindegyikhez egy
   sprite-maszk animacio (kepkockak egymas mellett, steps):
     slice   - szeletelés: olló, jobbra forgatva (a reteg-ikon fele "vag")
     convert - G-code -> 3D feldolgozas: voxel-kigyo (alulrol no, alulrol fogy)
     load    - betoltes a megjelenitobe/GPU-ra: nyil a chipbe (kicsit szelesebb)
   Hibanal figyelmezteto ikon, kesznel ures (a hely fenn marad, hogy a tabok
   tartalma ne ugraljon). Az animaciok szine a --gcv-tab-icon-color, mint a
   tobbi ikone. Uj animaciohoz: --gcv-anim-url, --gcv-frames, --gcv-dur
   (+ opcionalisan --gcv-st-w a jelzo szelessege). */
.gcv-tab { --gcv-st-w: 13px; --gcv-st-h: 13px; }
.gcv-tab-stage-slice { --gcv-anim-url: url('/static/img/icons/slice-anim.svg');
    --gcv-frames: 4; --gcv-dur: .8s; }
.gcv-tab-stage-convert { --gcv-anim-url: url('/static/img/icons/convert-anim.svg');
    --gcv-frames: 18; --gcv-dur: 1.2s; }
.gcv-tab-stage-load { --gcv-anim-url: url('/static/img/icons/load-anim.svg');
    --gcv-frames: 6; --gcv-dur: 1s; --gcv-st-w: 15px; }
.gcv-tab-status { flex: none; width: var(--gcv-st-w); height: var(--gcv-st-h);
    pointer-events: none; }
.gcv-tab-wait .gcv-tab-status {
    background-color: var(--gcv-tab-icon-color);
    -webkit-mask: var(--gcv-anim-url) 0 0 / calc(var(--gcv-st-w) * var(--gcv-frames)) var(--gcv-st-h) no-repeat;
    mask: var(--gcv-anim-url) 0 0 / calc(var(--gcv-st-w) * var(--gcv-frames)) var(--gcv-st-h) no-repeat;
    animation: gcv-anim var(--gcv-dur) steps(var(--gcv-frames)) infinite; }
.gcv-tab-wait.gcv-tab-stage-slice .gcv-tab-status { transform: rotate(90deg); }
.gcv-tab-error .gcv-tab-status {
    background-color: #d9534f;
    -webkit-mask: url('/static/img/icons/error.svg') center / contain no-repeat;
    mask: url('/static/img/icons/error.svg') center / contain no-repeat; }
@keyframes gcv-anim {
    from { -webkit-mask-position: 0 0; mask-position: 0 0; }
    to { -webkit-mask-position: calc(var(--gcv-st-w) * var(--gcv-frames) * -1) 0;
         mask-position: calc(var(--gcv-st-w) * var(--gcv-frames) * -1) 0; } }
.gcv-tab-disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.gcv-overlay.gcv-tabs .gcv-cell-zoom { display: none; }
/* A nozzle/reteg infot a tab mar mutatja, a nezegeto sarkaban felesleges. */
.gcv-overlay.gcv-tabs .gcv-cell-label { display: none; }

/* Lebego vezerlok a nezegetoben: finom arnyek az oldal stilusahoz. */
.gcv-overlay.gcv-tabs .gcv-panel-toggle { box-shadow: 0 2px 8px rgba(0,0,0,.3); }
