/* Callback request form (assets/js/lead-form.js). */

.lead-form {
    display: grid;
    gap: 14px;
    max-width: 560px;
}

.lead-form__row {
    display: grid;
    gap: 6px;
}

.lead-form label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.lead-form input[type="text"],
.lead-form input[type="tel"] {
    width: 100%;
    /* 48px tall: this form is filled on a phone more often than not. */
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
}

.lead-form input::placeholder {
    color: rgba(245, 245, 245, 0.35);
}

.lead-form input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.lead-form__hint {
    color: var(--muted);
    font-size: 12px;
}

.lead-form__captcha-note {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.lead-form__consent {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

/* The box starts empty and the visitor ticks it; nothing here is pre-agreed. */
.lead-form__consent input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--accent);
    flex: 0 0 auto;
}

.lead-form__consent a {
    color: var(--accent);
}

.lead-form__submit {
    justify-self: start;
    min-height: 48px;
}

.lead-form__status {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
}

.lead-form__status:empty {
    display: none;
}

.lead-form__status--error {
    color: #ff8f8f;
}

.lead-form__status--ok {
    color: #6ee79a;
}

@media (max-width: 700px) {
    .lead-form__submit {
        justify-self: stretch;
        width: 100%;
        text-align: center;
    }
}

/* "Узнать цену" on a product card opens the same form in a dialog. */
.price-dialog {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    margin: auto;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    color: var(--text);
    overflow: auto;
    overscroll-behavior: contain;
}

.price-dialog::backdrop {
    background: rgba(0, 0, 0, 0.72);
}

.price-dialog__close {
    float: right;
    width: 40px;
    height: 40px;
    margin: -6px -6px 0 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.price-dialog__close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.price-dialog__title {
    margin: 0;
    font-size: 22px;
}

.price-dialog__product {
    margin: 6px 0 0;
    color: var(--accent);
    font-size: 15px;
    font-weight: 700;
}

.price-dialog__note {
    margin: 10px 0 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.price-dialog .lead-form {
    max-width: none;
}

@media (max-width: 480px) {
    .price-dialog {
        padding: 18px;
    }
}
