/* ============================================================================
 * callback.css — floating "Заказать звонок" button + modal.
 *
 * Style goals (per UX brief):
 *   - rectangular (NOT a circular "support pellet")
 *   - monochrome in --primary; soft shadow; no bounce/pulse animations
 *   - desktop: ~180×48 with label; mobile: 56×56 icon-only
 * ========================================================================== */

.callback-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;

    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    height: 48px;

    background: var(--primary, #333333);
    color: var(--text-on-dark, #fff);
    border: none;
    border-radius: 28px;
    font: 600 14px/1 'Open Sans', system-ui, sans-serif;
    letter-spacing: 0.01em;

    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.callback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
    background: var(--primary-hover, #1a1a1a);
}
.callback-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.callback-btn svg { flex-shrink: 0; }
.callback-btn__label { white-space: nowrap; }

@media (max-width: 720px) {
    .callback-btn {
        right: 16px;
        bottom: 76px;             /* clear the mobile bottom-bar */
        padding: 0;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        justify-content: center;
    }
    .callback-btn__label { display: none; }
}

/* ---------------------- Modal ---------------------- */

.callback-modal-bg {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(20, 22, 28, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 180ms ease;
}
.callback-modal-bg.callback-modal--open { opacity: 1; }

.callback-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px 28px 24px;
    width: 100%;
    max-width: 380px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(8px);
    transition: transform 220ms ease;
}
.callback-modal-bg.callback-modal--open .callback-modal { transform: translateY(0); }

.callback-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-dim, #454547);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 120ms ease;
}
.callback-modal__close:hover { background: var(--bg-soft, #f4f4f6); }

.callback-modal__title {
    font: 700 22px/1.2 'Montserrat', 'Open Sans', system-ui, sans-serif;
    color: var(--text, #1a1a1a);
    margin: 0 0 18px;
}

.callback-modal__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.callback-modal__form input[name="name"],
.callback-modal__form input[name="phone"] {
    padding: 12px 16px;
    border: 1px solid var(--border, #e6eaf0);
    border-radius: 12px;
    font-size: 15px;
    background: #fff;
    color: var(--text, #1a1a1a);
    transition: border-color 120ms ease;
}
.callback-modal__form input[name="name"]:focus,
.callback-modal__form input[name="phone"]:focus {
    outline: none;
    border-color: var(--primary, #333333);
}

.callback-modal__submit {
    margin-top: 6px;
    padding: 13px 16px;
    background: var(--primary, #333333);
    color: #fff;
    border: none;
    border-radius: 12px;
    font: 600 14px/1 'Open Sans', system-ui, sans-serif;
    cursor: pointer;
    transition: background-color 120ms ease;
}
.callback-modal__submit:hover  { background: var(--primary-hover, #1a1a1a); }
.callback-modal__submit:disabled { opacity: 0.6; cursor: progress; }

.callback-modal__sub {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-mute, #8a93a6);
    text-align: center;
}

.callback-modal__error {
    background: #ffe6e6;
    color: #b30000;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
}

/* ---------------------- Success state ---------------------- */

.callback-modal__success {
    text-align: center;
    padding: 8px 0;
}
.callback-modal__success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--primary, #333333);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
}
.callback-modal__success-title {
    font: 700 18px/1.3 'Montserrat', 'Open Sans', system-ui, sans-serif;
    color: var(--text, #1a1a1a);
    margin-bottom: 4px;
}
