/* ========== XECUTE — css/11-misc-small-fixes.css ========== */
/* Small later additions: font-size slider, word count badge, compact-mode fixes, Zen Mode */

/* ====== FONT SIZE SLIDER IN TOOLBAR ====== */
.font-size-control {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
}
.font-size-control input[type=range] {
  width: 60px;
  accent-color: var(--accent);
  cursor: pointer;
}
.font-size-control span {
  font-size: 10px;
  color: var(--text-muted);
  min-width: 24px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}

/* ====== WORD COUNT BADGE IN STATUS BAR ====== */
.status-wordcount {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.9;
}

/* ====== RESIZING SETTINGS PANEL ====== */
.resize-settings-section {
  margin-top: 8px;
}

/* ====== COMPACT HEADER ON VERY SMALL ====== */
@media (max-width: 480px) {
  #header { padding: 0 6px; gap: 4px; }
  #header-center { display: none; }
  #header-right { gap: 1px; }
  .file-tab { min-width: 60px; padding: 0 8px; }
}

/* ====== FOOTER COMPACT ====== */
@media (max-width: 440px) {
  footer { padding: 0 6px; }
  footer button { padding: 0 6px; }
  .footer-center { display: none; }
}

/* ====== STATUS BAR COMPACT ====== */
@media (max-width: 600px) {
  .status-right .status-item:nth-child(n+3) { display: none; }
}
@media (max-width: 400px) {
  .status-right { display: none; }
}

/* ====== STDIN QUEUE BADGE ====== */
.stdin-queue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ====== RUN BTN PROGRESS ====== */
#runBtn.running {
  background: var(--accent-orange) !important;
  animation: runPulse 1.2s infinite;
}
@keyframes runPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(227, 179, 65, 0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(227, 179, 65, 0); }
}

/* ====== LANGUAGE SELECT IN NEW FILE MODAL (all langs) ====== */
#fileLangSelect optgroup {
  color: var(--text-secondary);
  font-style: normal;
}

/* ====== EDITOR RESIZE VIA SETTINGS ====== */
.editor-size-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.editor-size-row label {
  font-size: 11px;
  color: var(--text-secondary);
  min-width: 70px;
}
.editor-size-row input[type=range] {
  flex: 1;
  accent-color: var(--accent);
}

/* ====== STDIN MULTI-STEP PROGRESS ====== */
.stdin-step-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.stdin-step-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
}
.stdin-step-dot.active { background: var(--accent); }
.stdin-step-dot.done  { background: var(--accent-green); }

/* ====== ZEN MODE ====== */
/* Hides header + file tabs so the editor and preview take the full screen. */
body.zen-mode #header,
body.zen-mode #file-tabs-bar {
  display: none !important;
}
body.zen-mode #main-container {
  height: 100vh !important;
}
#zenExitBtn {
  display: none;
  position: fixed;
  top: 10px; right: 10px;
  z-index: 9999;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-secondary, #1a1d24);
  color: var(--text-primary, #e6edf3);
  cursor: pointer;
  align-items: center; justify-content: center;
  opacity: 0.55;
  transition: opacity 0.15s;
}
#zenExitBtn:hover { opacity: 1; }
body.zen-mode #zenExitBtn { display: flex; }

/* ====== TOUCH TARGET SIZING (phones/tablets) ====== */
/* Small icon-only buttons (26px) are fine for a mouse cursor but too tight
   for a fingertip. Widen the tappable area on touch devices without
   changing the visual layout for desktop/mouse users. */
@media (pointer: coarse) {
  .preview-toolbar-actions button,
  .ac-toggle-btn,
  #stopRunBtn,
  #clearTerminalBtn,
  #copyTerminalBtn,
  #previewRefreshBtn {
    min-width: 40px;
    min-height: 40px;
  }
  #runBtn { min-height: 40px; }
}
