.quote-editor-modal {
  height: min(920px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.quote-editor-modal form {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.quote-editor-modal .modal-head {
  flex: 0 0 auto;
}

.quote-editor-modal .quote-editor-body {
  flex: 1 1 auto;
  height: 0;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 36px;
  scroll-padding-bottom: 36px;
}

.quote-editor-modal .quote-editor-body::-webkit-scrollbar {
  width: 12px;
}

.quote-editor-modal .quote-editor-body::-webkit-scrollbar-track {
  background: #edf3f9;
}

.quote-editor-modal .quote-editor-body::-webkit-scrollbar-thumb {
  background: #9cb2c8;
  border: 3px solid #edf3f9;
  border-radius: 999px;
}

.quote-editor-modal .sticky-actions {
  position: static;
  flex: 0 0 auto;
  z-index: 2;
  margin-top: 0;
  box-shadow: 0 -8px 20px rgba(12, 47, 90, 0.06);
}

.quote-editor-modal textarea[name="terms"] {
  display: block;
  width: 100%;
  min-height: 92px;
  margin-top: 7px;
  resize: vertical;
}

.quote-editor-modal .quote-editor-body > .form-grid:last-child {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  padding-bottom: 8px;
}

.quote-editor-modal .quote-editor-body > .form-grid:last-child > label {
  grid-column: auto;
}

.quote-editor-modal .quote-editor-body > .form-grid:last-child > label:nth-child(2) {
  order: -1;
}

.quote-editor-modal .quote-editor-body > .form-grid:last-child textarea {
  min-height: 108px;
}

.quote-editor-modal .quote-catalog-tools {
  display: grid !important;
  grid-template-columns: minmax(300px, 1fr) 130px auto auto;
  flex: 1 1 720px;
  align-items: center;
  gap: 7px;
}

.quote-editor-modal .quote-catalog-tools input,
.quote-editor-modal .quote-catalog-tools select {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.quote-editor-modal .quote-catalog-tools input {
  border: 1px solid #cbdced;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.quote-catalog-search-wrap {
  position: relative;
  min-width: 0;
}

.quote-catalog-suggestions {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 310px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cbdced;
  border-radius: 10px;
  box-shadow: 0 15px 35px rgba(12, 47, 90, 0.2);
}

.quote-catalog-suggestions.open {
  display: block;
}

.quote-catalog-suggestions button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid #e5edf5;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.quote-catalog-suggestions button:last-child {
  border-bottom: 0;
}

.quote-catalog-suggestions button:hover,
.quote-catalog-suggestions button.active {
  background: #edf5fd;
}

.quote-catalog-suggestions button span,
.quote-catalog-suggestions button b,
.quote-catalog-suggestions button small {
  display: block;
}

.quote-catalog-suggestions button b {
  font-size: 10px;
  color: #173b65;
}

.quote-catalog-suggestions button small {
  margin-top: 3px;
  font-size: 8px;
  color: #6b7f95;
}

.quote-catalog-suggestions button strong {
  flex: none;
  color: #0878ed;
  font-size: 10px;
}

.quote-catalog-suggestions > p {
  margin: 0;
  padding: 13px;
  color: #6b7f95;
  font-size: 10px;
}

@media (max-width: 700px) {
  .quote-editor-modal {
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .quote-editor-modal .quote-editor-body > .form-grid:last-child {
    grid-template-columns: 1fr;
  }

  .quote-editor-modal .quote-catalog-tools {
    grid-template-columns: 1fr;
    width: 100%;
  }
}

@media (max-height: 720px) {
  .quote-editor-modal .modal-head {
    margin-bottom: 12px;
    padding-top: 14px;
    padding-bottom: 10px;
  }

  .quote-editor-modal .modal-head p:not(.eyebrow) {
    display: none;
  }
}
