/*
 * Oracle TinyMCE skin overrides
 * Targets oxide-dark chrome (.tox-tinymce and children) to match the
 * Volaire Oracle aesthetic: #09090b void background, imperial-gold accent,
 * Orbitron/Roboto Mono typography, subtle gold-tinted borders.
 *
 * Content-area overrides are handled via content_style in each tinymce.init()
 * call. This file handles everything OUTSIDE the editing iframe.
 */

/* ── Outer shell ─────────────────────────────────────────────────────────── */
.tox.tox-tinymce {
  border: 1px solid rgba(201, 162, 39, 0.22) !important;
  border-radius: 6px !important;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 4px 24px rgba(0,0,0,.5) !important;
  font-family: 'Roboto Mono', monospace !important;
}

/* ── Editor header (contains menubar + toolbar) ──────────────────────────── */
.tox .tox-editor-header {
  background: #121214 !important;
  border-bottom: 1px solid rgba(201, 162, 39, 0.15) !important;
  padding: 0 !important;
}

/* ── Menubar (File Edit View Insert Format) ──────────────────────────────── */
.tox .tox-menubar {
  background: #121214 !important;
  padding: 2px 4px !important;
}
.tox .tox-mbtn {
  background: transparent !important;
  border-radius: 4px !important;
  color: #94a3b8 !important;
  font-family: 'Roboto Mono', monospace !important;
  font-size: .7rem !important;
  letter-spacing: .05em !important;
  text-transform: uppercase !important;
}
.tox .tox-mbtn:hover,
.tox .tox-mbtn--active,
.tox .tox-mbtn[aria-expanded="true"] {
  background: rgba(201, 162, 39, 0.12) !important;
  color: #c9a227 !important;
}
.tox .tox-mbtn__select-chevron {
  fill: #64748b !important;
}

/* ── Toolbar ─────────────────────────────────────────────────────────────── */
.tox .tox-toolbar,
.tox .tox-toolbar__overflow,
.tox .tox-toolbar__primary {
  background: #121214 !important;
  border-top: none !important;
  padding: 2px 4px !important;
}
.tox .tox-toolbar__group {
  border-right: 1px solid rgba(255,255,255,.06) !important;
  padding: 0 4px !important;
}
.tox .tox-toolbar__group:last-child {
  border-right: none !important;
}

/* Toolbar buttons */
.tox .tox-tbtn {
  border-radius: 4px !important;
  color: #94a3b8 !important;
  margin: 1px !important;
}
.tox .tox-tbtn svg {
  fill: #94a3b8 !important;
  transition: fill .15s ease !important;
}
.tox .tox-tbtn:hover {
  background: rgba(201, 162, 39, 0.12) !important;
  color: #c9a227 !important;
}
.tox .tox-tbtn:hover svg {
  fill: #c9a227 !important;
}
.tox .tox-tbtn--enabled,
.tox .tox-tbtn--enabled:hover {
  background: rgba(201, 162, 39, 0.18) !important;
  color: #c9a227 !important;
}
.tox .tox-tbtn--enabled svg,
.tox .tox-tbtn--enabled:hover svg {
  fill: #c9a227 !important;
}
.tox .tox-tbtn--bespoke .tox-tbtn__select-label {
  color: #94a3b8 !important;
  font-family: 'Roboto Mono', monospace !important;
  font-size: .72rem !important;
}
.tox .tox-split-button:hover {
  box-shadow: none !important;
}

/* ── Statusbar ───────────────────────────────────────────────────────────── */
.tox .tox-statusbar {
  background: #09090b !important;
  border-top: 1px solid rgba(201, 162, 39, 0.10) !important;
  color: #475569 !important;
  font-family: 'Roboto Mono', monospace !important;
  font-size: .65rem !important;
}
.tox .tox-statusbar__path-item,
.tox .tox-statusbar__path-divider,
.tox .tox-statusbar__wordcount {
  color: #475569 !important;
}
.tox .tox-statusbar__path-item:hover {
  color: #94a3b8 !important;
  cursor: default !important;
}
.tox .tox-statusbar a,
.tox .tox-statusbar__branding {
  display: none !important;
}

/* ── Edit area border ────────────────────────────────────────────────────── */
.tox .tox-edit-area {
  border: none !important;
}
.tox .tox-edit-area__iframe {
  background: #09090b !important;
}

