/*
 * HPA Messages — contact.css
 * Читаемый исходный CSS. Порядок правил сохранён из версии 1.3.2.
 */

/* ==========================================================================
   01. Общие параметры формы и цвета
   ========================================================================== */

.hpa-contact {
    --hpa-contact-ink: #252930;
    --hpa-contact-gold: #80602d;
    --hpa-contact-line: #d9d2c7;
    max-width: 800px;
    margin: 0 auto;
    color: var(--hpa-contact-ink);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
}

.hpa-contact * {
    box-sizing: border-box;
}

/* ==========================================================================
   02. Вступление и вспомогательные подписи
   ========================================================================== */

.hpa-contact__intro {
    font-size: 18px;
    line-height: 1.65;
    margin: 0 0 12px;
}

.hpa-contact__required,
.hpa-contact__privacy {
    color: #57534d;
    font-size: 14px;
}

/* ==========================================================================
   03. Поля формы и двухколоночная раскладка
   ========================================================================== */

.hpa-contact fieldset {
    padding: 0;
    margin: 0;
    border: 0;
    min-width: 0;
}

.hpa-contact__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.hpa-contact__field {
    margin: 0 0 21px;
    min-width: 0;
}

.hpa-contact label {
    display: block;
    color: var(--hpa-contact-ink);
    font-weight: 600;
    margin: 0 0 7px;
}

.hpa-contact input,
.hpa-contact textarea,
.hpa-contact select {
    display: block;
    width: 100%;
    max-width: 100%;
    font: inherit;
    line-height: 1.5;
    color: var(--hpa-contact-ink);
    background: #fff;
    border: 1px solid var(--hpa-contact-line);
    border-radius: 4px;
    padding: 11px 13px;
    box-shadow: none;
    min-height: 48px;
}

.hpa-contact textarea {
    resize: vertical;
    min-height: 180px;
}

/* ==========================================================================
   04. Фокус, ошибки полей и уведомления
   ========================================================================== */

.hpa-contact :is(input,textarea,select,button,summary,a):focus-visible {
    outline: 3px solid #80602d;
    outline-offset: 3px;
}

.hpa-contact [aria-invalid=true] {
    border: 2px solid #ac2727;
}

.hpa-contact__error {
    display: block;
    color: #962424;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 5px;
}

.hpa-contact__error:empty {
    display: none;
}

.hpa-contact__notice {
    margin: 16px 0;
    padding: 12px 16px;
    background: #f0ece4;
    border-left: 3px solid var(--hpa-contact-gold);
    overflow-wrap: anywhere;
}

.hpa-contact__notice:empty {
    display: none;
}

.hpa-contact__notice[data-kind=error] {
    background: #fff1ef;
    border-color: #ac2727;
}

.hpa-contact__notice[data-kind=success] {
    background: #eef4ed;
    border-color: #3a6842;
}

/* ==========================================================================
   05. Отправка, повторная проверка и состояние ожидания
   ========================================================================== */

.hpa-contact__send,
.hpa-contact__refresh {
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--hpa-contact-gold);
    border-radius: 3px;
    min-height: 48px;
    padding: 11px 22px;
    color: #fff;
    background: var(--hpa-contact-gold);
}

.hpa-contact__send:hover {
    background: #654b23;
    color: #fff;
}

.hpa-contact__send span {
    margin-left: 16px;
}

.hpa-contact__refresh {
    color: var(--hpa-contact-ink);
    background: transparent;
    margin-top: 12px;
}

.hpa-contact button:disabled {
    cursor: wait;
    opacity: .65;
}

/* ==========================================================================
   06. Дополнительные сведения и защита формы
   ========================================================================== */

.hpa-contact__context {
    margin: 0 0 20px;
}

.hpa-contact__context summary {
    cursor: pointer;
    min-height: 40px;
    padding: 6px 0;
    font-weight: 600;
}

.hpa-contact__context summary span {
    font-weight: 400;
    color: #57534d;
}

.hpa-contact__context[open] .hpa-contact__field {
    margin-top: 10px;
}

.hpa-contact__challenge {
    margin: 16px 0;
    min-height: 0;
}

/* ==========================================================================
   07. Конфиденциальность и служебные скрытые элементы
   ========================================================================== */

.hpa-contact__privacy {
    margin: 18px 0;
}

.hpa-contact__privacy a {
    color: #755528;
    text-decoration: underline;
}

.hpa-contact__trap,
.hpa-contact__sr {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

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

/* ==========================================================================
   08. Адаптация формы: ширина до 600 px
   ========================================================================== */

@media (max-width:600px) {
    .hpa-contact__row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hpa-contact__send {
        width: 100%;
    }

    .hpa-contact__intro {
        font-size: 17px;
    }

}

/* ==========================================================================
   09. Фон формы и согласие на публикацию
   ========================================================================== */

.hpa-contact {
    background: #FAF8F5;
    border: 1px solid #ddd5c9;
    border-radius: 8px;
    padding: 28px;
}

.hpa-contact .hpa-contact__permission {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f0ece4;
    padding: 16px;
    border-radius: 5px;
    font-weight: 400;
    font-size: 14px;
}

.hpa-contact .hpa-contact__permission input {
    flex: 0 0 auto;
    width: 19px;
    min-height: 19px;
    height: 19px;
    margin-top: 4px;
    padding: 0;
    accent-color: #80602d;
}

.hpa-contact__field label span {
    font-weight: 400;
    color: #57534d;
}

/* ==========================================================================
   10. Компактные отступы: ширина до 560 px
   ========================================================================== */

@media (max-width:560px) {
    .hpa-contact {
        padding: 18px;
    }

}

