/* EstiloAPA ribbon: familiar Word-like grouping without copying Microsoft's UI. */
.word-ribbon-enabled { overflow: hidden; background: #f6f8fc; border-color: #c7d4e3; }
.word-ribbon-tabs { display:flex; flex-wrap:wrap; gap:2px; padding:6px 10px 0; background:#eef3fb; border-bottom:1px solid #cbd6e7; }
.word-ribbon-tabs [role="tab"] { min-height:38px; padding:7px 16px; background:transparent; border:0; border-radius:6px 6px 0 0; font-weight:600; color:#314a69; }
.word-ribbon-tabs [role="tab"][aria-selected="true"] { background:#fff; color:#174c8b; box-shadow:inset 0 -3px #1971ce; }
.word-ribbon-tabs [role="tab"]:focus-visible { outline:2px solid #165da2; outline-offset:-2px; }
.word-ribbon-panels { background:white; min-height:94px; }
.word-ribbon-panel { display:flex; align-items:stretch; flex-wrap:wrap; gap:4px; padding:10px; }
.word-ribbon-panel[hidden] { display:none !important; }
.word-ribbon-panel .word-ribbon-legacy-group { display:flex; align-items:center; flex-wrap:wrap; padding:6px 9px; border-right:1px solid #d9e2ed; gap:5px; }
.word-ribbon-panel .word-ribbon-legacy-group button,
.word-ribbon-panel .word-ribbon-legacy-group select,
.word-ribbon-action { font-size:13px; min-height:35px; padding:6px 9px; border-radius:5px; }
.word-ribbon-group { display:flex; flex-wrap:wrap; align-content:center; align-items:center; gap:7px; border-right:1px solid #d9e2ed; padding:7px 11px; position:relative; }
.word-ribbon-group-label { width:100%; font-size:11px; color:#63758c; font-weight:600; }
.word-ribbon-action:disabled { opacity:.45; cursor:not-allowed; }
.word-ribbon-enabled > #apaEditorToolbar[hidden] { display:none !important; }
@media (max-width:760px) {
  .word-ribbon-panel { max-height:240px; overflow:auto; }
  .word-ribbon-tabs [role="tab"] { padding:7px 10px; font-size:13px; }
}

.word-ribbon-status { padding:7px 13px; border-top:1px solid #d9e2ed; background:#f6f9ff; color:#52647c; font-size:12px; font-variant-numeric:tabular-nums; }

/* Show the last explicitly applied paragraph command. */
.word-ribbon-enabled [data-indent][aria-pressed="true"],
.word-ribbon-enabled [data-align][aria-pressed="true"] {
  color: #124f91;
  background: #deebfc;
  border-color: #6ca7e8;
}

/* Always-accessible responsive controls for Ribbon and distraction-free editing. */
.word-ribbon-view-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:.4rem;
  padding:.4rem .65rem;
  background:#eef3fb;
  border-bottom:1px solid #cbd6e7;
}
.word-ribbon-view-actions .word-ribbon-action {
  min-height:36px;
  font-weight:650;
}
.word-ribbon-collapsed .word-ribbon-panels { display:none !important; }
.word-ribbon-collapsed .word-ribbon-tabs { border-bottom:0; }
body.apa-focus-mode .site-header,
body.apa-focus-mode .layout > .controls,
body.apa-focus-mode .layout > .audit,
body.apa-focus-mode footer { display:none !important; }
body.apa-focus-mode .layout {
  display:block;
  width:100%;
  max-width:none;
  padding:.25rem !important;
}
body.apa-focus-mode .preview-panel {
  width:100%;
  max-width:none;
  margin:0;
  border-radius:8px;
  box-shadow:none;
}
body.apa-focus-mode .paper-wrap { width:100%; }
body.apa-focus-mode:not(.apa-page-view) .apa-paper { min-height:calc(100dvh - 215px); }
@media (max-width:760px) {
  .word-ribbon-view-actions { justify-content:space-between; padding:.28rem .35rem; }
  .word-ribbon-view-actions .word-ribbon-action { flex:1 1 auto; font-size:12px; min-height:42px; }
  body.apa-focus-mode .preview-panel { padding:.4rem; }
  body.apa-focus-mode:not(.apa-page-view) .apa-paper { min-height:calc(100dvh - 160px); }
}
@media print {
  .word-ribbon-view-actions, .word-ribbon-tabs, .word-ribbon-panels, .word-ribbon-status { display:none !important; }
  body.apa-focus-mode .layout { padding:0 !important; }
}

/* Word-style local draft controls: compact and unobtrusive. */
#wordLocalDraftTools { max-width:340px; }
.word-local-draft-note {
  display:block;
  flex-basis:100%;
  max-width:300px;
  font-size:11px;
  line-height:1.3;
  color:#506179;
}
