/* Composer sizing and layering fix for seasonal themes. */
html[data-season="autumn"] .composer-editor {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 200px !important;
  height: 200px !important;
  max-height: 200px !important;
  contain: none !important;
  overflow: visible !important;
}

html[data-season="autumn"] .composer-editor > textarea {
  position: relative !important;
  z-index: 2 !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 200px !important;
  height: 200px !important;
  max-height: 200px !important;
  margin: 0 !important;
  padding: 0 18px 12px 0 !important;
  resize: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  scrollbar-gutter: stable !important;
  box-sizing: border-box !important;
}

html[data-season="autumn"] .composer-editor > .composer-markup {
  position: absolute !important;
  inset: 0 18px 0 0 !important;
  z-index: 1 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 200px !important;
  height: 200px !important;
  max-height: 200px !important;
  margin: 0 !important;
  padding: 0 0 12px 0 !important;
  pointer-events: none !important;
  contain: none !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Permanent viewport: React expanded/collapsed state cannot resize the input. */
html[data-season="autumn"] .composer[data-composer-expanded="true"] .composer-editor,
html[data-season="autumn"] .composer[data-composer-expanded="false"] .composer-editor,
html[data-season="autumn"] .composer-editor {
  min-height: 200px !important;
  height: 200px !important;
  max-height: 200px !important;
}

html[data-season="autumn"] .composer[data-composer-expanded="true"] .composer-editor > textarea,
html[data-season="autumn"] .composer[data-composer-expanded="false"] .composer-editor > textarea,
html[data-season="autumn"] .composer-editor > textarea {
  min-height: 200px !important;
  height: 200px !important;
  max-height: 200px !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable !important;
}

html[data-season="autumn"] .composer[data-composer-expanded="true"] .composer-editor > .composer-markup,
html[data-season="autumn"] .composer[data-composer-expanded="false"] .composer-editor > .composer-markup,
html[data-season="autumn"] .composer-editor > .composer-markup {
  min-height: 200px !important;
  height: 200px !important;
  max-height: 200px !important;
}

/* The text-formatting popover uses the three-line menu icon. */
html[data-season="autumn"] .composer-format-button svg { display: none !important; }
html[data-season="autumn"] .composer-format-button::before {
  content: '☰';
  display: block;
  font-size: 16px;
  line-height: 1;
  font-family: Arial, sans-serif;
}

html[data-season="autumn"] .composer-editor > textarea::-webkit-scrollbar { width: 8px; }
html[data-season="autumn"] .composer-editor > textarea::-webkit-scrollbar-track { background: transparent; border-radius: 999px; }
html[data-season="autumn"] .composer-editor > textarea::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.32);
  border: 2px solid transparent;
  border-radius: 8px;
  background-clip: padding-box;
}
html[data-season="autumn"] .composer-editor > textarea::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.48); }

@media (max-width: 680px) {
  html[data-season="autumn"] .composer,
  html[data-season="autumn"] .composer-body {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  html[data-season="autumn"] .composer {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    position: relative !important;
  }

  html[data-season="autumn"] .composer-body {
    flex: 0 0 auto !important;
  }

  html[data-season="autumn"] .composer-editor {
    flex: 0 0 200px !important;
  }

  html[data-season="autumn"] .composer-footer {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    flex: 0 0 auto !important;
    clear: both !important;
    margin-top: 12px !important;
  }

  html[data-season="autumn"] .composer-editor,
  html[data-season="autumn"] .composer-editor > textarea,
  html[data-season="autumn"] .composer-editor > .composer-markup {
    min-height: 200px !important;
    height: 200px !important;
    max-height: 200px !important;
  }

  html[data-season="autumn"] .composer-editor > textarea {
    padding: 0 18px 12px 0 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  html[data-season="autumn"] .composer-editor > .composer-markup {
    inset: 0 18px 0 0 !important;
    padding: 0 0 12px 0 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  html[data-season="autumn"] .site-footer {
    position: relative !important;
    clear: both !important;
    margin-top: 0 !important;
  }
}
