/* ============================================================================
 * Pikka Talk Malaysia Government Edition (my.pikkaai.com)
 * Clean Pikka Talk Design System (Matches talk.pikkaai.com)
 * ========================================================================== */

:root {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-dock: #f1f5f9;
  --bg-subtle: #f8fafc;
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --pikka-blue: #0284c7;
  --pikka-blue-hover: #0369a1;
  --pikka-royal: #2563eb;
  --emerald: #10b981;
  --amber: #f59e0b;
  --crimson: #ef4444;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --stage-font-size: 26px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ============================================================================
 * 1. TOP HEADER BAR (Matches Pikka Talk Top Header)
 * ========================================================================== */
.top-navbar {
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.brand-emblem {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.top-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.credits-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}

.officer-pill {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-dock);
  cursor: pointer;
}

/* ============================================================================
 * 2. MAIN VIEW SHELL & SUBHEADER (Matches Pikka Talk "Push-To-Talk" Subheader)
 * ========================================================================== */
.view-section {
  display: none;
  min-height: calc(100vh - 114px);
}

.view-section.active {
  display: flex;
  flex-direction: column;
}

#view-translate.active {
  height: calc(100dvh - 114px);
  max-height: calc(100dvh - 114px);
  overflow: hidden;
}

.pikka-subheader {
  min-height: 52px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 6px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.subheader-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.subheader-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.subheader-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Official Pikka Talk Minimal Vector Icon Buttons (Matches talk.pikkaai.com) */
.pikka-svg-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.pikka-icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pikka-icon-btn:hover {
  background: var(--bg-dock);
  color: var(--text-main);
}

.pikka-icon-btn.accent-icon {
  color: var(--pikka-blue);
  background: #f0f9ff;
  border-color: #bae6fd;
}

.pikka-icon-btn.accent-icon:hover {
  background: #e0f2fe;
}

.pikka-icon-btn.with-badge {
  width: auto;
  padding: 0 9px;
  gap: 5px;
}

.icon-count-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--pikka-blue);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.3;
}

.pikka-icon-segmented {
  display: inline-flex;
  align-items: center;
  background: var(--bg-dock);
  padding: 2px;
  border-radius: 9px;
  gap: 2px;
}

.pikka-icon-seg-btn {
  position: relative;
  width: 32px;
  height: 30px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pikka-icon-seg-btn:hover {
  color: var(--text-main);
}

.pikka-icon-seg-btn.active {
  background: var(--bg-surface);
  color: var(--pikka-blue);
  box-shadow: var(--shadow-sm);
}

/* Delayed Hover Hint System: Only appears after resting cursor on a button for 0.55s */
[data-hint] {
  position: relative;
}

[data-hint]::after {
  content: attr(data-hint);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0f172a;
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 4000;
  transition:
    opacity 0.16s ease 0s,
    transform 0.16s ease 0s,
    visibility 0s linear 0.16s;
}

[data-hint]:hover::after,
[data-hint]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0.55s;
}

/* Flip hint above button when inside bottom dock */
.pikka-bottom-dock [data-hint]::after {
  top: auto;
  bottom: calc(100% + 8px);
}

