/* =============================================================================
 * voice-order.css — „Mondd el, mit szeretnél” hangos rendelés oldal (templates/voiceorder/voice-order.html).
 * A portal-theme.css tokenjeire épül (szín, sarok, térköz) — saját szín csak a téma pill-színeiből.
 * Mobil-első: az alap a telefonra szól, a szélesebb nézet @media (min-width) alatt.
 * doc: D:\IdeaProjects\workOrderManagement\docs\hangos-rendeles-asszisztens\01-WEBES-HANGOS-RENDELES-TERV-FAZIS1-2026-12-03.md §16
 * ============================================================================= */

/* A téma gomb-osztályai display-t állítanak — a „hidden” attribútum így is nyerjen. */
.vo-page [hidden] { display: none !important; }

.vo-page { padding-bottom: var(--sp-xxl); }

.vo-card {
    margin-top: var(--sp-lg);
    padding: var(--sp-xl) var(--sp-lg);
    display: flex;
    flex-direction: column;
    gap: var(--sp-lg);
}

/* ── Hozzájárulás ── */
.vo-consent-text { margin: 0 0 var(--sp-sm); color: var(--glass-on-muted); font-size: .95rem; }
.vo-check { display: flex; align-items: flex-start; gap: var(--sp-sm); color: var(--glass-on); font-size: 1rem; line-height: 1.45; cursor: pointer; }
.vo-check input { flex: 0 0 auto; width: 24px; height: 24px; margin-top: 1px; accent-color: var(--brand); }
.vo-check a { color: var(--brand-light); }

/* ── Gombok (≥ 48 px magas koppintási cél) ── */
.vo-controls { display: flex; flex-direction: column; gap: var(--sp-sm); }
.vo-controls button,
.vo-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-sm);
    min-height: 48px;
    padding: 12px 18px;
    border-radius: var(--r-md);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.vo-start { min-height: 56px; font-size: 1.1rem; }
.vo-mute[aria-pressed="true"] { border-color: var(--warning); color: var(--warning); }
.vo-controls button:focus-visible,
.vo-link-button:focus-visible,
.vo-check input:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; }

/* ── Állapot, eredmény, hiba ── */
.vo-status { margin: 0; color: var(--glass-on); font-weight: 600; }
.vo-result,
.vo-error {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-md);
    padding: var(--sp-md) var(--sp-lg);
    border-radius: var(--r-md);
    color: var(--glass-on);
}
.vo-result { background: rgba(46, 125, 50, .18); border-left: 4px solid var(--success); }
.vo-result i { color: #86D98C; font-size: 1.3rem; }
.vo-error { background: rgba(198, 40, 40, .18); border-left: 4px solid var(--danger); }
.vo-error i { color: var(--warning); }

/* ── Átirat (buborékok) ── */
.vo-transcript {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    max-height: 60vh;
    max-height: 60dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    font-size: 1rem;
    line-height: 1.5;
}
.vo-transcript:empty { display: none; }
.vo-line {
    max-width: 90%;
    padding: var(--sp-sm) var(--sp-md);
    border-radius: var(--r-md);
    background: var(--glass-fill);
    border: 1px solid var(--glass-border);
    color: var(--glass-on);
    overflow-wrap: anywhere;
}
.vo-line-user { align-self: flex-end; background: rgba(11, 95, 255, .18); }
.vo-speaker { display: block; margin-bottom: 2px; font-size: .75rem; font-weight: 600; color: var(--glass-on-muted); }

.vo-alt { margin-top: var(--sp-lg); color: var(--glass-on-muted); }
.vo-alt a { color: var(--brand-light); }

/* ─── doc 01 §24 — „Legújabb” gomb + rendelés-összefoglaló (sötét üveg téma) ─── */
.vo-transcript-wrap { position: relative; }
.vo-jump {
    position: absolute;
    left: 50%;
    bottom: var(--sp-sm);
    transform: translateX(-50%);
    min-height: 44px;
    padding: 0 var(--sp-lg);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--brand);
    color: var(--on-brand);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.vo-jump:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; }
.vo-page.has-summary .vo-transcript-wrap { display: none; }
.vo-page.has-summary.show-transcript .vo-transcript-wrap { display: block; }

