.mt-editor-dot,
.mt-editor-panel,
.mt-editor-toolbar,
.mt-editor-bar,
.mt-editor-image-modal {
  box-sizing: border-box;
  font-family: Outfit, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mt-editor-dot {
  position: fixed;
  z-index: 2147483000;
  right: 18px;
  bottom: 18px;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(107, 142, 127, 0.38);
  border-radius: 50%;
  background: #dfceb0;
  box-shadow: 0 12px 30px rgba(45, 74, 62, 0.24);
  cursor: pointer;
}

.mt-editor-panel {
  position: fixed;
  z-index: 2147483020;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 100vw);
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #fffaf1;
  color: #2d4a3e;
  box-shadow: -28px 0 70px rgba(25, 35, 32, 0.26);
  transform: translateX(105%);
  transition: transform 240ms ease;
}

.mt-editor-panel.open {
  transform: translateX(0);
}

.mt-editor-head,
.mt-editor-foot {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(45, 74, 62, 0.14);
}

.mt-editor-foot {
  border-top: 1px solid rgba(45, 74, 62, 0.14);
  border-bottom: 0;
}

.mt-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.mt-editor-head strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.mt-editor-head small,
.mt-editor-hint {
  display: block;
  margin-top: 6px;
  color: rgba(45, 74, 62, 0.7);
  font-size: 13px;
  line-height: 1.5;
}

.mt-editor-close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(45, 74, 62, 0.18);
  border-radius: 50%;
  background: transparent;
  color: #2d4a3e;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.mt-editor-body {
  overflow: auto;
  padding: 20px;
}

.mt-editor-block {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.mt-editor-block > strong {
  color: #6b8e7f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mt-editor-field {
  display: grid;
  gap: 6px;
}

.mt-editor-field span {
  color: rgba(45, 74, 62, 0.74);
  font-size: 12px;
  font-weight: 700;
}

.mt-editor-field input,
.mt-editor-field select,
.mt-editor-field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(45, 74, 62, 0.18);
  background: #fff;
  color: #2d4a3e;
  padding: 0 12px;
  font: inherit;
}

.mt-editor-field textarea {
  min-height: 130px;
  padding: 12px;
  resize: vertical;
}

.mt-editor-actions,
.mt-editor-grid {
  display: grid;
  gap: 10px;
}