.icon-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-toolbar-btn:hover {
  background: var(--bg-dock);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.icon-toolbar-btn.primary-outline {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0284c7;
}

/* ============================================================================
 * 3. CLEAN 2-COLUMN SIDE-BY-SIDE CANVAS (Matches Pikka Talk Main Workspace)
 * ========================================================================== */
.pikka-canvas-wrapper {
  flex: 1;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.pikka-columns-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #f1f5f9;
}

.pikka-columns-header.single-column-mode {
  grid-template-columns: 1fr;
}

.pikka-col-label {
  padding: 16px 28px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pikka-col-label:first-child {
  border-right: 1px solid var(--border);
}

.pikka-columns-header.single-column-mode .pikka-col-label:first-child {
  border-right: none;
}

.segments-scroll-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.bilingual-segment-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.bilingual-segment-row:hover {
  background: #fafcff;
}

.bilingual-segment-row.single-column-mode {
  grid-template-columns: 1fr;
}

.bilingual-cell {
  padding: 18px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bilingual-cell:first-child {
  border-right: 1px solid var(--border);
}

.bilingual-segment-row.single-column-mode .bilingual-cell:first-child {
  border-right: none;
}

.segment-meta-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.speaker-tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.speaker-tag-chip.spk-1 {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.speaker-tag-chip.spk-2 {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.speaker-tag-chip.spk-3 {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.speaker-tag-chip.spk-4 {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.combined-paragraph-row {
  padding: 16px 28px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.15s ease;
}

.combined-paragraph-row:hover {
  background: #fafcff;
}

.combined-paragraph-row .combined-paragraph-translation {
  color: #0284c7;
  font-weight: 600;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
}

.timestamp-chip {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-muted);
}

.segment-body-text {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-main);
  font-weight: 500;
}

.bilingual-cell.translated-cell .segment-body-text {
  color: var(--pikka-blue);
  font-weight: 600;
}

/* Text Size Presets */
.pikka-canvas-wrapper.text-size-sm .segment-body-text {
  font-size: 14px;
}
.pikka-canvas-wrapper.text-size-md .segment-body-text {
  font-size: 16px;
}
.pikka-canvas-wrapper.text-size-lg .segment-body-text {
  font-size: 19px;
}
.pikka-canvas-wrapper.text-size-xl .segment-body-text {
  font-size: 23px;
}

/* Roll-Up Mode */
.segments-scroll-container.roll-up-mode .bilingual-segment-row {
  border-bottom: none;
}
.segments-scroll-container.roll-up-mode .bilingual-cell {
  padding: 8px 28px;
}

/* Live Speculative / Partial Preview Strip */
.live-preview-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f8fafc;
  border-top: 1px dashed var(--border);
  padding: 10px 28px;
  font-size: 14px;
  color: var(--text-secondary);
  font-style: italic;
}

/* ============================================================================
 * 4. BOTTOM CONTROL DOCK (Matches Pikka Talk Language Pills + Big Blue Mic)
 * ========================================================================== */
.pikka-bottom-dock {
  background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
  border-top: 1px solid var(--border);
  padding: 16px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.pikka-lang-pill-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.pikka-lang-select {
  appearance: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  min-width: 150px;
  text-align: center;
}

.pikka-lang-select.target-lang {
  color: var(--pikka-blue);
  border-color: #bae6fd;
}

.pikka-swap-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pikka-swap-btn:hover {
  background: #f0f9ff;
  color: var(--pikka-blue);
}

.pikka-mic-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.pikka-circle-side-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.pikka-circle-side-btn:hover {
  border-color: var(--pikka-blue);
  color: var(--pikka-blue);
}

.pikka-main-mic-btn {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  border: none;
  background: var(--pikka-blue);
  color: #ffffff;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}

.pikka-main-mic-btn:hover {
  background: var(--pikka-blue-hover);
  transform: scale(1.04);
}

.pikka-main-mic-btn.recording {
  background: var(--crimson);
  box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.2);
}

.pikka-subtle-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-secondary);
  flex-wrap: wrap;
  justify-content: center;
}

.status-chip {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 600;
}

/* ============================================================================
 * 5. BOTTOM TAB NAVIGATION BAR (Matches Pikka Talk 5-Tab Footer)
 * ========================================================================== */
.pikka-bottom-tabbar {
  height: 58px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: sticky;
  bottom: 0;
  z-index: 100;
}

.pikka-tab-item {
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.pikka-tab-item .tab-icon {
  font-size: 17px;
}

.pikka-tab-item.active {
  color: var(--pikka-blue);
  font-weight: 700;
}

/* ============================================================================
 * 6. POPOVERS, DRAWERS & MODALS (Clean White Cards)
 * ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.setting-row {
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.setting-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.setting-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.asr-mode-segmented {
  display: inline-flex;
  background: var(--bg-dock);
  padding: 3px;
  border-radius: 10px;
  gap: 3px;
  flex-wrap: wrap;
}

.asr-mode-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.asr-mode-btn.active {
  background: var(--bg-surface);
  color: var(--pikka-blue);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* ============================================================================
 * 7. DEDICATED FULL PRESENTATION WINDOW (?view=display)
 * ========================================================================== */
body.is-presentation-window {
  padding-bottom: 0 !important;
  background: #0b132b;
}

body.is-presentation-window .top-navbar,
body.is-presentation-window .pikka-bottom-tabbar {
  display: none !important;
}

.stage-display-shell {
  height: 100vh;
  min-height: 540px;
  background: #0b132b;
  color: #f8fafc;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  position: relative;
}

body.stage-light-theme .stage-display-shell {
  background: #f8fafc;
  color: #0f172a;
}

.stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.stage-icon-btn {
  width: 34px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(30, 41, 59, 0.78);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stage-icon-btn:hover {
  background: rgba(51, 65, 85, 0.96);
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.55);
}

.stage-icon-btn.accent {
  background: rgba(2, 132, 199, 0.25);
  border-color: rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
}

.stage-icon-btn.accent:hover {
  background: #0284c7;
  color: #ffffff;
}

.stage-icon-btn.danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

.stage-icon-btn.primary {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
}

.stage-mini-segmented {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.24);
  padding: 2px;
  border-radius: 9px;
  gap: 2px;
}

.stage-mini-seg-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  width: 34px;
  height: 28px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stage-mini-seg-btn:hover {
  color: #f8fafc;
}

.stage-mini-seg-btn.active {
  background: #0284c7;
  color: #ffffff;
  font-weight: 700;
}

.stage-settings-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(260px, calc(100vw - 24px));
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.55);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stage-popover-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.screen-share-empty-dropzone {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: pointer;
}

.screen-share-hero-icon-btn {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  background: rgba(56, 189, 248, 0.12);
  border: 1.5px dashed rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.screen-share-empty-dropzone:hover .screen-share-hero-icon-btn {
  background: rgba(2, 132, 199, 0.28);
  border-style: solid;
  border-color: #38bdf8;
  color: #ffffff;
  transform: scale(1.06);
}

/* Auto-hide toolbar in Fullscreen / Zen Mode — reveal only when hovering near top edge */
:fullscreen .stage-toolbar,
body.is-zen-fullscreen .stage-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 20px;
  background: rgba(11, 19, 43, 0.92);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(-65%);
}

:fullscreen .stage-toolbar:hover,
body.is-zen-fullscreen .stage-toolbar:hover {
  opacity: 1;
  transform: translateY(0);
}

.speaker-presentation-split-grid {
  --split-left-pct: 58%;
  --split-upper-pct: 74%;
  display: grid;
  grid-template-columns: minmax(220px, var(--split-left-pct, 58%)) 14px minmax(240px, 1fr);
  grid-template-rows: 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
}

.speaker-presentation-split-grid.layout-upper-bottom {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(160px, var(--split-upper-pct, 74%)) 12px minmax(120px, 1fr);
}

.presentation-split-resizer {
  width: 14px;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
  position: relative;
  z-index: 10;
}

.speaker-presentation-split-grid.layout-upper-bottom .presentation-split-resizer {
  width: 100%;
  height: 12px;
  cursor: row-resize;
}

.presentation-split-resizer::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  transition: background 0.15s ease, width 0.15s ease, height 0.15s ease;
}

.speaker-presentation-split-grid.layout-upper-bottom .presentation-split-resizer::before {
  top: auto;
  bottom: auto;
  left: 16px;
  right: 16px;
  width: auto;
  height: 3px;
}

.presentation-split-resizer:hover::before,
.presentation-split-resizer.dragging::before {
  background: #38bdf8;
  width: 4px;
}

.speaker-presentation-split-grid.layout-upper-bottom .presentation-split-resizer:hover::before,
.speaker-presentation-split-grid.layout-upper-bottom .presentation-split-resizer.dragging::before {
  width: auto;
  height: 4px;
}

.resizer-grip-pill {
  position: relative;
  z-index: 2;
  width: 12px;
  height: 40px;
  border-radius: 999px;
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: all 0.15s ease;
}

.speaker-presentation-split-grid.layout-upper-bottom .resizer-grip-pill {
  width: 44px;
  height: 12px;
  font-size: 12px;
}

.presentation-split-resizer:hover .resizer-grip-pill,
.presentation-split-resizer.dragging .resizer-grip-pill {
  background: #0284c7;
  border-color: #7dd3fc;
  color: #ffffff;
  transform: scale(1.08);
}

body.is-resizing-split {
  cursor: col-resize !important;
  user-select: none !important;
}

body.is-resizing-split-row {
  cursor: row-resize !important;
  user-select: none !important;
}

body.is-resizing-split video,
body.is-resizing-split-row video {
  pointer-events: none !important;
}

/* Upper-Bottom 4-Row Caption Dock (2 Rows Source + 2 Rows Translation — zero nested card clipping) */
.speaker-presentation-split-grid.layout-upper-bottom .speaker-presentation-feed-list {
  padding: 8px 18px;
  justify-content: center;
  overflow: hidden;
  gap: 4px;
}

.caption-four-row-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.caption-two-row-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: clamp(14px, 1.45vw, 18px);
  line-height: 1.35;
}

