/* Shared action controls and upload surfaces. Keep IDs and event targets intact. */
:root {
  --yc-control-radius: 9px;
  --yc-control-height: 38px;
  --yc-control-font: 13px;
  --yc-control-ink: #6f4c22;
  --yc-control-border: rgba(143, 96, 30, .24);
  --yc-control-surface: rgba(255, 255, 255, .72);
  --yc-control-hover: #fff8ea;
  --yc-control-accent: #8f601e;
  --yc-control-accent-hover: #785018;
  --yc-control-on-accent: #fff8f0;
  --yc-upload-radius: 10px;
}
[data-theme="dark"] {
  --yc-control-ink: #e8d8be;
  --yc-control-border: rgba(211, 178, 114, .38);
  --yc-control-surface: #29231c;
  --yc-control-hover: #382e22;
  --yc-control-accent: #d3b272;
  --yc-control-accent-hover: #e1c38d;
  --yc-control-on-accent: #241d13;
}
html body :is(button, input[type="button"], input[type="submit"], .btn, .yc-btn-primary, .yc-btn-ghost, .detail-primary-action, .ai-tool-download-btn, .me-download, .button, .yc-btn, .download-btn, a[role="button"]):where(:not(.mascot-orb):not(.mascot-controls-hub):not(.mascot-bubble-drag)) {
  box-sizing: border-box;
  border: 1px solid var(--yc-control-border) !important;
  border-radius: var(--yc-control-radius) !important;
  background: var(--yc-control-surface) !important;
  color: var(--yc-control-ink) !important;
  font-family: inherit !important;
  font-weight: 600 !important;
  text-decoration: none;
  box-shadow: none !important;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease;
}
/* Action buttons share geometry; icon, map, carousel and pagination controls keep theirs. */
html body :is(.ai-tools-page button:not([class]), .ai-tools-page button.secondary, .ai-tool-actions button, .ai-tool-actions .btn, .svp-toolbar button, .btn, .yc-btn-primary, .yc-btn-ghost, .detail-primary-action, .ai-tool-download-btn, .me-download, .button, .yc-btn, .download-btn, a[role="button"], input[type="button"], input[type="submit"], button[type="submit"], .yc-search-submit) {
  min-height: var(--yc-control-height) !important;
  padding: 9px 14px !important;
  font-size: var(--yc-control-font) !important;
  line-height: 1.4 !important;
}
html body :is(.btn, .yc-btn-primary, .yc-btn-ghost, .detail-primary-action, .ai-tool-download-btn, .me-download, .button, .yc-btn, .download-btn, a[role="button"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  vertical-align: middle;
}
html body :is(button, .btn, .yc-btn-primary, .yc-btn-ghost, .detail-primary-action, .ai-tool-download-btn, .me-download, .button, .yc-btn, .download-btn, a[role="button"]):where(:not(.mascot-orb):not(.mascot-controls-hub):not(.mascot-bubble-drag)):not(:disabled):not([aria-disabled="true"]):hover {
  background: var(--yc-control-hover) !important;
  border-color: var(--yc-control-accent) !important;
}
/* Primary actions and selected controls use the same accent. */
html body :is(.ai-tool-panel button:not([class]), .ai-tool-actions button:not(.secondary), .svp-toolbar button:not(.secondary):not(.svp-clear-btn), .btn:not(.secondary), .yc-btn-primary, .detail-primary-action, .ai-tool-download-btn, .download-btn, button[type="submit"], input[type="submit"], .yc-search-submit, button.is-primary, button.primary, button.is-active, button[aria-pressed="true"], button[aria-selected="true"]) {
  background: var(--yc-control-accent) !important;
  border-color: var(--yc-control-accent) !important;
  color: var(--yc-control-on-accent) !important;
}
html body :is(.ai-tool-panel button:not([class]), .ai-tool-actions button:not(.secondary), .svp-toolbar button:not(.secondary):not(.svp-clear-btn), .btn:not(.secondary), .yc-btn-primary, .detail-primary-action, .ai-tool-download-btn, .download-btn, button[type="submit"], input[type="submit"], .yc-search-submit, button.is-primary, button.primary, button.is-active, button[aria-pressed="true"], button[aria-selected="true"]):not(:disabled):not([aria-disabled="true"]):hover {
  background: var(--yc-control-accent-hover) !important;
}
html body :is(button, input[type="button"], input[type="submit"], .btn, .yc-btn-primary, .yc-btn-ghost, .detail-primary-action, .ai-tool-download-btn, .me-download, .button, .yc-btn, .download-btn, a[role="button"]):focus-visible {
  outline: 2px solid var(--yc-control-accent) !important;
  outline-offset: 3px;
}
html body :is(button, input[type="button"], input[type="submit"]):disabled,
html body :is(button, .btn, .yc-btn-primary, .yc-btn-ghost, .detail-primary-action)[aria-disabled="true"] {
  opacity: .5 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}
html body :is(button, .btn, .yc-btn-primary, .yc-btn-ghost, .detail-primary-action, .ai-tool-download-btn, .me-download, .button, .yc-btn, .download-btn, a[role="button"])[hidden] { display: none !important; }

/* Pure upload areas: match the compact transcription page without shrinking editors. */
html body :is(.ai-vt-drop, .yc-dropzone, .me-drop):not([hidden]) {
  box-sizing: border-box;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 8px 14px !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 16px 18px !important;
  border: 1px dashed var(--yc-control-border) !important;
  border-radius: var(--yc-upload-radius) !important;
  background: var(--yc-control-surface) !important;
  color: var(--yc-control-ink) !important;
  box-shadow: none !important;
  text-align: center;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition: border-color .16s ease, background-color .16s ease;
}
html body :is(.ai-vt-drop, .yc-dropzone, .me-drop):is(:hover, .is-drag, .is-over) {
  border-color: var(--yc-control-accent) !important;
  background: var(--yc-control-hover) !important;
}
html body :is(.ai-vt-drop, .yc-dropzone, .me-drop):focus-visible {
  outline: 2px solid var(--yc-control-accent);
  outline-offset: 3px;
}
html body :is(.ai-vt-drop, .yc-dropzone, .me-drop)[hidden] { display: none !important; }
html body :is(.ai-vt-drop, .yc-dropzone, .me-drop) > :is(b, strong, .ai-vt-drop-inner) {
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  color: var(--yc-control-ink) !important;
}
html body :is(.ai-vt-drop, .yc-dropzone, .me-drop) > :is(span, .ai-vt-filename) {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
  color: var(--yc-control-ink) !important;
}
html body .yc-dropzone > .yc-file-icon { display: none !important; }
html body .me-drop input[type="file"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  opacity: 0 !important;
}
html body input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 1px solid var(--yc-control-border);
  border-radius: var(--yc-control-radius);
  padding: 9px 14px;
  font: inherit;
  font-size: var(--yc-control-font);
  font-weight: 600;
  background: var(--yc-control-surface);
  color: var(--yc-control-ink);
  cursor: pointer;
}
@media (max-width: 600px) {
  html body :is(.ai-vt-drop, .yc-dropzone, .me-drop):not([hidden]) { padding: 14px 10px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html body :is(button, .btn, .ai-vt-drop, .yc-dropzone, .me-drop) { transition: none !important; }
}