.vo-summary { display: flex; flex-direction: column; gap: var(--sp-md); }
.vo-summary-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-xs);
    padding: var(--sp-lg) var(--sp-md);
    border-radius: var(--r-md);
    background: rgba(46, 125, 50, .22);
    border: 1px solid rgba(134, 217, 140, .45);
    color: var(--glass-on);
    text-align: center;
}
.vo-summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    font-size: 1.8rem;
}
.vo-summary-title { margin: var(--sp-xs) 0 0; font-size: 1.25rem; font-weight: 800; color: var(--glass-on); }
.vo-summary-code-label { font-size: .8rem; color: var(--glass-on-muted); }
.vo-summary-code {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-sm);
    min-height: 44px;
    max-width: 100%;
    padding: 0 var(--sp-md);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-md);
    background: var(--glass-fill);
    color: var(--glass-on);
    font: 700 1rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow-wrap: anywhere;
    cursor: pointer;
}
.vo-summary-code:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; }
.vo-summary-copied { font-size: .85rem; color: #86D98C; }
.vo-summary-rows { margin: 0; }
.vo-summary .vo-summary-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: var(--sp-sm);
    padding: var(--sp-sm) 2px;
    border-top: 1px solid var(--glass-border);
}
.vo-summary .vo-summary-row:first-child { border-top: 0; }
.vo-summary .vo-summary-row i { grid-row: span 2; color: var(--glass-on-muted); font-size: 1.15rem; line-height: 1.3; }
.vo-summary .vo-summary-row dt { font-size: .8rem; font-weight: 600; color: var(--glass-on-muted); }
.vo-summary .vo-summary-row dd { margin: 0; font-size: 1rem; color: var(--glass-on); overflow-wrap: anywhere; }
.vo-summary-note {
    margin: 0;
    padding: var(--sp-sm) var(--sp-md);
    border-radius: var(--r-md);
    background: var(--glass-fill);
    color: var(--glass-on-muted);
    font-size: .9rem;
}
.vo-summary-actions { display: flex; flex-direction: column; gap: var(--sp-sm); }

@media (min-width: 640px) {
    .vo-card { padding: var(--sp-xxl); }
    .vo-controls { flex-direction: row; flex-wrap: wrap; }
}

/* ─── doc 01 §26 — rendelés-ELŐNÉZET a mentés előtt: kék fej (még nem kész), két gomb ─── */
.vo-preview-head { background: rgba(11, 95, 255, .18); border-color: rgba(120, 170, 255, .45); }
.vo-preview-badge { background: var(--brand-light); }
.vo-preview-sub { font-size: .85rem; color: var(--glass-on-muted); }
.vo-preview-actions button:disabled { opacity: .5; cursor: not-allowed; }

/* ─── doc 01 §28 K3 — homokóra keresés közben ─── */
.vo-working { display: flex; align-items: center; gap: var(--sp-sm); margin: var(--sp-sm) 0 0; color: var(--brand-light); font-weight: 600; }
.vo-working[hidden] { display: none; }
.vo-working .bi { display: inline-block; font-size: 1.25rem; animation: vo-hourglass 1.6s ease-in-out infinite; }
@keyframes vo-hourglass { 0%, 40% { transform: rotate(0deg); } 60%, 100% { transform: rotate(180deg); } }
@media (prefers-reduced-motion: reduce) { .vo-working .bi { animation: none; } }

/* ─── docs 01 §31 U2 — telefonon az előnézet gombjai a képernyő alján ragadnak, amíg az előnézet látszik ─── */
.vo-preview .vo-preview-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: var(--sp-sm) 0 calc(var(--sp-sm) + env(safe-area-inset-bottom));
    background: rgba(11, 28, 47, .94);
    box-shadow: 0 -8px 16px rgba(0, 0, 0, .25);
}
@media (max-width: 639px) {
    .vo-preview .vo-summary-head { padding: var(--sp-sm); }
    .vo-preview .vo-summary-badge { display: none; }
    .vo-preview .vo-summary-row { padding-top: 6px; padding-bottom: 6px; }
}

/* ─── doc 01 §32 — „Megrendelem” a lezárult beszélgetés után: villogó fő gomb ─── */
.vo-preview.is-late-order { border-color: rgba(120, 170, 255, .85); }
.vo-preview.is-late-order #voPreviewConfirm {
    font-weight: 700;
    animation: vo-late-pulse 1.4s ease-in-out infinite;
}
.vo-preview.is-late-order #voPreviewConfirm:disabled { animation: none; }
@keyframes vo-late-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(11, 95, 255, .55); transform: scale(1); }
    50% { box-shadow: 0 0 0 10px rgba(11, 95, 255, 0); transform: scale(1.03); }
}
/* Mozgás-érzékenyeknek: nincs villogás, csak vastag, jól látható keret. */
@media (prefers-reduced-motion: reduce) {
    .vo-preview.is-late-order #voPreviewConfirm { animation: none; outline: 3px solid var(--brand-light); outline-offset: 2px; }
}

