/* Voice Translator scoped styles aligned with myinternet.ge indigo/cyan theme */
.vt-wrap {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.vt-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
}

.vt-mode-tabs {
  display: inline-flex;
  gap: 6px;
  background: var(--surface-alt);
  padding: 4px;
  border-radius: 999px;
}

.vt-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.vt-mode-tab:hover {
  color: var(--text);
}

.vt-mode-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.vt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.vt-card h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vt-fld {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.vt-fld input,
.vt-fld select {
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 46px;
  padding: 8px 12px;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vt-fld input:focus,
.vt-fld select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.16);
}

.vt-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.vt-row > .vt-grow {
  flex: 1 1 160px;
}

.vt-room {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vt-code {
  font: 800 19px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

.vt-btn {
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.vt-btn:hover {
  background: var(--surface-alt);
  border-color: var(--border-strong);
}

.vt-btn:active {
  transform: scale(0.98);
}

.vt-btn.pri {
  background: var(--icon-grad);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.25);
}

.vt-btn.pri:hover {
  filter: brightness(1.06);
}

.vt-btn.ton {
  background: var(--primary-soft);
  border-color: rgba(var(--primary-rgb), 0.22);
  color: var(--primary);
}

.vt-btn.dan {
  color: var(--danger);
  border-color: rgba(185, 28, 28, 0.35);
  background: var(--danger-soft);
}

.vt-btn.dan:hover {
  filter: brightness(0.97);
}

.vt-btn.icon {
  padding: 0;
  width: 44px;
  height: 44px;
}

.vt-ic {
  width: 20px;
  height: 20px;
  flex: none;
}

.vt-micwrap {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 10px 0 4px;
}

.vt-mic {
  width: 98px;
  height: 98px;
  border-radius: 50%;
  border: 0;
  background: var(--icon-grad);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(var(--primary-rgb), 0.32);
  position: relative;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.vt-mic .micic {
  width: 38px;
  height: 38px;
}

.vt-mic:hover {
  transform: translateY(-2px);
}

.vt-mic:active {
  transform: scale(0.96);
}

.vt-mic[data-state="listening"] {
  background: var(--danger);
  box-shadow: 0 10px 28px rgba(185, 28, 28, 0.35);
}

.vt-mic[data-state="listening"]::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid var(--danger);
  animation: vt-pulse 1.4s ease-out infinite;
}

.vt-mic[data-state="processing"] {
  background: var(--surface-alt);
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: none;
}

.vt-mic[data-state="processing"] .micic {
  animation: vt-blink 1s infinite;
}

.vt-mic[data-state="speaking"] {
  background: var(--success);
  box-shadow: 0 10px 28px rgba(4, 120, 87, 0.32);
}

@keyframes vt-pulse {
  from { transform: scale(1); opacity: 0.85; }
  to { transform: scale(1.36); opacity: 0; }
}

@keyframes vt-blink {
  50% { opacity: 0.35; }
}

.vt-miccap {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  min-height: 1.5em;
}

.vt-status {
  font-size: 13.5px;
  color: var(--text-soft);
  text-align: center;
  font-weight: 600;
}

.vt-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.vt-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
}

.vt-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vt-empty {
  text-align: center;
  color: var(--text-soft);
  font-size: 14.5px;
  padding: 16px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  margin: 0;
}

.vt-bub {
  max-width: 100%;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: opacity 0.6s ease;
}

.vt-bub.mine {
  align-self: flex-end;
  background: var(--primary-soft);
  border-color: rgba(var(--primary-rgb), 0.25);
  border-bottom-right-radius: 6px;
}

.vt-bub.theirs {
  align-self: flex-start;
  background: var(--accent-soft);
  border-color: rgba(var(--accent-rgb), 0.25);
  border-bottom-left-radius: 6px;
}

.vt-bub .who {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-soft);
  margin-bottom: 4px;
}

.vt-bub .tx {
  font-size: 21px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--text);
}

.vt-bub .og {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.vt-bub .og:empty {
  display: none;
}

.vt-bub.fade {
  opacity: 0;
}

.vt-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid rgba(180, 83, 9, 0.25);
  font-size: 14.5px;
}

.vt-notice.err {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(185, 28, 28, 0.28);
}

.vt-notice .vt-btn {
  margin-top: 10px;
}

.vt-unlock {
  width: 100%;
  display: none;
}

.vt-toasts {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  z-index: 100;
  display: grid;
  gap: 8px;
  width: min(92vw, 460px);
}

.vt-toast {
  background: var(--dark-pill);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 600;
  animation: vt-tin 0.2s ease-out;
}

html[data-theme="dark"] .vt-toast {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid var(--border);
}

.vt-toast.err {
  background: var(--danger);
  color: #ffffff;
}

.vt-toast.out {
  opacity: 0;
  transition: opacity 0.3s ease;
}

@keyframes vt-tin {
  from { transform: translateY(8px); opacity: 0; }
}

.vt-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.vt-seg button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.vt-seg button.act {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.vt-now {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-weight: 700;
  font-size: 16px;
}

.vt-now.live {
  background: var(--primary-soft);
  border-color: rgba(var(--primary-rgb), 0.3);
  color: var(--primary);
}

.vt-now.live::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  animation: vt-blink 1s infinite;
}

.vt-side {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vt-side.talk {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.18);
}

.vt-side.flip {
  transform: rotate(180deg);
}

.vt-side .hd {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.vt-side .last {
  font-size: 21px;
  line-height: 1.35;
  min-height: 1.4em;
  font-weight: 700;
  color: var(--text);
}

.vt-side .lo {
  font-size: 13.5px;
  color: var(--text-soft);
}

.vt-side .vt-mic {
  width: 82px;
  height: 82px;
}

.vt-side .vt-micwrap {
  padding: 2px 0;
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 540px) {
  .vt-side .hd {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
