/* ==========================================================================
   TURVAKÕNE - IPHONE LIGHT THEME (DEFAULT) & DARK THEME SYSTEM
   ========================================================================== */

:root {
  /* iPhone Light Theme Palette (Default) */
  --bg-deep: #f1f5f9;
  --bg-gradient: radial-gradient(circle at 50% 8%, #ffffff 0%, #f1f5f9 65%, #e2e8f0 100%);
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #ffffff;
  --surface-light: #f8fafc;
  --surface-hover: #e2e8f0;
  --border: rgba(0, 0, 0, 0.08);
  --border-focus: #007aff;
  
  --primary: #007aff;
  --primary-hover: #0062cc;
  --primary-glow: rgba(0, 122, 255, 0.22);
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.3);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.35);
  --warning: #f59e0b;
  
  --text: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  --phone-bg: #ffffff;
  --phone-border: #e2e8f0;
  --phone-shadow: 0 24px 65px rgba(0, 0, 0, 0.09), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --notch-bg: #e2e8f0;
  --notch-border: #cbd5e1;
  --notch-cam: #94a3b8;

  --dialer-bg: #f1f5f9;
  --dialer-border: #e2e8f0;
  --dialer-text: #0f172a;
  --dialer-hover: #e2e8f0;

  --bubble-caller-bg: #f1f5f9;
  --bubble-caller-border: #e2e8f0;
  --bubble-caller-text: #0f172a;

  --bubble-user-bg: linear-gradient(135deg, #007aff, #0056b3);
  --bubble-user-text: #ffffff;

  --subtitle-bg: rgba(255, 255, 255, 0.94);
  --subtitle-border: rgba(0, 0, 0, 0.08);
  --subtitle-text: #0f172a;
  --subtitle-sender: #0284c7;

  --avatar-bg: linear-gradient(135deg, #ffffff, #f1f5f9);
  --avatar-border: #cbd5e1;

  --modal-header-bg: #f8fafc;
  --modal-footer-bg: #f8fafc;

  --caller-accent: #f59e0b;
  --caller-glow: rgba(245, 158, 11, 0.2);
  --phone-width: 410px;
}

/* Optional Dark Theme Override */
[data-theme="dark"] {
  --bg-deep: #070a12;
  --bg-gradient: radial-gradient(circle at 50% 20%, rgba(30, 41, 67, 0.5) 0%, #070a12 80%);
  --surface: rgba(17, 24, 39, 0.85);
  --surface-solid: #111827;
  --surface-light: rgba(31, 41, 55, 0.7);
  --surface-hover: #374151;
  --border: rgba(255, 255, 255, 0.1);
  --border-focus: #3b82f6;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.4);

  --text: #f9fafb;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;

  --phone-bg: #090d16;
  --phone-border: rgba(255, 255, 255, 0.12);
  --phone-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 35px var(--caller-glow);
  --notch-bg: #030712;
  --notch-border: rgba(255, 255, 255, 0.06);
  --notch-cam: #1e293b;

  --dialer-bg: rgba(255, 255, 255, 0.08);
  --dialer-border: rgba(255, 255, 255, 0.12);
  --dialer-text: #ffffff;
  --dialer-hover: rgba(255, 255, 255, 0.18);

  --bubble-caller-bg: #1e293b;
  --bubble-caller-border: rgba(255, 255, 255, 0.08);
  --bubble-caller-text: #f1f5f9;

  --bubble-user-bg: linear-gradient(135deg, #2563eb, #1d4ed8);
  --bubble-user-text: #ffffff;

  --subtitle-bg: rgba(17, 24, 39, 0.75);
  --subtitle-border: rgba(255, 255, 255, 0.1);
  --subtitle-text: #f1f5f9;
  --subtitle-sender: #93c5fd;

  --avatar-bg: linear-gradient(135deg, #1e293b, #0f172a);
  --avatar-border: rgba(255, 255, 255, 0.18);

  --modal-header-bg: #1e293b;
  --modal-footer-bg: #1e293b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  background-color: var(--bg-deep);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   APP HEADER
   ========================================================================== */
.app-header {
  height: 60px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}

.brand-svg {
  width: 22px;
  height: 22px;
  fill: var(--primary);
  flex-shrink: 0;
}

.brand-title {
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: var(--text);
}

/* Mode Switcher Tabs (iOS Segmented Control) */
.mode-tabs {
  display: inline-flex;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 3px;
  gap: 2px;
}

.tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  touch-action: manipulation;
}

.tab-btn .tab-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

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

.tab-btn.active {
  background: var(--surface-solid);
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .tab-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Scenario Selector */
.scenario-selector-wrap select {
  background: var(--surface-light);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  max-width: 190px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-selector-wrap select:hover,
.scenario-selector-wrap select:focus {
  border-color: var(--primary);
  background: var(--surface-solid);
}

/* Status Pill & Popover */
.status-pill-container {
  position: relative;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  padding: 6px 11px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.status-pill:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.status-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.status-indicator-dot.connecting {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

.status-indicator-dot.error {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

.chevron-icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
  opacity: 0.6;
}

/* Status Popover */
.status-popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 290px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15);
  z-index: 210;
  padding: 12px;
  flex-direction: column;
  gap: 10px;
  animation: popoverFade 0.2s ease-out;
}

[data-theme="dark"] .status-popover {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
}

.status-popover.open {
  display: flex;
}

@keyframes popoverFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.popover-header h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
}

.btn-popover-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px;
}

.service-status-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.popover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-light);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}

.dot.connected, .dot.ok {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.dot.connecting {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

.dot.error, .dot.err {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

.item-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.item-name {
  font-size: 0.72rem;
  color: var(--text);
  font-weight: 600;
}

.item-status {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.popover-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.btn-xs {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-xs:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Icon Buttons (Theme toggle, Settings) */
.btn-icon {
  background: var(--surface-light);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-icon:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  color: var(--primary);
}

/* Theme Toggle Icons */
.theme-sun-icon { display: none; }
.theme-moon-icon { display: block; }

[data-theme="dark"] .theme-sun-icon { display: block; }
[data-theme="dark"] .theme-moon-icon { display: none; }

/* ==========================================================================
   MAIN VIEW AREA
   ========================================================================== */
.app-main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   CALL VIEW LAYOUT (VOICE CALL SIMULATOR)
   ========================================================================== */
.call-layout {
  display: grid;
  grid-template-columns: minmax(360px, var(--phone-width)) 1fr;
  gap: 24px;
  flex: 1;
  align-items: stretch;
  min-height: calc(100dvh - 100px);
}

/* ==========================================================================
   SMARTPHONE CHASSIS & SCREEN
   ========================================================================== */
.phone-device {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.phone-body {
  width: 100%;
  max-width: var(--phone-width);
  height: 100%;
  min-height: 640px;
  max-height: 840px;
  background: var(--phone-bg);
  border: 2px solid var(--phone-border);
  border-radius: 40px;
  box-shadow: var(--phone-shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.4s ease, background 0.3s ease, border-color 0.3s ease;
}

/* Hardware Status Bar (Clock, Notch, Indicators) */
.phone-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 4px 20px;
  font-size: 0.75rem;
  color: var(--text);
  user-select: none;
  z-index: 10;
}

.phone-clock {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.phone-speaker-notch {
  width: 80px;
  height: 14px;
  background: var(--notch-bg);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  border: 1px solid var(--notch-border);
}

.notch-camera {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--notch-cam);
}

.phone-indicators {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
}

.indicator-icon {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.indicator-svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* Caller Header Section */
.phone-caller-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px 4px 16px;
  text-align: center;
  z-index: 5;
}

.caller-org-pill {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  color: var(--caller-accent);
  background: var(--caller-glow);
  border: 1px solid var(--caller-accent);
  margin-bottom: 6px;
  transition: all 0.3s ease;
}

.caller-name {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.caller-number {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.call-timer-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.call-timer {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.call-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
}

/* Call Security Warning Banner */
.call-security-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 90%;
  max-width: 340px;
  margin-top: 10px;
  padding: 8px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.08);
  transition: all 0.3s ease;
}

[data-theme="dark"] .call-security-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.warning-icon-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.warning-shield-svg {
  width: 17px;
  height: 17px;
  fill: #d97706;
}

[data-theme="dark"] .warning-shield-svg {
  fill: #fbbf24;
}

.warning-content {
  flex: 1;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #92400e;
}

[data-theme="dark"] .warning-content {
  color: #fde68a;
}

.warning-title {
  font-weight: 700;
  margin-right: 4px;
}

.warning-text {
  font-weight: 500;
  transition: opacity 0.25s ease;
}

.warning-text.fade-out {
  opacity: 0;
}

/* Center Visual & Live Subtitles */
.phone-visual-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  gap: 12px;
  position: relative;
  z-index: 5;
}

/* Pulsing Avatar */
.avatar-ring-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
}

.pulse-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}

.pulse-ring.ring-1 {
  width: 110px;
  height: 110px;
  border: 2px solid var(--caller-accent);
}

.pulse-ring.ring-2 {
  width: 135px;
  height: 135px;
  border: 1px solid var(--caller-accent);
}

.pulse-ring.active {
  animation: pulseCallAnim 2s infinite cubic-bezier(0.1, 0.8, 0.3, 1);
}

.pulse-ring.ring-2.active {
  animation-delay: 0.4s;
}

@keyframes pulseCallAnim {
  0% { transform: scale(0.85); opacity: 0.7; }
  60% { opacity: 0.2; }
  100% { transform: scale(1.65); opacity: 0; }
}

.caller-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--avatar-bg);
  border: 2.5px solid var(--avatar-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  z-index: 2;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-theme="dark"] .caller-avatar {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.avatar-svg {
  width: 44px;
  height: 44px;
  fill: var(--caller-accent);
  transition: transform 0.3s ease, fill 0.3s ease;
}

.caller-avatar.speaking {
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 0 25px var(--primary-glow);
}

.caller-avatar.recording {
  border-color: #ef4444;
  transform: scale(1.05);
  box-shadow: 0 0 25px var(--danger-glow);
}

/* Dynamic Live Subtitles Bubble */
.live-subtitle-bubble {
  width: 100%;
  max-width: 320px;
  background: var(--subtitle-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--subtitle-border);
  border-radius: 16px;
  padding: 10px 14px;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

[data-theme="dark"] .live-subtitle-bubble {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.live-subtitle-bubble.pulse-fresh {
  animation: subtitlePulse 0.4s ease-out;
}

@keyframes subtitlePulse {
  0% { transform: translateY(4px); opacity: 0.7; }
  100% { transform: translateY(0); opacity: 1; }
}

.subtitle-sender {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--subtitle-sender);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.subtitle-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.subtitle-text {
  font-size: 0.83rem;
  line-height: 1.45;
  color: var(--subtitle-text);
  max-height: 84px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  word-break: break-word;
}

.subtitle-text::-webkit-scrollbar {
  display: none;
}

/* Sound Waveform Visualizer */
.visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.5px;
  height: 24px;
  padding: 0 10px;
}

.wave-bar {
  width: 3.5px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  transition: height 0.1s ease, background 0.2s ease;
}

.wave-bar.active {
  animation: waveBarBounce 0.75s infinite ease-in-out alternate;
}

@keyframes waveBarBounce {
  0% { height: 4px; background: #007aff; }
  50% { height: 22px; background: #38bdf8; }
  100% { height: 8px; background: #60a5fa; }
}

/* Pipeline Status Pill */
.pipeline-pill {
  padding: 3px 12px;
  background: var(--surface-light);
  border-radius: 9999px;
  border: 1px solid var(--border);
}

.pipeline-status-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Threat Radar Badges (Social Engineering Detection) */
.threat-radar-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 320px;
  margin: 6px auto 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.threat-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  animation: threat-pop 0.35s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

[data-theme="dark"] .threat-badge {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.threat-badge.urgency {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

[data-theme="dark"] .threat-badge.urgency {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.threat-badge.authority {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

[data-theme="dark"] .threat-badge.authority {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.threat-badge.credentials {
  background: #fdf2f8;
  border-color: #fbcfe8;
  color: #9d174d;
}

[data-theme="dark"] .threat-badge.credentials {
  background: rgba(236, 72, 153, 0.15);
  border-color: rgba(236, 72, 153, 0.4);
  color: #f472b6;
}

@keyframes threat-pop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.threat-badge-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.threat-badge-text {
  flex: 1;
  text-align: left;
  line-height: 1.25;
}

/* ==========================================================================
   PHONE CONTROLS SECTION
   ========================================================================== */
.phone-controls-section {
  padding: 10px 20px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
}

/* 1. Incoming Call Action Buttons */
.incoming-controls {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
}

.call-action-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.call-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  touch-action: manipulation;
}

[data-theme="dark"] .call-btn {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.call-btn:hover {
  transform: scale(1.08);
}

.call-btn:active {
  transform: scale(0.95);
}

.call-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.btn-answer {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.answer-ripple {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #10b981;
  animation: answerRipple 1.8s infinite ease-out;
  pointer-events: none;
}

@keyframes answerRipple {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

.btn-decline {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}

.action-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* 2. Active Call In-Call Controls */
.active-controls {
  display: none;
  flex-direction: column;
  width: 100%;
  gap: 12px;
}

/* 3x2 Dialer Grid (iOS Light Theme Style) */
.dialer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 8px;
  width: 100%;
}

.dialer-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.dialer-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--dialer-bg);
  border: 1px solid var(--dialer-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dialer-text);
  cursor: pointer;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.dialer-btn:hover {
  background: var(--dialer-hover);
  transform: translateY(-2px);
}

.dialer-btn:active {
  transform: scale(0.94);
}

.dialer-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 16px var(--primary-glow);
}

.dialer-btn.ptt-btn {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #007aff;
}

[data-theme="dark"] .dialer-btn.ptt-btn {
  background: rgba(37, 99, 235, 0.25);
  border-color: rgba(96, 165, 250, 0.4);
  color: #ffffff;
}

.dialer-btn.ptt-btn.recording {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border-color: #f87171;
  color: #ffffff;
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.7);
  animation: pttGlow 0.9s infinite alternate;
}

@keyframes pttGlow {
  0% { transform: scale(1); box-shadow: 0 0 12px rgba(239, 68, 68, 0.4); }
  100% { transform: scale(1.08); box-shadow: 0 0 24px rgba(239, 68, 68, 0.8); }
}

.btn-glyph {
  font-size: 1.25rem;
  line-height: 1;
}

.dialer-svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.dialer-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  max-width: 65px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* In-Phone Quick Suggestions */
.phone-suggestions-wrapper {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  background: var(--surface-light);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.phone-suggestions-wrapper.open {
  display: flex;
}

.suggestions-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--primary);
  font-weight: 700;
}

.phone-suggestions {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: thin;
}

/* In-Phone Quick Text Input */
.phone-text-bar {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 4px 6px 4px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.phone-text-bar.open {
  display: flex;
}

.phone-text-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.82rem;
}

.btn-send-round {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-send-round svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  margin-left: 2px;
}

/* Hangup Row */
.hangup-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.btn-hangup {
  width: 62px;
  height: 62px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.hangup-label {
  color: #ef4444;
  font-weight: 700;
}

/* ==========================================================================
   COMPANION PANEL (DESKTOP LIVE TRANSCRIPT & MOBILE BOTTOM SHEET)
   ========================================================================== */
.companion-panel {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .companion-panel {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.companion-header {
  padding: 12px 18px;
  background: var(--surface-light);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-info h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
}

.panel-svg {
  width: 18px;
  height: 18px;
  fill: var(--primary);
  flex-shrink: 0;
}

.btn-close-sheet {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
}

.coaching-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  font-size: 0.75rem;
  color: #92400e;
}

[data-theme="dark"] .coaching-hint {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.15);
  color: #fde68a;
}

.hint-svg {
  width: 16px;
  height: 16px;
  fill: #f59e0b;
  flex-shrink: 0;
}

.hint-svg-sm {
  width: 14px;
  height: 14px;
  fill: #f59e0b;
  flex-shrink: 0;
}

.coaching-hint strong {
  color: #b45309;
}

[data-theme="dark"] .coaching-hint strong {
  color: #fbbf24;
}

/* Transcript Scroll Area */
.transcript-area {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.transcript-area::-webkit-scrollbar {
  width: 5px;
}

.transcript-area::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}

[data-theme="dark"] .transcript-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
}

.transcript-area::-webkit-scrollbar-track {
  background: transparent;
}

.empty-transcript-state {
  margin: auto;
  text-align: center;
  color: var(--text-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
}

.empty-svg {
  width: 44px;
  height: 44px;
  fill: var(--text-subtle);
  opacity: 0.5;
}

.modal-svg {
  width: 20px;
  height: 20px;
  fill: var(--primary);
  flex-shrink: 0;
}

.empty-transcript-state p {
  font-size: 0.85rem;
}

/* Chat Bubbles (iOS iMessage Style) */
.msg-row {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  animation: bubblePop 0.25s ease-out;
}

@keyframes bubblePop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-row.caller {
  align-self: flex-start;
}

.msg-row.user {
  align-self: flex-end;
}

.msg-meta {
  font-size: 0.68rem;
  color: var(--text-subtle);
  margin-bottom: 3px;
  padding: 0 4px;
  font-weight: 500;
}

.msg-row.user .msg-meta {
  text-align: right;
}

.msg-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
}

.msg-row.caller .msg-bubble {
  background: var(--bubble-caller-bg);
  color: var(--bubble-caller-text);
  border: 1px solid var(--bubble-caller-border);
  border-top-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.msg-row.user .msg-bubble {
  background: var(--bubble-user-bg);
  color: var(--bubble-user-text);
  border-top-right-radius: 4px;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Suggestions Bars */
.companion-suggestions-box {
  background: var(--surface-light);
  border-top: 1px solid var(--border);
  padding: 8px 12px;
}

.suggestions-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 6px;
}

.suggestions-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.suggestions-bar::-webkit-scrollbar {
  height: 4px;
}

.suggestions-bar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}

[data-theme="dark"] .suggestions-bar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

.suggestions-bar::-webkit-scrollbar-track {
  background: transparent;
}

.pill {
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 9999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  touch-action: manipulation;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.pill:hover {
  background: #eff6ff;
  border-color: var(--primary);
}

[data-theme="dark"] .pill:hover {
  background: rgba(37, 99, 235, 0.3);
  border-color: #3b82f6;
  color: #ffffff;
}

.pill:active {
  transform: scale(0.96);
}

/* Bottom Input Bar */
.input-bar {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--surface-light);
  border-top: 1px solid var(--border);
}

.input-bar input {
  flex: 1;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.85rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #cbd5e1;
}

[data-theme="dark"] .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Drawer Backdrop on mobile */
.drawer-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 140;
}

.drawer-backdrop.active {
  display: block;
}

/* ==========================================================================
   CHAT VIEW (TEXT MESSENGER MODE)
   ========================================================================== */
.chat-layout {
  display: none;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  flex: 1;
}

.scenario-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.banner-content h3 {
  font-size: 1rem;
  color: var(--primary);
}

.banner-content p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.prompt-panel {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  flex-direction: column;
  gap: 10px;
}

.prompt-panel.open {
  display: flex;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 70px;
}

.form-help {
  font-size: 0.7rem;
  color: var(--text-subtle);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.chat-transcript-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 400px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

[data-theme="dark"] .modal-overlay {
  background: rgba(0, 0, 0, 0.8);
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 18px;
  max-width: 580px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
  animation: modalIn 0.25s ease-out;
}

[data-theme="dark"] .modal-box {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 14px 18px;
  background: var(--modal-header-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title-wrap h3 {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 700;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
}

.btn-close-modal:hover {
  color: var(--text);
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-footer {
  padding: 12px 18px;
  background: var(--modal-footer-bg);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   MOBILE & RESPONSIVE BREAKPOINTS (KISS & ADAPTIVE)
   ========================================================================== */
@media (max-width: 960px) {
  .app-main {
    padding: 8px;
  }

  .call-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    height: calc(100dvh - 76px);
    position: relative;
  }

  .phone-device {
    height: 100%;
  }

  .phone-body {
    max-width: 100%;
    min-height: auto;
    height: 100%;
    border-radius: 28px;
    border-width: 1.5px;
  }

  /* Companion panel acts as slide-up drawer on mobile */
  .companion-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75vh;
    max-height: 80vh;
    z-index: 150;
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    transform: translateY(105%);
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
  }

  [data-theme="dark"] .companion-panel {
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
  }

  .companion-panel.drawer-open {
    transform: translateY(0);
  }

  .btn-close-sheet {
    display: block;
  }
}

@media (max-width: 640px) {
  .app-header {
    height: 52px;
    padding: 0 10px;
  }

  .brand-tag {
    display: none;
  }

  .scenario-selector-wrap select {
    max-width: 130px;
    font-size: 0.72rem;
    padding: 5px 8px;
  }

  .status-pill span:not(.status-indicator-dot) {
    display: none;
  }

  .status-pill {
    padding: 6px;
  }

  .tab-btn {
    padding: 5px 9px;
    font-size: 0.75rem;
  }

  .phone-body {
    border-radius: 20px;
  }

  .caller-name {
    font-size: 1.25rem;
  }

  .caller-avatar {
    width: 74px;
    height: 74px;
    font-size: 2.1rem;
  }

  .pulse-ring.ring-1 {
    width: 95px;
    height: 95px;
  }

  .pulse-ring.ring-2 {
    width: 115px;
    height: 115px;
  }

  .dialer-btn {
    width: 48px;
    height: 48px;
  }

  .call-btn {
    width: 58px;
    height: 58px;
  }

  .btn-hangup {
    width: 58px;
    height: 58px;
  }
}

/* ==========================================================================
   DYNAMIC ON-SCREEN KEYBOARD ADAPTIVE LAYOUT
   ========================================================================== */
body.keyboard-open {
  overflow: hidden !important;
}

body.keyboard-open .app-header {
  height: 44px;
  padding: 0 10px;
}

body.keyboard-open .brand-tag,
body.keyboard-open .scenario-selector-wrap {
  display: none;
}

body.keyboard-open .app-main {
  padding: 4px;
  height: var(--visual-viewport-height, 100dvh);
  max-height: var(--visual-viewport-height, 100dvh);
  overflow: hidden;
}

body.keyboard-open .call-layout {
  height: 100%;
  min-height: auto;
  gap: 8px;
}

body.keyboard-open .phone-device {
  height: 100%;
}

body.keyboard-open .phone-body {
  height: 100%;
  min-height: auto;
  max-height: 100%;
  border-radius: 16px;
  padding-bottom: 0;
}

/* Compact header inside phone */
body.keyboard-open .phone-status-bar {
  padding: 2px 14px;
  font-size: 0.7rem;
}

body.keyboard-open .phone-caller-section {
  padding: 2px 10px;
}

body.keyboard-open .caller-org-pill {
  display: none;
}

body.keyboard-open .caller-name {
  font-size: 1.05rem;
}

body.keyboard-open .caller-number {
  display: none;
}

body.keyboard-open .call-security-warning {
  display: none !important;
}

body.keyboard-open .call-timer-wrapper {
  margin-top: 1px;
}

body.keyboard-open .call-timer {
  font-size: 0.8rem;
}

body.keyboard-open .call-badge {
  font-size: 0.6rem;
}

/* Hide bulky caller visual rings, waveforms, and radar to maximize typing space */
body.keyboard-open .avatar-ring-container {
  display: none !important;
}

body.keyboard-open .visualizer {
  display: none !important;
}

body.keyboard-open .pipeline-pill {
  display: none !important;
}

body.keyboard-open .threat-radar-container {
  display: none !important;
}

body.keyboard-open .phone-visual-center {
  padding: 2px 10px;
  gap: 4px;
  justify-content: flex-end;
  flex: 1;
}

/* Live subtitles expand comfortably right above the keyboard input */
body.keyboard-open .live-subtitle-bubble {
  max-width: 100%;
  padding: 6px 10px;
  margin-bottom: 2px;
}

body.keyboard-open .subtitle-text {
  max-height: 65px;
  font-size: 0.8rem;
}

/* Hide dialer grid buttons (you don't dial while typing) */
body.keyboard-open .dialer-grid {
  display: none !important;
}

body.keyboard-open .hangup-row {
  display: none !important;
}

body.keyboard-open .phone-controls-section {
  padding: 2px 10px 8px 10px;
  gap: 4px;
}

/* Pin the in-phone text bar cleanly */
body.keyboard-open .phone-text-bar {
  display: flex !important;
  background: var(--surface-solid);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  margin-top: 2px;
}

[data-theme="dark"] body.keyboard-open .phone-text-bar {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
}

body.keyboard-open .phone-suggestions-wrapper.open {
  padding: 2px 6px;
}

/* Dynamic companion drawer adaptation when keyboard is active */
body.keyboard-open .companion-panel.drawer-open {
  height: 100% !important;
  max-height: 100% !important;
  border-radius: 16px 16px 0 0;
}

body.keyboard-open .coaching-hint {
  display: none;
}

body.keyboard-open .companion-suggestions-box {
  padding: 3px 8px;
}

body.keyboard-open .companion-input-bar {
  padding: 6px 10px;
}

/* Chat mode dynamic keyboard adaptation */
body.keyboard-open .chat-layout {
  height: 100%;
  gap: 6px;
}

body.keyboard-open .scenario-banner {
  padding: 6px 12px;
}

body.keyboard-open .banner-content p {
  display: none;
}

body.keyboard-open .chat-transcript-card {
  min-height: auto;
}
