/* Plume — Document Editor Styles */

.plume-editor {
  background: var(--suite-surface);
  width: 100%;
  max-width: 816px; /* ~A4 width */
  min-height: 1056px; /* ~A4 height */
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  padding: 72px 72px 96px;
  outline: none;
  color: var(--suite-text);
  font-size: 11pt;
  line-height: 1.65;
  caret-color: var(--suite-accent);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

[data-theme="light"] .plume-editor {
  background: #fff;
  color: #1a1a2e;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.plume-editor:focus {
  outline: none;
}

.plume-editor h1 { font-size: 2rem; font-weight: 700; margin: 1.2em 0 0.6em; }
.plume-editor h2 { font-size: 1.5rem; font-weight: 600; margin: 1em 0 0.5em; }
.plume-editor h3 { font-size: 1.15rem; font-weight: 600; margin: 0.8em 0 0.4em; }
.plume-editor p { margin: 0.5em 0; }
.plume-editor ul, .plume-editor ol { margin: 0.5em 0; padding-left: 2em; }
.plume-editor blockquote {
  border-left: 4px solid var(--suite-accent);
  margin: 1em 0;
  padding: 8px 16px;
  background: rgba(99, 102, 241, 0.06);
  border-radius: 0 8px 8px 0;
}
.plume-editor pre {
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9em;
}
.plume-editor code {
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9em;
}
.plume-editor pre code {
  background: none;
  padding: 0;
}
.plume-editor table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}
.plume-editor th, .plume-editor td {
  border: 1px solid var(--suite-border);
  padding: 8px 12px;
  text-align: left;
}
.plume-editor th {
  background: rgba(99, 102, 241, 0.08);
  font-weight: 600;
}
.plume-editor img {
  max-width: 100%;
  border-radius: 6px;
  margin: 8px 0;
}
.plume-editor hr {
  border: none;
  height: 2px;
  background: var(--suite-border);
  margin: 2em 0;
}

/* Ruler */
.plume-ruler {
  width: 100%;
  max-width: 816px;
  height: 24px;
  background: var(--suite-surface2);
  border-bottom: 1px solid var(--suite-border);
  display: flex;
  align-items: flex-end;
  padding: 0 72px;
  font-size: 9px;
  color: var(--suite-text2);
  margin: 0 auto;
  flex-shrink: 0;
}

/* Page counter */
.plume-pages {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

/* Toolbar specifics */
.tb-font-size {
  width: 54px;
  text-align: center;
}

.tb-font-family {
  width: 130px;
}

/* Find & Replace bar */
.plume-findbar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--suite-surface);
  border-bottom: 1px solid var(--suite-border);
}

.plume-findbar.open {
  display: flex;
}

.plume-findbar input {
  background: var(--suite-bg);
  border: 1px solid var(--suite-border);
  border-radius: 6px;
  color: var(--suite-text);
  padding: 4px 10px;
  font-size: .82rem;
  outline: none;
  width: 200px;
}

.plume-findbar input:focus {
  border-color: var(--suite-accent);
}

.plume-findbar .find-count {
  font-size: .75rem;
  color: var(--suite-text2);
  min-width: 60px;
}

/* Word count in status bar */
.plume-status-words,
.plume-status-chars {
  cursor: default;
}

@media print {
  .suite-header, .suite-toolbar, .suite-statusbar, .plume-findbar { display: none !important; }
  .suite-content { padding: 0 !important; }
  .plume-editor {
    box-shadow: none;
    border-radius: 0;
    max-width: none;
    padding: 0;
    min-height: auto;
  }
}

/* Page break */
.plume-page-break {
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 2px dashed var(--suite-border);
  border-bottom: 2px dashed var(--suite-border);
  padding: 8px;
  margin: 2em 0;
  color: var(--suite-text2);
  font-size: .75rem;
  user-select: none;
  cursor: default;
}

/* Zoom buttons */
.plume-zoom-btn {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--suite-text2);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
}

.plume-zoom-btn:hover {
  background: var(--suite-surface2);
  color: var(--suite-text);
}

@media print {
  .plume-page-break {
    page-break-after: always;
    border: none;
    padding: 0;
    margin: 0;
  }
  .plume-page-break span { display: none; }
}
