/* Contact form page styles */

/* Модальное окно подтверждения (капча) */
.contact-captcha-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

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

.contact-captcha-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 39, 68, 0.45);
  backdrop-filter: blur(4px);
}

.contact-captcha-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--trust-white, #fffcf8);
  border: 1px solid rgba(26, 77, 110, 0.12);
  border-radius: 16px;
  box-shadow:
    0 4px 0 rgba(61, 124, 107, 0.06) inset,
    0 24px 56px rgba(15, 39, 68, 0.18);
  padding: 1.5rem 1.5rem 1.25rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.contact-captcha-modal__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--trust-deep, #0f2744);
  margin: 0 0 1rem;
  padding-right: 2rem;
}

.contact-captcha-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: var(--trust-cream, #f6f3ed);
  border-radius: 8px;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--trust-muted, #5c6b7a);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-captcha-modal__close:hover {
  background: var(--trust-cream-dark, #e8e2d6);
  color: var(--trust-deep, #0f2744);
}

/* Кнопка «Отправить» в модалке — в тон сайта */
.contact-captcha-modal .contact-modal-submit.btn-primary {
  background: linear-gradient(135deg, var(--trust-sage, #3d7c6b) 0%, #2f6b5c 100%);
  border-color: var(--trust-sage, #3d7c6b);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(61, 124, 107, 0.32);
}

.contact-captcha-modal .contact-modal-submit.btn-primary:hover {
  background: linear-gradient(135deg, var(--trust-sage-light, #5a9d8a) 0%, var(--trust-sage, #3d7c6b) 100%);
  border-color: var(--trust-sage-light, #5a9d8a);
  box-shadow: 0 6px 18px rgba(61, 124, 107, 0.38);
}

.contact-form-success {
  background: linear-gradient(135deg, #e8f5e9 0%, #e3f2fd 100%);
  border: 1px solid #c8e6c9;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  color: #1b5e20;
  font-size: 1.05rem;
  line-height: 1.5;
}

/* Ошибки валидации формы контактов */
.contact-form-errors {
  border: 1px solid #e53935;
  background: #ffebee;
  color: #b71c1c;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.45;
}

.contact-form-errors ul {
  margin: 0;
  padding-left: 1.25rem;
}

.contact-form-errors li {
  margin: 0.2em 0;
}

#tt-pageContent .input-box input.contact-field-error,
#tt-pageContent .input-box textarea.contact-field-error {
  outline: 2px solid #e53935;
  outline-offset: 0;
  background: #fff8f7;
  border-radius: 5px;
}


/* При расчете размеров инпутов учитываем внутренние отступы и границы */
#tt-pageContent input,
#tt-pageContent textarea {
  box-sizing: border-box;
}

/* Стили самой формы — в одной визуальной системе с trust-theme */
#tt-pageContent .content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--trust-white, #fffcf8);
  padding: 40px;
  border-radius: 16px;
  border: 1px solid rgba(26, 77, 110, 0.1);
  box-shadow:
    0 4px 0 rgba(61, 124, 107, 0.05) inset,
    0 16px 48px var(--trust-shadow, rgba(15, 39, 68, 0.12));
}

/* Стили левой колонки */
#tt-pageContent .left-side {
  width: 25%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Стили разделительной линии между левой и правой колонкой */
#tt-pageContent .left-side::before {
  content: "";
  position: absolute;
  height: 70%;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    rgba(61, 124, 107, 0.45) 0%,
    var(--trust-ocean, #1a4d6e) 50%,
    rgba(61, 124, 107, 0.35) 100%
  );
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
}

/* Стили правой колонки */
#tt-pageContent .right-side {
  width: 75%;
  margin-left: 75px;
}

/* Элементы левой колонки: адрес, телефон, email */
#tt-pageContent .details {
  margin-bottom: 15px;
  text-align: center;
}

/* Общие стили для иконок */
#tt-pageContent .details i {
  font-size: 25px;
  color: var(--trust-sage, #3d7c6b);
  margin-bottom: 10px;
}

/* Стили для заголовков левой колонки */
#tt-pageContent .topic {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 7px;
}

/* Стили для текста левой колонки */
#tt-pageContent .text-one,
#tt-pageContent .text-two {
  font-size: 14px;
  color: var(--trust-muted, #5c6b7a);
}

/* Заголовок правой колонки */
#tt-pageContent .topic-text {
  font-size: 23px;
  font-weight: 600;
  color: var(--trust-deep, #0f2744);
  margin-bottom: 10px;
}

/* Текст правой колонки */
#tt-pageContent .right-side p {
  margin-bottom: 20px;
  color: var(--trust-muted, #5c6b7a);
  line-height: 1.55;
}

/* Контейнер для input'ов формы */
#tt-pageContent .input-box {
  height: 50px;
  width: 100%;
  margin-bottom: 20px;
}

/* Стили для input и textarea (поле сообщение) */
#tt-pageContent .input-box input,
#tt-pageContent .input-box textarea {
  height: 100%;
  width: 100%;
  border: 1px solid rgba(26, 77, 110, 0.14);
  border-radius: 10px;
  background: rgba(255, 252, 248, 0.98);
  padding: 0 20px;
  color: var(--trust-ink, #1a2332);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#tt-pageContent .input-box input::placeholder,
#tt-pageContent .input-box textarea::placeholder {
  color: rgba(92, 107, 122, 0.72);
}

#tt-pageContent .input-box input:focus,
#tt-pageContent .input-box textarea:focus {
  outline: none;
  border-color: var(--trust-sage, #3d7c6b);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(61, 124, 107, 0.18);
}

/* Отдельно стилизуем поле сообщение */
#tt-pageContent .input-box textarea {
  resize: none;
  padding: 20px;
  font-family: "Plus Jakarta Sans", "Krub", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Это контейнер для поля сообщение */
#tt-pageContent .message-box {
  min-height: 110px;
}

/* Стили для контейнера кнопки */
#tt-pageContent .button {
  display: inline-block;
}

/* Стили для самой кнопки — спокойный акцент, «живой», без агрессивного фиолетового */
#tt-pageContent .button input[type="button"] {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--trust-sage, #3d7c6b) 0%, #2d6b5c 100%);
  outline: none;
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(61, 124, 107, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#tt-pageContent .button input[type="button"]:hover {
  background: linear-gradient(135deg, var(--trust-sage-light, #5a9d8a) 0%, var(--trust-sage, #3d7c6b) 100%);
  box-shadow: 0 6px 22px rgba(61, 124, 107, 0.42);
  transform: translateY(-1px);
}

#tt-pageContent .button input[type="button"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(61, 124, 107, 0.3);
}

/* Меняем стили при ширине экрана меньше 800px */
@media (max-width: 800px) {
  #tt-pageContent .content {
    height: 100%;
    flex-direction: column-reverse;
  }

  #tt-pageContent .left-side {
    margin-top: 50px;
    flex-direction: row;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  #tt-pageContent .details {
    margin-right: 20px;
  }
  #tt-pageContent .details:last-child {
    margin-right: 0;
  }

  #tt-pageContent .left-side::before {
    display: none;
  }

  #tt-pageContent .right-side {
    width: 100%;
    margin-left: 0;
  }
}
