/** Compact Paragraphs controls; the Drupal submit inputs remain the real controls. */
.fs-page-content input[type="submit"].paragraphs-icon-button-collapse,
.fs-page-content input[type="submit"].paragraphs-icon-button-edit {
  display: inline-flex;
  /* Paragraphs sets a 36px mobile width with !important; keep this icon compact. */
  width: 28px !important;
  min-width: 28px;
  min-height: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 5px;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 13px 13px;
  color: transparent;
  font-size: 0;
  line-height: 0;
  text-shadow: none;
  box-shadow: none;
}

/* An expanded item offers Collapse (down); a collapsed item offers Edit (right). */
.fs-page-content input[type="submit"].paragraphs-icon-button-collapse {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23454b52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
}

.fs-page-content input[type="submit"].paragraphs-icon-button-edit {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23454b52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 4 4 4-4 4'/%3E%3C/svg%3E");
}

.fs-page-content input[type="submit"].paragraphs-icon-button-collapse:hover,
.fs-page-content input[type="submit"].paragraphs-icon-button-edit:hover {
  border-color: #e1e4e7;
  background-color: #f5f6f7;
}

.fs-page-content input[type="submit"].paragraphs-icon-button-collapse:focus-visible,
.fs-page-content input[type="submit"].paragraphs-icon-button-edit:focus-visible {
  outline: 2px solid #555;
  outline-offset: 2px;
}

/* Keep the parent field heading flush while giving its Paragraph items a gutter. */
.fs-page-content :is(.field--widget-paragraphs, .field--widget-entity-reference-paragraphs) .field-multiple-table {
  margin-block: 0 10px;
  border-spacing: 0 8px;
}

.fs-page-content :is(.field--widget-paragraphs, .field--widget-entity-reference-paragraphs) .field-multiple-table > thead > tr > th.field-label {
  padding-left: 0;
  padding-bottom: 0;
}

/* Align the heading with the header actions, which set the table-row height. */
.fs-page-content :is(.field--widget-paragraphs, .field--widget-entity-reference-paragraphs) .field-multiple-table > thead > tr > th.field-label > h4 {
  position: relative;
  top: 4px;
}

.fs-page-content :is(.field--widget-paragraphs, .field--widget-entity-reference-paragraphs) .field-multiple-table > tbody > tr > td {
  padding: 10px 12px;
  border-top: 1px solid #e2e2df;
  border-bottom: 1px solid #e2e2df;
  background: #fafaf8;
  vertical-align: middle;
}

.fs-page-content :is(.field--widget-paragraphs, .field--widget-entity-reference-paragraphs) .field-multiple-table > tbody > tr > td.field-multiple-drag {
  box-sizing: border-box;
  width: 54px;
  min-width: 54px;
  padding-inline: 4px;
  border-left: 18px solid transparent;
  border-radius: 8px 0 0 8px;
  background-clip: padding-box;
}

.fs-page-content :is(.field--widget-paragraphs, .field--widget-entity-reference-paragraphs) .field-multiple-table > tbody > tr > td:nth-child(2) {
  min-width: 0;
  border-right: 1px solid #e2e2df;
  border-radius: 0 8px 8px 0;
}

.fs-page-content :is(.field--widget-paragraphs, .field--widget-entity-reference-paragraphs) .field-multiple-table > tbody > tr > td:nth-child(n + 3) {
  border: 0;
  background: transparent;
}

.fs-page-content :is(.field--widget-paragraphs, .field--widget-entity-reference-paragraphs) .field-multiple-drag .tabledrag-handle {
  color: #a5a5a5;
  opacity: 0.75;
}

/* A hidden repeated type label must not reserve its old grid column. */
.fs-page-content .paragraph-top:has(> .paragraph-type.visually-hidden) {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.fs-page-content .paragraph-top:has(> .paragraph-type.visually-hidden) > .paragraph-info {
  grid-column: 1;
}

.fs-page-content .paragraph-top:has(> .paragraph-type.visually-hidden) > .paragraph-summary {
  grid-row: 1;
  grid-column: 2;
}

.fs-page-content .paragraph-top:has(> .paragraph-type.visually-hidden) > .paragraphs-actions {
  grid-row: 1;
  grid-column: 3;
}

.fs-page-content .paragraph-top,
.fs-page-content .paragraph-type-top {
  align-items: center;
}

.fs-page-content .paragraph-top .paragraph-summary {
  margin: 0;
}

/* Paragraphs hides expanded content summaries; keep useful row text visible. */
.fs-page-content .field--widget-paragraphs .content-active .paragraphs-expanded-description .paragraphs-content-wrapper {
  display: block;
}

.fs-page-content .paragraph-summary :is(.paragraphs-expanded-description, .paragraphs-collapsed-description),
.fs-page-content .paragraph-summary .summary-content {
  color: #333;
  font-size: 15px;
  font-weight: 500;
}

.fs-page-content .paragraphs-subform {
  box-sizing: border-box;
  max-width: 100%;
  padding-left: 14px;
  border-left: 2px solid #d8d8d4;
}

.fs-page-content :is(.field--widget-paragraphs, .field--widget-entity-reference-paragraphs) .field-add-more-submit {
  margin-left: 18px;
  margin-bottom: 18px;
}

.fs-page-content .field--widget-entity-reference-paragraphs .form-wrapper > em {
  display: block;
  margin-left: 18px;
  color: #707070;
  font-size: 14px;
  font-weight: 400;
  font-style: normal;
}

.fs-page-content :is(.field--widget-paragraphs, .field--widget-entity-reference-paragraphs) :is(.paragraphs-icon-button-collapse, .paragraphs-icon-button-edit, .paragraphs-dropdown-toggle) {
  opacity: 0.8;
}

@media (max-width: 767.98px) {
  .fs-page-content :is(.field--widget-paragraphs, .field--widget-entity-reference-paragraphs) .field-multiple-table > thead > tr > th.field-label > h4 {
    top: 12px;
  }

  .fs-page-content :is(.field--widget-paragraphs, .field--widget-entity-reference-paragraphs) .field-multiple-table > tbody > tr > td.field-multiple-drag {
    width: 44px;
    min-width: 44px;
    border-left-width: 9px;
  }

  .fs-page-content .paragraphs-subform {
    padding-left: 9px;
  }

  .fs-page-content :is(.field--widget-paragraphs, .field--widget-entity-reference-paragraphs) .field-add-more-submit,
  .fs-page-content .field--widget-entity-reference-paragraphs .form-wrapper > em {
    margin-left: 9px;
  }
}
