.catalog-download-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.catalog-download-modal[hidden] {
  display: none;
}

.catalog-download-modal__overlay {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(8, 25, 28, 0.58);
  cursor: pointer;
}

.catalog-download-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 32px 32px 28px;
  border: 1px solid rgba(12, 32, 36, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 70px rgba(10, 36, 32, 0.18);
}

.catalog-download-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(12, 32, 36, 0.06);
  color: rgba(20, 28, 34, 0.72);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.catalog-download-modal__close:hover {
  background: rgba(0, 122, 112, 0.1);
  color: #0b4f49;
}

.catalog-download-modal__title {
  margin: 0 40px 10px 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: #141c22;
}

.catalog-download-modal__intro {
  margin: 0 0 22px;
  color: rgba(20, 28, 34, 0.7);
  font-size: 15px;
  line-height: 1.65;
}

.catalog-download-form {
  display: grid;
  gap: 16px;
}

.catalog-download-form .field {
  display: grid;
  gap: 8px;
}

.catalog-download-form .field span {
  color: rgba(20, 28, 34, 0.78);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.catalog-download-form .field input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(12, 32, 36, 0.1);
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: #141c22;
  font: inherit;
}

.catalog-download-form .field input:focus {
  border-color: rgba(0, 122, 112, 0.32);
}

.catalog-download-form .button-primary {
  width: 100%;
  margin-top: 4px;
  border: 1px solid transparent;
  background: #0b4f49;
  color: #fff;
  box-shadow: 0 14px 30px rgba(0, 122, 112, 0.28);
  cursor: pointer;
}

.catalog-download-form .button-primary:hover {
  background: #008b7f;
}

.catalog-download-form .button-primary:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

.catalog-download-modal__message {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.catalog-download-modal__message[hidden] {
  display: none;
}

.catalog-download-modal__message.is-success {
  border-color: rgba(0, 122, 112, 0.16);
  background: rgba(0, 122, 112, 0.08);
  color: rgba(11, 79, 73, 0.92);
}

.catalog-download-modal__message.is-error {
  border-color: rgba(181, 58, 58, 0.16);
  background: rgba(181, 58, 58, 0.08);
  color: rgba(122, 34, 34, 0.9);
}

body.catalog-download-modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .catalog-download-modal {
    padding: 16px;
  }

  .catalog-download-modal__dialog {
    padding: 28px 22px 22px;
    border-radius: 22px;
  }

  .catalog-download-modal__title {
    font-size: 24px;
  }
}