.caption-two-row-line.source-rows {
  color: #f8fafc;
  font-weight: 500;
}

.caption-two-row-line.translation-rows {
  color: #38bdf8;
  font-weight: 700;
  padding-top: 5px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.presentation-left-stage-card,
.presentation-right-transcript-card {
  background: #111c38;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.speaker-presentation-feed-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stage-feed-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stage-bilingual-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: #111c38;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 18px 22px;
}

.stage-bilingual-row.single-column-mode {
  grid-template-columns: 1fr;
}

.stage-cell-text {
  font-size: var(--stage-font-size);
  line-height: 1.45;
  font-weight: 700;
  color: #ffffff;
}

/* ============================================================================
 * 8. CLEAN PAGE CONTAINER & RESPONSIVE GRIDS
 * ========================================================================== */
.widescreen-shell {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.resp-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.resp-grid-glossaries {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
}

.resp-grid-admin {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
}

.table-scroll-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.speaker-console-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.speaker-console-bar .gov-select {
  flex: 1 1 160px;
  min-width: 0;
  width: auto;
}

.modal-lang-selector-grid {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.clean-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.gov-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pikka-blue);
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 3px 9px;
  border-radius: 999px;
}

.gov-input,
.gov-select {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 13.5px;
}

.primary-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--pikka-royal);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.action-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.action-chip-btn:hover {
  background: var(--bg-dock);
}