/* ─── doc 01 §40 D — helyben szerkeszthető előnézet- és összefoglaló-sorok (§40 D, D3) (a teljes lapon) ─── */
.vo-summary .vo-summary-row.is-editable { cursor: pointer; border-radius: var(--r-md); }
.vo-summary .vo-summary-row.is-editable:hover,
.vo-summary .vo-summary-row.is-editable:focus-visible { background: var(--glass-fill); outline: none; }
.vo-summary .vo-summary-row.is-editable:focus-visible { box-shadow: 0 0 0 3px var(--brand-light); }
.vo-summary .vo-row-edit-hint { margin-left: var(--sp-sm); color: var(--brand-light); font-weight: 700; white-space: nowrap; }
.vo-summary .vo-summary-row.is-editing { cursor: default; background: var(--glass-fill); }
.vo-summary .vo-summary-row.is-editing .vo-row-edit-hint { display: none; }
.vo-preview.is-late-order .vo-row-edit-hint { display: none; }
.vo-preview.is-editing .vo-preview-actions,
.vo-summary.is-editing .vo-summary-actions { display: none; }
.vo-summary .vo-row-editor { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.vo-summary .vo-row-editor-label { font-size: .85rem; font-weight: 600; color: var(--glass-on-muted); }
.vo-summary .vo-row-editor-input {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--glass-border);
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, .95);
    color: #0b1c2f;
    font-size: 16px; /* 16 px alatt az iOS ránagyítana a mezőre */
}
.vo-summary .vo-row-editor-input:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 1px; }
.vo-summary .vo-row-editor-error { margin: 0; color: #ffb4a8; font-size: .9rem; font-weight: 600; }
.vo-summary .vo-row-editor-actions { display: flex; gap: var(--sp-sm); margin-top: 4px; }
.vo-summary .vo-row-editor-actions button {
    flex: 1 1 0;
    min-height: 44px;
    border-radius: var(--r-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}
.vo-summary .vo-row-editor-save { border: 0; background: var(--brand-light); color: #0b1c2f; }
.vo-summary .vo-row-editor-cancel { border: 1px solid var(--glass-border); background: transparent; color: var(--glass-on); }
.vo-summary .vo-row-editor-actions button:disabled { opacity: .6; cursor: wait; }

/* ─── doc 01 §42 — tömör összefoglaló-sorok + megjegyzett hozzájárulás (a lebegő ablakkal azonos szerkezet) ─── */
.vo-consent-card { padding: var(--sp-md, 12px); border: 2px solid var(--brand-light); border-radius: var(--r-md); }
.vo-consent-chip {
    display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 12px;
    border-radius: 999px; background: rgba(34, 197, 94, .18); color: var(--glass-on); font-size: .9rem; font-weight: 600;
}
.vo-consent-chip[hidden] { display: none; }
.vo-consent-chip .bi { color: #22c55e; }
.vo-consent-details {
    min-height: 32px; padding: 0 4px; border: 0; background: none; color: inherit; font: inherit;
    text-decoration: underline; cursor: pointer;
}
.vo-consent-details:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; }
#voiceOrder.consent-remembered .vo-consent,
#voiceOrder.is-talking .vo-consent,
#voiceOrder.is-talking #voStart { display: none; }
/* Sor: ikon · érték · ceruza; a címke csak a képernyőolvasónak szól. */
.vo-summary .vo-summary-row {
    grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; position: relative;
}
.vo-summary .vo-summary-row i { grid-row: auto; }
.vo-summary .vo-summary-row dt {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.vo-summary .vo-row-edit-hint { margin: 0; }
.vo-summary .vo-summary-row.is-editing dd { grid-column: 2 / 4; }
/* A ceruza a kiemelő színt kapja (a sor-ikonok szürkék). */
.vo-summary .vo-row-edit-hint i { color: var(--brand-light); }
/* Kész összefoglaló / előnézet alatt nem kell az indítás és a hozzájárulás (a „Bezárás” után visszajönnek). */
#voiceOrder.has-summary .vo-consent,
#voiceOrder.has-summary #voStart { display: none; }

