.pforr-editor {
  width: 100%;
  min-width: 0;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid #cbdde8;
  border-radius: 14px;
  color: #17344a;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 59, 86, .055);
}

.pforr-editor button,
.pforr-editor input,
.pforr-editor textarea { font: inherit; }

.pforr-editor button { cursor: pointer; }

.pforr-editor :is(button, input, textarea, [contenteditable]):focus-visible {
  outline: 3px solid #28c3d8;
  outline-offset: 2px;
}

.pforr-editor-intro { margin-bottom: 22px; }
.pforr-editor-kicker { color: #247695; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.pforr-editor-intro h2 { margin: 6px 0 8px; color: #102c48; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.25; }
.pforr-editor-intro p { margin: 0; color: #5a7182; font-size: 14px; line-height: 1.55; }

.pforr-editor-title-wrap { display: grid; gap: 8px; margin-bottom: 18px; }
.pforr-editor-title-wrap label,
.pforr-editor-heading-label { color: #28546f; font-size: 14px; font-weight: 750; }
.pforr-editor-title-wrap textarea,
.pforr-editor-heading {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #bbd1df;
  border-radius: 8px;
  color: #183a51;
  background: #fbfdfe;
  font-size: 15px;
  line-height: 1.5;
}
.pforr-editor-title-wrap textarea { resize: vertical; min-height: 86px; }
.pforr-editor-heading { margin-top: 7px; }

.pforr-editor-toolbar {
  position: sticky;
  z-index: 4;
  top: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
  margin: 0 0 20px;
  padding: 9px 11px;
  border: 1px solid #ccdde7;
  border-radius: 9px;
  background: rgba(246, 251, 253, .98);
  box-shadow: 0 4px 12px rgba(18, 64, 91, .06);
}
.pforr-editor-format,
.pforr-editor-colors { display: flex; align-items: center; gap: 6px; }
.pforr-editor-colors { padding-left: 12px; border-left: 1px solid #ccdde7; }
.pforr-editor-color-label { margin-right: 3px; color: #4c6b7d; font-size: 13px; font-weight: 700; }
.pforr-editor-button { width: 34px; height: 34px; padding: 0; border: 1px solid #b9d0df; border-radius: 7px; color: #143e5a; background: #fff; font-size: 15px; font-weight: 800; }
.pforr-editor-button:hover { border-color: #158da5; background: #e9f7f9; }
.pforr-editor-format-italic { font-style: italic; }
.pforr-editor-format-underline { text-decoration: underline; }
.pforr-editor-color { display: grid; place-items: center; }
.pforr-editor-color::after { content: ''; width: 19px; height: 19px; border-radius: 50%; background: var(--swatch); }

.pforr-editor-sections { display: grid; gap: 17px; }
.pforr-editor-section { min-width: 0; padding: 18px; border: 1px solid #d4e3ec; border-radius: 10px; background: #fbfdfe; }
.pforr-editor-section-head { display: grid; grid-template-columns: 37px minmax(0, 1fr) auto; align-items: end; gap: 13px; margin-bottom: 17px; }
.pforr-editor-index { display: grid; place-items: center; width: 37px; height: 37px; margin-bottom: 1px; border-radius: 7px; color: #fff; background: #117d98; font-size: 13px; font-weight: 800; }
.pforr-editor-heading-label { min-width: 0; }
.pforr-editor-paragraphs { display: grid; gap: 12px; }
.pforr-editor-paragraph { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 9px; }
.pforr-rich-field {
  min-width: 0;
  min-height: 105px;
  padding: 14px 16px;
  overflow-wrap: anywhere;
  border: 1px solid #bfd3df;
  border-radius: 8px;
  color: #344f62;
  background: #fff;
  font-size: 15px;
  line-height: 1.65;
  white-space: pre-wrap;
}
.pforr-rich-field:empty::before { content: attr(data-placeholder); color: #8194a0; pointer-events: none; }
.pforr-editor-remove { align-self: center; padding: 7px 9px; border: 0; border-radius: 6px; color: #916064; background: transparent; font-size: 12px; font-weight: 700; }
.pforr-editor-remove:hover { color: #87313c; background: #fff0f1; }
.pforr-editor-section-head .pforr-editor-remove { align-self: end; margin-bottom: 2px; }
.pforr-editor-add { padding: 9px 13px; border: 1px solid #92c4d0; border-radius: 7px; color: #116b83; background: #eff9fb; font-size: 13px; font-weight: 750; }
.pforr-editor-add:hover { border-color: #298da7; background: #e2f5f8; }
.pforr-editor-add-paragraph { margin-top: 12px; }

.pforr-editor-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin-top: 22px; padding-top: 19px; border-top: 1px solid #dce8ef; }
.pforr-editor-status { flex: 1 1 210px; margin: 0; color: #196b5a; font-size: 13px; font-weight: 700; line-height: 1.4; }
.pforr-editor-status.is-error { color: #a23f46; }
.pforr-editor-actions { display: flex; gap: 8px; margin-left: auto; }
.pforr-editor-actions button { padding: 10px 16px; border-radius: 7px; font-size: 14px; font-weight: 750; }
.pforr-editor-cancel { border: 1px solid #c5d7e1; color: #34596e; background: #fff; }
.pforr-editor-cancel:hover { background: #f1f7fa; }
.pforr-editor-save { border: 1px solid #096c88; color: #fff; background: #0b7391; }
.pforr-editor-save:hover { background: #075c78; }
.pforr-editor-save:disabled { opacity: .65; cursor: wait; }

@media (max-width: 900px) {
  .pforr-editor-toolbar { top: 121px; }
}

@media (max-width: 620px) {
  .pforr-editor { padding: 15px; }
  .pforr-editor-toolbar { gap: 8px; }
  .pforr-editor-colors { padding-left: 0; border-left: 0; }
  .pforr-editor-section { padding: 13px; }
  .pforr-editor-section-head { grid-template-columns: 32px minmax(0, 1fr); gap: 8px; }
  .pforr-editor-index { width: 32px; height: 32px; }
  .pforr-editor-section-head .pforr-editor-remove { grid-column: 2; justify-self: start; }
  .pforr-editor-paragraph { grid-template-columns: 1fr; }
  .pforr-editor-paragraph .pforr-editor-remove { justify-self: start; }
  .pforr-editor-actions { width: 100%; justify-content: flex-end; }
}
