.order-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  align-items: center;
  justify-content: center;
}

.order-modal.open {
  display: flex;
}

.order-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(46, 38, 48, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: omOverlayIn 0.22s ease both;
}

@keyframes omOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.order-modal__window {
  position: relative;
  z-index: 1;
  background: #faf8f8;
  border-radius: 12px;
  width: 100%;
  /* чуть уже, убираем большой отступ снизу */
  max-width: 640px;
  min-width: 420px;
  margin: 0 16px;
  padding: 36px 32px 36px; /* обычный нижний паддинг, без большого резерва */
  box-shadow: 0 20px 60px rgba(46, 38, 48, 0.16);
  animation: omWindowIn 0.28s cubic-bezier(0.34, 1.3, 0.64, 1) both;
  overflow: hidden;
}

@keyframes omWindowIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.order-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.order-modal__close:hover {
  background: #ede6ed;
  border-color: #c8b8c8;
}

.order-modal__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: #3e323e;
  margin-bottom: 6px;
}

.order-modal__form {
  display: flex;
  flex-direction: column;
  /* Согласовать расстояние между полями с .auth-form */
  gap: 18px;
}

.om-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 300;
  color: #3e323e;
}

/* Inputs and textarea look similar to auth (.af-input) */
.om-input {
  font-family: 'Jost', sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
  color: #3e323e;
  background: #f3eef3;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  transition: border-color 0.2s, background 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.om-input::placeholder { color: #c0b0c0; }
.om-input:focus { border-color: #8B7B8B; background: #fff; }

.om-input.error { border-color: #c07070; background: #fff8f8; }

/* Select styling aligned with auth inputs */
.om-select {
  font-family: 'Jost', sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
  color: #3e323e;
  background: #f3eef3;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238B7B8B' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}

.om-select:focus { border-color: #8B7B8B; background: #fff; }

.om-select option { color: #3e323e; }

.om-input.error,
.om-select.error { border-color: #c07070; }

.om-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.om-chips--wrap { flex-wrap: wrap; }

.om-chip {
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: #4a3d4a;
  /* сделать чипы похожими на инпуты авторизации */
  background: #f3eef3;
  border: 1px solid #ddd0dd;
  border-radius: 50px;
  padding: 7px 16px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  white-space: nowrap;
  line-height: 1;
}

.om-chip:hover {
  border-color: #8B7B8B;
  background: #f3eef3;
}

.om-chip.selected {
  background: #4a3d4a;
  border-color: #4a3d4a;
  color: #fff;
}

.om-submit-row {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}


.om-submit {
  font-family: 'Jost', sans-serif;
  font-size: 0.86rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: #3e323e;
  background: #f3eef3;
  border: 1px solid #ddd0dd;
  border-radius: 8px;
  padding: 13px 40px;
  cursor: pointer;
  transition: background 0.22s, border-color 0.22s, color 0.22s;
}
.om-submit:hover {
  background: #4a3d4a;
  border-color: #4a3d4a;
  color: #fff;
}

.om-success {
  display: none;
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 16px; /* чуть ближе к краю теперь */
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 12px 0 8px;
  box-sizing: border-box;
}

.om-success.visible { display: flex; }

.om-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e0f0e8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.om-success-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: #3e323e;
}

.om-success-sub {
  font-family: 'Jost', sans-serif;
  font-size: 0.84rem;
  font-weight: 300;
  color: #7a6a7a;
  line-height: 1.6;
}

@media (max-width: 480px) {
  .order-modal__window {
    padding: 28px 20px 26px;
  }

  .order-modal__title {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }

  .om-chips { flex-wrap: wrap; }

  .om-submit { width: 100%; padding: 13px; }
}