/* Unified classic preview. Extends visitor.css Apple glass style. */

.unified-page .page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-width: 720px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem 0;
}

.unified-page .page-tab {
  appearance: none;
  border: 0;
  background: var(--card, rgba(255, 255, 255, 0.72));
  color: var(--ink, #1d1d1f);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 1px 2px rgba(0, 0, 0, 0.06);
}

html[data-theme="dark"] .unified-page .page-tab {
  background: rgba(44, 44, 46, 0.86);
  color: #f5f5f7;
}

.unified-page .page-tab:hover {
  filter: brightness(1.05);
}

.unified-page .page-tab.is-on,
.unified-page .page-tab[aria-selected="true"] {
  background: var(--accent, #0071e3);
  color: #fff;
  box-shadow: none;
}

.unified-page .header-tools {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
}

.speech-mode-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
}

.speech-mode-label {
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--muted, #6e6e73);
  padding-inline: 0.2rem;
}

.speech-mode {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.15rem;
  background: var(--theme-switch-track, #e8e8ed);
  gap: 0.1rem;
}

html[data-theme="dark"] .speech-mode {
  background: var(--theme-switch-track, #2c2c2e);
}

.speech-mode-opt {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--theme-switch-idle-ink, #3a3a3c);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.2;
  cursor: pointer;
  min-height: 1.9rem;
}

.speech-mode-opt.is-active,
.speech-mode-opt[aria-checked="true"] {
  background: var(--theme-switch-active-bg, #fff);
  color: var(--theme-switch-active-ink, #1d1d1f);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  font-weight: 600;
}

html[data-theme="dark"] .speech-mode-opt.is-active,
html[data-theme="dark"] .speech-mode-opt[aria-checked="true"] {
  background: var(--theme-switch-active-bg, #4a4a4e);
  color: var(--theme-switch-active-ink, #f5f5f7);
}

.speech-mode-opt:hover:not([aria-checked="true"]) {
  background: var(--theme-switch-idle-hover, #e0e0e5);
}

.speech-mode-opt:focus-visible,
.theme-switch-opt:focus-visible,
.page-tab:focus-visible {
  outline: 2px solid var(--accent, #0071e3);
  outline-offset: 2px;
}

.mode-note {
  margin-top: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  background: rgba(0, 113, 227, 0.08);
  color: inherit;
}

.mode-note-warn {
  background: rgba(255, 159, 10, 0.16);
}

.captions-card {
  margin-top: 1.25rem;
}

.captions-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.captions-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.toggle-row input[type="checkbox"] {
  appearance: none;
  width: 2.6rem;
  height: 1.55rem;
  border-radius: 999px;
  background: #d1d1d6;
  position: relative;
  cursor: pointer;
  flex: none;
}

.toggle-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 0.15rem;
  inset-inline-start: 0.15rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease;
}

.toggle-row input[type="checkbox"]:checked {
  background: #34c759;
}

.toggle-row input[type="checkbox"]:checked::after {
  transform: translateX(1.05rem);
}

html[dir="rtl"] .toggle-row input[type="checkbox"]:checked::after {
  transform: translateX(-1.05rem);
}

.captions-panel {
  margin-top: 0.9rem;
  border-radius: 18px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  min-height: 8rem;
  max-height: 18rem;
  overflow: auto;
}

html[data-theme="dark"] .captions-panel {
  background: rgba(28, 28, 30, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.captions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.caption-item time {
  display: block;
  font-size: 0.72rem;
  color: var(--muted, #6e6e73);
}

.caption-item .caption-original {
  font-size: 0.82rem;
  color: var(--muted, #6e6e73);
  margin: 0.15rem 0;
}

.caption-item .caption-translation {
  font-size: 1.15rem;
  margin: 0;
  font-weight: 600;
}

.caption-empty {
  color: var(--muted, #6e6e73);
}

.unified-page #panel-classic,
.unified-page #panel-dashboard,
.unified-page #panel-history,
.unified-page #panel-board {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.unified-page #panel-dashboard,
.unified-page #panel-history {
  max-width: 900px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .speech-mode-opt {
    font-size: 0.75rem;
    padding: 0.35rem 0.55rem;
  }
  .unified-page .header-tools {
    width: 100%;
  }
}


.unified-page .app-picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.unified-page .app-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.unified-page .app-col .app-pick {
  width: 100%;
}

.peer-line {
  margin: 0;
  min-height: 1.2em;
}

.btn-disconnect {
  align-self: stretch;
}

.logout-result {
  margin: 0;
}

.sv-modal[hidden] {
  display: none !important;
}

.sv-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.sv-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.sv-modal-card {
  position: relative;
  z-index: 1;
  width: min(26rem, 100%);
  border-radius: 22px;
  padding: 1.25rem 1.3rem 1.1rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  color: var(--ink, #1d1d1f);
}

html[data-theme="dark"] .sv-modal-card {
  background: rgba(28, 28, 30, 0.92);
  color: #f5f5f7;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sv-modal-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.sv-modal-card p {
  margin: 0 0 1rem;
  line-height: 1.45;
}

.history-peers {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.history-peers li {
  font-size: 0.92rem;
  margin: 0.15rem 0;
}

@media (max-width: 640px) {
  .unified-page .app-picks {
    grid-template-columns: 1fr;
  }
}


/* Last session, Meet card, translate langs, connect-new — preview only. */

.translate-langs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 1rem;
}

.translate-langs[hidden] {
  display: none !important;
}

.translate-lang {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted, #6e6e73);
}

.translate-lang select {
  min-width: 8.5rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.8);
  color: inherit;
  padding: 0.35rem 0.5rem;
  font: inherit;
}

html[data-theme="dark"] .translate-lang select {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(44, 44, 46, 0.9);
  color: #f5f5f7;
}

.last-session-panel {
  margin: 1.1rem 0 1.4rem;
  padding: 1rem 1.1rem 0.95rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

html[data-theme="dark"] .last-session-panel {
  background: rgba(44, 44, 46, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.last-session-panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.last-session-panel .last-session-sub {
  margin: 0.7rem 0 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.last-session-summary {
  margin: 0;
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.4;
}

.last-session-history {
  margin: 0;
  padding-inline-start: 1.2rem;
}

.last-session-history li {
  margin: 0.2rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.unified-page .app-picks {
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.app-col.meet-col {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.app-col.meet-col .meet-qr-stage {
  max-width: 220px;
}

.app-pick-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.scan-label {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
}

.meet-qr-stage img {
  display: block;
  width: 200px;
  height: 200px;
  background: #fff;
  border-radius: 12px;
}

.connect-new-btn[hidden] {
  display: none !important;
}

.caption-row {
  padding: 0.45rem 0.15rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

html[data-theme="dark"] .caption-row {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.caption-row .caption-src {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted, #6e6e73);
}

.caption-row .caption-dst {
  margin: 0.1rem 0 0;
  font-size: 1rem;
}

.caption-row .caption-meta {
  margin: 0.15rem 0 0;
}

.caption-row.caption-out .caption-dst {
  font-weight: 550;
}

@media (max-width: 900px) {
  .unified-page .app-picks {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .unified-page .app-picks {
    grid-template-columns: 1fr;
  }
  .header-tools {
    flex-wrap: wrap;
  }
}


/* Simplified Hebrew-first visitor layout (preview). */
.simple-intro {
  max-width: 760px;
  margin: 1.15rem auto 0;
  padding: 1.15rem 1.4rem 1.2rem;
  border-radius: 22px;
  background: var(--card, rgba(255, 255, 255, 0.72));
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.06));
}

html[data-theme="dark"] .simple-intro {
  background: rgba(44, 44, 46, 0.72);
}

.simple-lede {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.4;
  letter-spacing: -0.025em;
  font-weight: 650;
}

.simple-howto {
  margin: 0.95rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.simple-howto li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.02rem;
  line-height: 1.4;
}

.simple-howto li::before {
  counter-increment: simple-how;
  content: counter(simple-how);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 650;
  background: var(--tile, #f0f0f2);
  color: var(--ink, #1d1d1f);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.06));
}

.simple-howto {
  counter-reset: simple-how;
}

html[data-theme="dark"] .simple-howto li::before {
  background: rgba(72, 72, 74, 0.9);
  color: #f5f5f7;
}

.simple-he .board-card {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0 0 1rem;
  margin-top: 0.85rem;
}

.simple-he .board-step {
  margin-top: 0.85rem;
  padding: 1.15rem 1.3rem 1.25rem;
  border-top: 0;
  border-radius: 22px;
  background: var(--card, rgba(255, 255, 255, 0.72));
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.06));
}

html[data-theme="dark"] .simple-he .board-step {
  background: rgba(44, 44, 46, 0.72);
}

.simple-he .board-step .speech-mode-wrap {
  margin: 0 0 0.85rem;
  max-width: 26rem;
}

.simple-he .board-step .translate-langs {
  margin: 0 0 1rem;
}

.simple-he .board-step-start {
  display: block;
  padding: 1.35rem 1.3rem 1.4rem;
}

.simple-he .step-start-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.simple-he .start-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0 0 0.7rem;
}

.simple-he #startTalkBtn.btn-start {
  flex: 1 1 16rem;
  width: 100%;
  max-width: 100%;
  min-height: 3.7rem;
  padding: 0.95rem 1.5rem;
  font-size: 1.45rem;
  font-weight: 670;
  letter-spacing: -0.03em;
  border-radius: 1.15rem;
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.28);
}

.simple-he #stopTalkBtn,
.simple-he #endBtn {
  min-height: 2.6rem;
}

.simple-he .captions-card {
  margin-top: 0.85rem;
  padding: 1.15rem 1.3rem 1.2rem;
  border-radius: 22px;
  background: var(--card, rgba(255, 255, 255, 0.72));
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.06));
}

html[data-theme="dark"] .simple-he .captions-card {
  background: rgba(44, 44, 46, 0.72);
}

.simple-he .advanced-fold {
  max-width: 760px;
  margin: 1.15rem auto 3rem;
  padding: 0.15rem 1.15rem 0.9rem;
  border-radius: 22px;
  background: var(--card, rgba(255, 255, 255, 0.72));
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.06));
}

html[data-theme="dark"] .simple-he .advanced-fold {
  background: rgba(44, 44, 46, 0.72);
}

.simple-he .advanced-fold > summary {
  cursor: pointer;
  font-weight: 620;
  font-size: 1.05rem;
  letter-spacing: -0.016em;
  padding: 0.95rem 0.15rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.simple-he .advanced-fold > summary::-webkit-details-marker {
  display: none;
}

.simple-he .advanced-fold > summary::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-inline-end: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  flex: none;
  transition: transform 0.15s ease;
}

.simple-he .advanced-fold[open] > summary::after {
  transform: rotate(225deg);
  margin-top: 0.35rem;
}

.simple-he .advanced-fold .page-tabs {
  padding: 0.35rem 0 0.85rem;
  margin: 0;
  max-width: none;
}

.simple-he .advanced-fold .last-session-panel {
  margin: 0.5rem 0 1rem;
}

.simple-he .advanced-fold .mode-note {
  margin-top: 0.35rem;
}

@media (max-width: 640px) {
  .simple-intro {
    margin: 0.75rem 0.75rem 0;
    padding: 1rem 1.05rem 1.05rem;
  }
  .simple-lede {
    font-size: 1.18rem;
  }
  .simple-he .board-card {
    margin-inline: 0.75rem;
  }
  .simple-he .advanced-fold {
    margin-inline: 0.75rem;
  }
  .simple-he #startTalkBtn.btn-start {
    font-size: 1.28rem;
    min-height: 3.4rem;
  }
}
