.feature-menu-layout-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
  padding: 12px;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(180deg, #f4f6f8 0%, #eef1f4 100%);
}

.feature-menu-layout-page__filters,
.feature-menu-layout-page__editor-shell {
  box-sizing: border-box;
  border: 1px solid #d6dde5;
  border-radius: 0;
  background: #f8fafc;
  box-shadow: none;
}

.feature-menu-layout-page__filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
}

.feature-menu-layout-page__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature-menu-layout-page__field-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #51606f;
  text-transform: uppercase;
}

.feature-menu-layout-page__select.ant-select,
.feature-menu-layout-page__select .ant-select-selector,
.feature-menu-layout-page__textarea.ant-input {
  border-radius: 0;
}

.feature-menu-layout-page__select .ant-select-selector,
.feature-menu-layout-page__textarea.ant-input {
  border-color: #c8d1db;
  background: #fff;
  box-shadow: none;
}

.feature-menu-layout-page__run-button.ant-btn {
  height: 44px;
  width: 44px;
  min-width: 44px;
  padding-inline: 0;
  border-radius: 0;
  justify-content: center;
}

.feature-menu-layout-page__editor-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  padding: 10px;
  overflow: hidden;
}

.feature-menu-layout-page__editor-fields {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  box-sizing: border-box;
  height: 100%;
  overflow: hidden;
}

.feature-menu-layout-page__textarea.ant-input {
  border-radius: 0;
  display: block;
  width: 100%;
  box-sizing: border-box;
  align-self: stretch;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none;
  overflow-y: auto !important;
  resize: none;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.65;
  color: #16202a;
}

.feature-menu-layout-page__textarea.ant-input::placeholder {
  color: #8a97a6;
}

.feature-menu-layout-page__editor-toolbar {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #d6dde5;
}

.feature-menu-layout-page__empty {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.feature-menu-layout-page__tabs {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.feature-menu-layout-page__tabs .ant-tabs-content-holder,
.feature-menu-layout-page__tabs .ant-tabs-content,
.feature-menu-layout-page__tabs .ant-tabs-tabpane,
.feature-menu-layout-page__tabs .ant-tabs-tabpane-active {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
}

.feature-menu-layout-page__tabs .ant-tabs-nav {
  margin: 0 0 8px;
  align-items: center;
  border-bottom: 1px solid #d6dde5;
  padding-bottom: 8px;
}

.feature-menu-layout-page__tabs .ant-tabs-tab {
  border-radius: 0;
}

.feature-menu-layout-page__tabs .ant-tabs-nav::before {
  display: none;
}

.feature-menu-layout-page__tabs .ant-tabs-nav-list {
  min-width: 0;
}

.feature-menu-layout-page__tabs .ant-tabs-nav-wrap {
  min-width: 0;
}

.feature-menu-layout-page__tab-actions {
  justify-content: flex-start;
}

.feature-menu-layout-page__tab-actions .ant-btn {
  width: 40px;
  min-width: 40px;
  padding-inline: 0;
  border-radius: 0;
  box-shadow: none;
}

.feature-menu-layout-page__notes {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  border: 1px solid #d6dde5;
  background: #fff;
  padding: 14px 16px;
  overflow: auto;
  padding-bottom: 28px;
}

.feature-menu-layout-page__notes--empty {
  align-items: center;
  justify-content: center;
}

.feature-menu-layout-page__notes-body.ant-typography {
  margin-bottom: 0;
  white-space: pre-wrap;
  color: #16202a;
}

.feature-menu-layout-page__notes-empty.ant-empty {
  margin-block: 0;
}

.feature-menu-layout-page--editor-maximized {
  padding: 0;
}

.feature-menu-layout-page--editor-maximized .feature-menu-layout-page__filters {
  display: none;
}

.feature-menu-layout-page--editor-maximized .feature-menu-layout-page__editor-shell {
  position: fixed;
  inset: 16px;
  z-index: 40;
  padding: 12px;
  background: #f8fafc;
}

@media (min-width: 960px) {
  .feature-menu-layout-page__filters {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
    align-items: end;
  }

  .feature-menu-layout-page__run-button.ant-btn {
    min-width: 44px;
  }
}

@media (max-width: 720px) {
  .feature-menu-layout-page {
    grid-template-rows: auto minmax(0, 1fr);
    padding: 4px 4px calc(2px + env(safe-area-inset-bottom, 0px));
    gap: 3px;
    overflow: hidden;
  }

  .feature-menu-layout-page__filters {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 6px;
    row-gap: 6px;
  }

  .feature-menu-layout-page__filters,
  .feature-menu-layout-page__editor-shell {
    padding: 3px;
  }

  .feature-menu-layout-page__editor-shell {
    grid-template-rows: auto minmax(0, 1fr);
    align-self: stretch;
    height: 100%;
  }

  .feature-menu-layout-page__field:first-of-type {
    grid-column: 1 / -1;
  }

  .feature-menu-layout-page__editor-toolbar {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .feature-menu-layout-page__tabs .ant-tabs-nav {
    align-items: flex-start;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .feature-menu-layout-page__tabs .ant-tabs-nav-list {
    width: 100%;
  }

  .feature-menu-layout-page__tabs,
  .feature-menu-layout-page__tabs .ant-tabs-content-holder,
  .feature-menu-layout-page__tabs .ant-tabs-content,
  .feature-menu-layout-page__tabs .ant-tabs-tabpane,
  .feature-menu-layout-page__tabs .ant-tabs-tabpane-active {
    height: 100%;
    overflow: hidden;
  }

  .feature-menu-layout-page__editor-fields {
    grid-template-rows: minmax(0, 1fr);
    height: 100%;
    overflow: hidden;
  }

  .feature-menu-layout-page__textarea.ant-input {
    align-self: stretch;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none;
    padding: 8px 10px;
  }

  .feature-menu-layout-page__notes {
    height: 100%;
    max-height: none;
    padding: 7px 12px 7px;
    padding-bottom: 7px;
  }

  .feature-menu-layout-page__tab-actions .ant-btn,
  .feature-menu-layout-page__run-button.ant-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  .feature-menu-layout-page--editor-maximized .feature-menu-layout-page__editor-shell {
    inset: 6px;
    padding: 6px;
  }
}
