/* ===========================================
   MEDCOPY — Contacts Page Styles
   =========================================== */

.contacts-page {
  padding-top: 48px;
  padding-bottom: 80px;
  position: relative;
}

.contacts-page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.contacts-page-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.contacts-title {
  font-family: 'PT Serif', serif;
  font-size: 48px;
  font-weight: 700;
  color: #3F413E;
}

.contacts-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #3F413E;
  max-width: 800px;
  line-height: 2.1;
}

.contacts-subtitle .highlight {
  font-weight: 600;
}

.contacts-page-body {
  margin-top: 64px;
  display: flex;
  gap: 100px;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
}

/* Contacts info blocks */
.contacts-info {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 26px;
  text-decoration: none;
}

.contact-text-wrapper {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #506251;
}

.contact-text-wrapper svg {
  display: none;
  /* Hide arrows on PC */
}

.contact-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid #E5E5E5;
  padding: 10px;
  background-color: #FFFFFF;
}

.contact-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.contact-text {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #506251;
}

/* Form Card */
.contacts-form-card {
  width: 100%;
  width: 500px;
  background-color: #FFFFFF;
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.contacts-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.form-label {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #3F413E;
}

.form-input,
.form-textarea {
  width: 100%;
  height: 56px;
  background-color: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  padding: 0 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #3F413E;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
  border-color: #506251;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #BABABA;
}

.form-textarea {
  height: auto;
  min-height: 140px;
  padding: 16px;
  resize: none;
}

.submit-btn {
  width: 100%;
  height: 56px;
  background-color: #506251;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}
@media (hover: hover) and (pointer: fine) {
.submit-btn:hover {
  background-color: #3e4c3f;
}
}

@media (max-width: 768px) {
  .contacts-page-body {
    flex-direction: column;
    gap: 64px;
  }

  .contacts-title {
    font-size: 36px;
  }

  .contacts-form-card {
    padding: 32px 24px;
    width: 100%;
  }

  .contacts-page-wrapper,
  .contacts-page-header {
    align-items: flex-start;
    text-align: left;
  }

  .contact-text-wrapper svg {
    display: block;
  }
}

/* Состояние ошибки */
.form-input.is-invalid,
.form-textarea.is-invalid {
  border-color: #d9534f;
  background-color: #fff8f8;
}

/* Текст ошибки под полем (изначально скрыт) */
.error-message {
  display: none;
  color: #d9534f;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  margin-top: 4px;
}

/* Показываем текст, если есть ошибка */
.form-input.is-invalid+.error-message,
.form-textarea.is-invalid+.error-message {
  display: block;
}

/* Блок успешной отправки */
.success-message-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  animation: fadeIn 0.5s ease;
}

.success-icon {
  width: 64px;
  height: 64px;
  background-color: #E8F5E9;
  color: var(--color-primary, #506251);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.success-icon svg {
  width: 32px;
  height: 32px;
}

.success-title {
  font-family: 'PT Serif', serif;
  font-size: 28px;
  font-weight: 700;
  color: #3F413E;
  margin-bottom: 12px;
}

.success-text {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #3F413E;
  line-height: 1.5;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Checkbox Styles */
.checkbox-group {
  margin-top: 16px;
  margin-bottom: 24px;
}

.checkbox {
  --checkbox-color: var(--color-primary);
  --checkbox-size: 1.5rem;
  display: block;
  position: relative;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.5;
}

.checkbox input {
  position: absolute;
  pointer-events: none;
  inset: 0;
  opacity: 0;
}

.checkbox .checkmark {
  display: flex;
  align-items: flex-start;
  gap: calc(var(--checkbox-size) / 2.5);
  opacity: 0.7;
  transition: opacity 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
.checkbox .checkmark:hover {
  opacity: 0.85;
}
}

.checkbox input:checked ~ .checkmark {
  opacity: 1;
}

.checkbox .checkmark svg {
  width: var(--checkbox-size);
  height: var(--checkbox-size);
  flex-shrink: 0;
  margin-top: -2px;
}

.checkbox .checkmark svg rect {
  stroke-dasharray: 88 0;
  stroke-dashoffset: 73;
  transition: stroke-dasharray 100ms ease;
}

.checkbox input:checked ~ .checkmark svg rect {
  stroke-dasharray: 80 18;
}

.checkbox .checkmark svg polyline {
  stroke-dasharray: 0 30;
  stroke-dashoffset: 1;
  transition: stroke-dasharray 150ms ease;
}

.checkbox input:checked ~ .checkmark svg polyline {
  stroke-dasharray: 30 30;
}

.policy-link {
  color: var(--color-primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}
@media (hover: hover) and (pointer: fine) {
.policy-link:hover {
  color: #334033; /* Slightly darker */
}
}

/* Submit button conditional states */
.submit-btn {
  transition: background-color 0.4s ease, opacity 0.4s ease, transform 0.2s ease;
}

.submit-btn.disabled-state {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: auto; /* To allow hovering and showing not-allowed */
}
