/* ============================================================
   FORMS — общие элементы форм: ошибки, сетка полей, всплывающие
   сообщения об успехе/ошибке, модалка подтверждения, капча.
   Используется на всех страницах с формами (create_app, crm,
   dispatch, dashboard, public_company_form и т.д.).
   ============================================================ */

.errorlist {
    color: #e35f5f;
}

/* Текст ошибки под конкретным полем формы (create_pay, public_company_form) */
.field-error {
    color: #b94a48;
    margin-top: .35em;
}

/* Сброс браузерного оформления <fieldset> вокруг группы чекбоксов (customization) */
.fieldset-reset {
    border: 0;
    padding: 0;
    margin: .5em 0;
}

/* Превью логотипа УК на публичной форме заявки и странице успеха */
.company-logo-preview {
    width: 180px;
    height: 180px;
    object-fit: contain;
    pointer-events: none;
}

/* Платёжные иконки (МИР/Visa/Mastercard) в блоке оплаты (customization) */
.payment-icon {
    height: 1em;
    width: auto;
    vertical-align: middle;
    padding-top: .5em;
}

/* Pure Grids: канавки между колонками формы (по доке Pure) */
.pure-g.form-grid > [class*="pure-u"] {
    box-sizing: border-box;
    padding-left: .5rem;
    padding-right: .5rem;
}

/* выравниваем ряд так, чтобы крайние поля совпадали с контейнером */
.form-grid { margin-left: -.5rem; margin-right: -.5rem; }

/* единый вертикальный отступ между блоками формы */
.form-field { margin-bottom: 1em; }

.success-message {
    position: fixed;
    color: whitesmoke;
    top: 95%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: mediumseagreen;
    padding: 20px;
    border-radius: 5px;
    z-index: 999;
    width: 350px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.success-message.show {
    opacity: 1;
}

#captcha-container {
    display: flex;
    justify-content: center;
    width: 400px;
    margin: 0 auto;
}

/* Резерв места под виджет капчи */
.captcha-reserved { min-height: 120px; display: flex; align-items: center; }

.blurred-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
}

.message-box {
    position: fixed;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #557a95;
    border-radius: .5em;
    line-height: 2em;
    padding: 2em;
    z-index: 1001;
    text-align: center;
    opacity: 1;
    transition: opacity 1s ease;
}

.fade-out {
    opacity: 0;
    transition: opacity 1s ease;
}

.alert-success {
    color: mediumseagreen;
    font-weight: 700;
}

.alert-error {
    color: #e35f5f;
    font-weight: 700;
}
