/* Contact / «Написать нам» modal */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.contact-modal[hidden] {
  display: none !important;
}

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
}

.contact-modal__dialog {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(480px, 100%);
  max-width: 100%;
  max-height: min(92vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  padding: 1.5rem 1.45rem 1.55rem;
  outline: none;
}

.contact-modal__accent {
  height: 4px;
  width: 56px;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #0039A6 0%, #0699D8 45%, #D52B1E 100%);
}

.contact-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: #F1F5F9;
  color: #475569;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.contact-modal__close:hover,
.contact-modal__close:focus-visible {
  background: #E2E8F0;
  color: #0F172A;
  outline: none;
}

.contact-modal__title {
  margin: 0 0 0.35rem;
  padding-right: 2.5rem;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #0F172A;
}

.contact-modal__lead {
  margin: 0 0 1rem;
  color: #64748B;
  font-size: 0.95rem;
  line-height: 1.5;
}

.contact-modal__status {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
  background: #F0F9FF;
  color: #0369A1;
  border: 1px solid #BAE6FD;
}

.contact-modal__status.is-error {
  background: #FEF2F2;
  color: #B91C1C;
  border-color: #FECACA;
}

.contact-modal__status.is-success {
  background: #ECFDF5;
  color: #047857;
  border-color: #A7F3D0;
}

.contact-modal__form .form-group {
  margin-bottom: 0.85rem;
}

.contact-modal__form label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.contact-modal__form input,
.contact-modal__form textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  border: 1px solid #E2E8F0;
  background: #fff;
  color: #0F172A;
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.contact-modal__form .pdn-consent {
  max-width: 100%;
}

.contact-modal__form .pdn-consent__text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-modal__form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-modal__form input:focus,
.contact-modal__form textarea:focus {
  outline: none;
  border-color: #0699D8;
  box-shadow: 0 0 0 3px rgba(6, 153, 216, 0.15);
}

.contact-modal__submit {
  width: 100%;
  margin-top: 0.35rem;
}

.contact-modal__submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

html.contact-modal-open,
html.contact-modal-open body {
  overflow: hidden;
}