.speaker-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.speaker-mic-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  height: 100%;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.speaker-mic-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  min-height: 40px;
}

.speaker-mic-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.speaker-mic-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  background: #e0f2fe;
  color: #0369a1;
}

.speaker-mic-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #475569;
  min-height: 22px;
}

.speaker-mic-card-role {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.speaker-mic-card-lang {
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 600;
  color: #334155;
}

.speaker-mic-card-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.speaker-mic-card-actions .action-chip-btn {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  justify-content: center;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  box-sizing: border-box;
}

/* Upper Half (Transcript) & Lower Half (Translation) Split inside Left-Right Presentation Right Column */
.speaker-presentation-feed-list.right-col-upper-lower-split {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
  min-height: 0;
}

.right-col-half-pane {
  flex: 1 1 50%;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.right-col-half-divider {
  flex: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(15, 23, 42, 0.55);
  border-top: 1px solid rgba(56, 189, 248, 0.28);
  border-bottom: 1px solid rgba(56, 189, 248, 0.28);
}

.right-col-half-divider-pill {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.65);
}

.presentation-right-transcript-card .speaker-mic-card {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.2);
  color: #f8fafc;
}

.officers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.officers-table th,
.officers-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.officers-table th {
  font-size: 11.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.toast-container {
  position: fixed;
  bottom: 72px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gov-toast {
  background: #0f172a;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.mobile-a2hs-first-use-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 68px;
  z-index: 2500;
  background: #ffffff;
  border: 1.5px solid var(--pikka-blue);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
}

/* ============================================================================
 * 9. MOBILE & TABLET RESPONSIVE LAYOUT (Zero Overflow / Zero Overlap on 375x812)
 * ========================================================================== */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  .top-navbar {
    padding: 0 12px;
    height: 52px;
  }

  .officer-pill {
    display: none;
  }

  .top-right-actions {
    gap: 6px;
  }

  .brand-title {
    font-size: 15.5px;
  }

  .pikka-subheader {
    padding: 6px 12px;
    min-height: 46px;
    gap: 6px;
  }

  .subheader-title {
    font-size: 16px;
  }

  .subheader-right {
    gap: 4px;
  }

  .pikka-icon-btn {
    width: 32px;
    height: 32px;
  }

  .pikka-col-label {
    padding: 10px 14px 8px;
    font-size: 11px;
  }

  .bilingual-cell,
  .combined-paragraph-row {
    padding: 12px 14px;
  }

  .segment-body-text {
    font-size: 15px;
  }

  .pikka-bottom-dock {
    padding: 12px 12px 14px;
    gap: 10px;
  }

  .pikka-lang-pill-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
    width: 100%;
    max-width: 360px;
    gap: 8px;
  }

  .pikka-lang-select {
    min-width: 0;
    width: 100%;
    padding: 7px 10px;
    font-size: 13px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }

  .pikka-main-mic-btn {
    width: 58px;
    height: 58px;
  }

  .widescreen-shell {
    padding: 14px 12px 28px;
  }

  .clean-card {
    padding: 14px;
    border-radius: 14px;
  }

  .pikka-columns-header {
    display: none;
  }

  .resp-grid-2,
  .resp-grid-glossaries,
  .resp-grid-admin,
  .bilingual-segment-row,
  .stage-bilingual-row {
    grid-template-columns: 1fr;
  }

  .bilingual-cell:first-child {
    border-right: none;
    border-bottom: 1px dashed var(--border);
  }

  .modal-card {
    padding: 16px;
    border-radius: 16px;
  }

  .modal-lang-selector-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .modal-lang-selector-grid #btnModalSwapLanguages {
    margin: 0 auto !important;
  }

  /* Presentation Window on Mobile: Stack Screen Share on top + Captions below cleanly */
  .stage-display-shell {
    padding: 8px 10px;
  }

  .speaker-presentation-split-grid {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(150px, 46%) 12px minmax(150px, 1fr);
  }

  .presentation-split-resizer {
    width: 100%;
    height: 12px;
    cursor: row-resize;
  }

  .presentation-split-resizer::before {
    top: auto;
    bottom: auto;
    left: 16px;
    right: 16px;
    width: auto;
    height: 3px;
  }

  .resizer-grip-pill {
    width: 44px;
    height: 12px;
  }

  #view-translate.active {
    height: calc(100dvh - 106px);
    max-height: calc(100dvh - 106px);
  }

  .officers-table th,
  .officers-table td {
    padding: 8px 6px;
    font-size: 11.5px;
    word-break: break-word;
  }

  /* Disable hover hints on touch screens to prevent sticky tooltips */
  [data-hint]::after {
    display: none;
  }
}

body.is-presentation-window #mobileFirstUseA2hsPrompt {
  display: none !important;
}