/* ── Dropdown menus & context menus ─────────────────────────────────────── */
.tox .tox-menu,
.tox .tox-collection--toolbar,
.tox .tox-pop__dialog {
  background: #1a1a1e !important;
  border: 1px solid rgba(201, 162, 39, 0.22) !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.6) !important;
}
.tox .tox-collection__item {
  border-radius: 4px !important;
  color: #94a3b8 !important;
  font-family: 'Roboto Mono', monospace !important;
  font-size: .75rem !important;
}
.tox .tox-collection__item--active,
.tox .tox-collection__item:hover {
  background: rgba(201, 162, 39, 0.12) !important;
  color: #c9a227 !important;
}
.tox .tox-collection__item-checkmark svg,
.tox .tox-collection__item-icon svg {
  fill: #94a3b8 !important;
}
.tox .tox-collection__item--active .tox-collection__item-checkmark svg,
.tox .tox-collection__item--active .tox-collection__item-icon svg {
  fill: #c9a227 !important;
}
.tox .tox-collection__group-heading {
  background: transparent !important;
  color: #475569 !important;
  font-family: 'Roboto Mono', monospace !important;
  font-size: .65rem !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}
.tox .tox-menu__legend {
  color: #475569 !important;
}

/* ── Dialogs (insert link, insert image, etc.) ───────────────────────────── */
.tox .tox-dialog-wrap__backdrop {
  background: rgba(0,0,0,.72) !important;
}
.tox .tox-dialog {
  background: #121214 !important;
  border: 1px solid rgba(201, 162, 39, 0.22) !important;
  border-radius: 8px !important;
  box-shadow: 0 16px 48px rgba(0,0,0,.7) !important;
  color: #f8fafc !important;
}
.tox .tox-dialog__header {
  background: #121214 !important;
  border-bottom: 1px solid rgba(201, 162, 39, 0.15) !important;
  color: #f8fafc !important;
  font-family: 'Roboto Mono', monospace !important;
  padding: .75rem 1rem !important;
}
.tox .tox-dialog__title {
  color: #c9a227 !important;
  font-family: 'Roboto Mono', monospace !important;
  font-size: .85rem !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
}
.tox .tox-dialog__body {
  background: #121214 !important;
  color: #94a3b8 !important;
}
.tox .tox-dialog__body-nav-item {
  color: #94a3b8 !important;
  font-family: 'Roboto Mono', monospace !important;
  font-size: .75rem !important;
}
.tox .tox-dialog__body-nav-item--active {
  border-bottom-color: #c9a227 !important;
  color: #c9a227 !important;
}
.tox .tox-dialog__footer {
  background: #121214 !important;
  border-top: 1px solid rgba(201, 162, 39, 0.15) !important;
}
.tox .tox-label,
.tox .tox-form__group label {
  color: #94a3b8 !important;
  font-family: 'Roboto Mono', monospace !important;
  font-size: .7rem !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}
.tox .tox-textfield,
.tox .tox-selectfield select,
.tox .tox-textarea {
  background: rgba(0,0,0,.5) !important;
  border: 1px solid rgba(201, 162, 39, 0.20) !important;
  border-radius: 4px !important;
  color: #f8fafc !important;
  font-family: 'Roboto Mono', monospace !important;
  font-size: .8rem !important;
}
.tox .tox-textfield:focus,
.tox .tox-textarea:focus {
  border-color: #c9a227 !important;
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.18) !important;
}
.tox .tox-button {
  background: rgba(201, 162, 39, 0.15) !important;
  border: 1px solid rgba(201, 162, 39, 0.35) !important;
  border-radius: 4px !important;
  color: #c9a227 !important;
  font-family: 'Roboto Mono', monospace !important;
  font-size: .75rem !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
}
.tox .tox-button:hover {
  background: rgba(201, 162, 39, 0.25) !important;
  border-color: #c9a227 !important;
}
.tox .tox-button--secondary {
  background: rgba(255,255,255,.04) !important;
  border-color: rgba(255,255,255,.12) !important;
  color: #94a3b8 !important;
}
.tox .tox-button--secondary:hover {
  background: rgba(255,255,255,.08) !important;
  color: #f8fafc !important;
}

/* ── Scrollbars inside TinyMCE panels ────────────────────────────────────── */
.tox ::-webkit-scrollbar { width: 5px; height: 5px; }
.tox ::-webkit-scrollbar-track { background: #09090b; }
.tox ::-webkit-scrollbar-thumb { background: rgba(201,162,39,.25); border-radius: 3px; }
.tox ::-webkit-scrollbar-thumb:hover { background: rgba(201,162,39,.45); }

/* ── Tooltip ─────────────────────────────────────────────────────────────── */
.tox .tox-tooltip__body {
  background: #1a1a1e !important;
  border: 1px solid rgba(201, 162, 39, 0.22) !important;
  border-radius: 4px !important;
  color: #94a3b8 !important;
  font-family: 'Roboto Mono', monospace !important;
  font-size: .68rem !important;
}