.mt-editor-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mt-editor-actions button,
.mt-editor-panel button:not(.mt-editor-close),
.mt-editor-bar button,
.mt-editor-image-card button {
  min-height: 42px;
  border: 1px solid rgba(45, 74, 62, 0.16);
  background: #6b8e7f;
  color: #fffaf1;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.mt-editor-actions button.secondary,
.mt-editor-bar button.secondary,
.mt-editor-image-card button.secondary {
  background: transparent;
  color: #fffaf1;
}

.mt-editor-image-card button.secondary {
  background: #fffaf1;
  color: #2d4a3e !important;
  border-color: rgba(45, 74, 62, 0.24);
}

.mt-editor-image-card button.secondary:hover,
.mt-editor-image-card button.secondary:focus {
  background: rgba(107, 142, 127, 0.12);
  border-color: rgba(45, 74, 62, 0.38);
}

.mt-editor-panel .secondary {
  color: #2d4a3e !important;
}

.mt-editor-error {
  display: none;
  margin: 0;
  padding: 10px 12px;
  background: #fff0ea;
  color: #a3422e;
  font-size: 13px;
  font-weight: 700;
}

.mt-editor-error.visible {
  display: block;
}

.mt-editor-forgot {
  justify-self: start;
  min-height: auto !important;
  border: 0 !important;
  background: transparent !important;
  color: #6b8e7f !important;
  padding: 2px 0 !important;
  cursor: pointer;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-transform: uppercase;
}

.mt-editor-forgot:hover,
.mt-editor-forgot:focus {
  color: #2d4a3e !important;
}

body.mt-editor-editing [data-mt-editable] {
  outline: 1px dashed rgba(223, 206, 176, 0.86);
  outline-offset: 4px;
  cursor: text;
}

body.mt-editor-editing [data-mt-editable]:hover,
body.mt-editor-editing [data-mt-editable]:focus {
  background: rgba(223, 206, 176, 0.13);
  outline: 2px solid rgba(107, 142, 127, 0.74);
}

body.mt-editor-editing [data-mt-image-editable] {
  cursor: copy;
  outline: 1px dashed rgba(223, 206, 176, 0.86);
  outline-offset: 5px;
}

body.mt-editor-editing [data-mt-image-editable]:hover {
  filter: saturate(1.04) brightness(1.02);
  outline: 2px solid rgba(107, 142, 127, 0.76);
}

.mt-editor-toolbar {
  position: absolute;
  z-index: 2147483030;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  max-width: min(92vw, 650px);
  padding: 6px;
  background: rgba(45, 74, 62, 0.98);
  color: #fffaf1;
  box-shadow: 0 16px 40px rgba(25, 35, 32, 0.3);
}

.mt-editor-toolbar[hidden],
.mt-editor-file-input {
  display: none;
}

.mt-editor-toolbar button,
.mt-editor-toolbar label {
  display: grid;
  min-width: 36px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fffaf1;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.mt-editor-toolbar label {
  position: relative;
  overflow: hidden;
}

.mt-editor-toolbar input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.mt-editor-bar {
  position: fixed;
  z-index: 2147483010;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  max-width: min(1240px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid rgba(223, 206, 176, 0.44);
  background: rgba(45, 74, 62, 0.98);
  color: #fffaf1;
  box-shadow: 0 18px 50px rgba(25, 35, 32, 0.36);
}

.mt-editor-bar[hidden] {
  display: none;
}

.mt-editor-bar strong {
  flex: 0 0 auto;
  color: #dfceb0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mt-editor-bar span {
  flex: 1 1 210px;
  max-width: 260px;
  color: rgba(255, 250, 241, 0.78);
  font-size: 13px;
  line-height: 1.45;
}

.mt-editor-bar em {
  flex: 0 0 auto;
  color: rgba(223, 206, 176, 0.9);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.mt-editor-bar label {
  display: grid;
  flex: 1 1 210px;
  gap: 3px;
  min-width: 190px;
  max-width: 260px;
}

.mt-editor-bar small {
  color: rgba(255, 250, 241, 0.6);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mt-editor-bar select {
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fffaf1;
  padding: 0 9px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.mt-editor-bar select option {
  color: #2d4a3e;
}

.mt-editor-bar button {
  flex: 0 0 auto;
  min-width: 112px;
  padding: 0 12px;
  white-space: nowrap;
}

.mt-editor-image-chip-layer {
  position: absolute;
  z-index: 2147483008;
  inset: 0 auto auto 0;
  pointer-events: none;
}

.mt-editor-image-chip {
  position: absolute;
  min-width: 78px;
  height: 36px;
  border: 1px solid rgba(223, 206, 176, 0.78);
  background: rgba(45, 74, 62, 0.96);
  color: #fffaf1;
  box-shadow: 0 12px 32px rgba(25, 35, 32, 0.28);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: auto;
}

.mt-editor-image-chip::before {
  content: "+";
  margin-right: 6px;
  color: #dfceb0;
}

.mt-editor-image-modal {
  position: fixed;
  z-index: 2147483040;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(30, 42, 38, 0.62);
}

.mt-editor-image-modal[hidden] {
  display: none;
}

.mt-editor-image-card {
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  background: #fffaf1;
  color: #2d4a3e;
  box-shadow: 0 28px 80px rgba(25, 35, 32, 0.34);
}

.mt-editor-image-card strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 31px;
  font-weight: 500;
}

.mt-editor-image-card p {
  margin: 0;
  color: rgba(45, 74, 62, 0.72);
  line-height: 1.6;
}

.mt-editor-image-card label {
  display: grid;
  gap: 8px;
}

.mt-editor-image-card input {
  min-height: 46px;
  border: 1px solid rgba(45, 74, 62, 0.18);
  padding: 0 12px;
  font: inherit;
}

.mt-editor-image-card > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 640px) {
  .mt-editor-dot {
    right: 14px;
    bottom: 14px;
  }

  .mt-editor-panel {
    width: 100vw;
  }

  .mt-editor-grid {
    grid-template-columns: 1fr;
  }

  .mt-editor-bar {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    right: 10px;
    bottom: 10px;
    left: 10px;
    gap: 7px;
    max-height: 34vh;
    overflow: auto;
    padding: 9px;
  }

  .mt-editor-bar strong {
    grid-column: 1;
    align-self: center;
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .mt-editor-bar span {
    display: none;
  }

  .mt-editor-bar em {
    grid-column: 2;
    align-self: center;
    overflow: hidden;
    font-size: 10px;
    text-align: right;
    text-overflow: ellipsis;
  }

  .mt-editor-bar label {
    grid-column: 1 / -1;
    min-width: 0;
    max-width: none;
  }

  .mt-editor-bar button {
    min-width: 0;
    min-height: 40px;
    width: 100%;
    padding: 0 8px;
    font-size: 10px;
    letter-spacing: 0.06em;
  }

  body.mt-editor-editing {
    padding-bottom: 230px;
  }

  .mt-editor-image-card > div {
    grid-template-columns: 1fr;
  }
}
