/* Contact Form 7 → ACExpert BEM form styles */

.acexpert-cf7 .wpcf7 {
  margin: 0;
}

.acexpert-cf7 .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.acexpert-cf7 .wpcf7-form p {
  margin: 0;
}

.acexpert-cf7 .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.acexpert-cf7 input.wpcf7-form-control,
.acexpert-cf7 textarea.wpcf7-form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-divider, #e2e8f0);
  border-radius: 10px;
  background: var(--color-surface, #fff);
  font: inherit;
  color: var(--color-primary, #24385b);
  transition: all 0.2s ease-in-out;
  outline: none;
  box-sizing: border-box;
}

.acexpert-cf7 input.wpcf7-form-control:focus,
.acexpert-cf7 textarea.wpcf7-form-control:focus {
  border-color: var(--color-primary, #24385b);
  border-width: 2px;
  padding: calc(0.75rem - 1px) calc(1rem - 1px);
}

.acexpert-cf7 textarea.wpcf7-form-control {
  min-height: 90px;
  resize: vertical;
}

.acexpert-cf7 input.wpcf7-submit,
.acexpert-cf7 .wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  background: var(--color-primary, #24385b);
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s ease-in-out;
}

.acexpert-cf7 input.wpcf7-submit:hover,
.acexpert-cf7 .wpcf7-submit:hover {
  opacity: 0.9;
}

.acexpert-cf7 .wpcf7-not-valid-tip {
  font-size: 0.75rem;
  color: #c45c5c;
  margin-top: 0.25rem;
}

.acexpert-cf7 .wpcf7-response-output {
  margin: 0.5rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  border-width: 1px;
}

.acexpert-cf7 .wpcf7-acceptance,
.acexpert-cf7 .wpcf7-list-item {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
}

.acexpert-cf7 .wpcf7-list-item label {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
}

/* Consent line style (if used as free text in form) */
.acexpert-cf7 .form__consent,
.acexpert-cf7 .wpcf7-form > p:last-of-type {
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
  color: var(--color-primary, #24385b);
}

.acexpert-cf7--booking .wpcf7-submit {
  max-width: 20rem;
}

.acexpert-cf7--modal .wpcf7-form {
  gap: 0.85rem;
}

/* Управление отображением элементов после отправки формы */
.acexpert-cf7 .wpcf7-form.sent .form__field,
.acexpert-cf7 .wpcf7-form.sent .modal__hint,
.acexpert-cf7 .wpcf7-form.sent input.wpcf7-submit,
.acexpert-cf7 .wpcf7-form.sent .wpcf7-submit {
  display: none !important;
}

/* Стилизация блока сообщения об успешной отправке */
.acexpert-cf7 .wpcf7-form.sent .wpcf7-response-output {
  display: block !important;
  margin: 1rem 0 0 !important;
  padding: 1rem !important;
  border: 1px solid #10b981 !important;
  border-radius: 8px !important;
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
  font-size: 0.875rem !important;
  line-height: 1.4 !important;
  text-align: center !important;
}

/* Стилизация блока при ошибке отправки */
.acexpert-cf7 .wpcf7-form.invalid .wpcf7-response-output,
.acexpert-cf7 .wpcf7-form.failed .wpcf7-response-output {
  border: 1px solid #ef4444 !important;
  background-color: #fef2f2 !important;
  color: #991b1b !important;
  text-align: center !important;
}
