.flow-lead {
    box-sizing: border-box;
    width: min(30rem, calc(100% - 2rem));
    max-height: calc(100dvh - 2rem);
    padding: 0;
    overflow: auto;
    border: 1px solid var(--line, #dce4e8);
    border-radius: 18px;
    background: var(--surface, #fff);
    color: var(--text, #17242c);
    box-shadow: 0 20px 55px rgb(0 0 0 / 22%);
}

.flow-lead::backdrop {
    background: rgb(11 23 32 / 56%);
}

html:has(.flow-lead[open]) {
    overflow: hidden;
}

.flow-lead__panel {
    padding: clamp(1rem, 4vw, 1.5rem);
}

.flow-lead__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.flow-lead__header h2 {
    margin: 0;
    font-size: 1.375rem;
    line-height: 1.2;
}

.flow-lead__close {
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 12px;
    background: #5a9bf8;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.flow-lead__form {
    display: grid;
    gap: .875rem;
}

.flow-lead__form :is(input, select),
.flow-lead__phone {
    box-sizing: border-box;
    width: 100%;
    min-height: 2.875rem;
    padding: .5rem .75rem;
    border: 1px solid var(--line, #dce4e8);
    border-radius: 10px;
    background: var(--surface, #fff);
    color: inherit;
    font: inherit;
    font-size: 1rem;
    font-weight: 400;
}

.flow-lead__phone {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-block: 0;
}

.flow-lead__phone-prefix {
    flex: none;
    user-select: none;
}

.flow-lead__form .flow-lead__phone input {
    min-width: 0;
    min-height: 0;
    padding: .5rem 0;
    border: 0;
    background: transparent;
    outline: 0;
}

.flow-lead__phone:focus-within,
.flow-lead :focus-visible {
    outline: 2px solid var(--accent-strong, #4b6773);
    outline-offset: 2px;
}

.flow-lead__form small {
    color: var(--muted, #53636c);
    font-size: .8125rem;
}

.flow-lead__status {
    margin: 1rem 0 0;
}

.flow-lead__status:empty,
.flow-lead [hidden] {
    display: none;
}

.flow-lead__contacts {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.flow-lead__contacts > button {
    flex: 0 0 100%;
}

.flow-lead .flow-lead__contact {
    box-sizing: border-box;
    flex: 1 0 auto;
    justify-content: center;
    gap: .5rem;
    min-height: 2.875rem;
    padding: .375rem .75rem;
    border: 1px solid rgb(9 30 64 / 16%);
    border-radius: .875rem;
    background-color: #5a9bf8;
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 26%), 0 2px 5px rgb(9 30 64 / 12%);
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
    transition: box-shadow .15s ease, border-color .15s ease;
}

.flow-lead .flow-lead__contact:hover {
    border-color: rgb(9 30 64 / 35%);
    background-color: #5a9bf8;
    color: #091e40;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 26%), 0 4px 9px rgb(9 30 64 / 18%);
}

.flow-lead .flow-lead__contact:active {
    box-shadow: inset 0 1px 3px rgb(9 30 64 / 20%);
}

.flow-lead .flow-lead__contact-icon {
    box-sizing: border-box;
    width: 1.625rem;
    height: 1.625rem;
    flex: none;
    padding: .3125rem;
    border-radius: .5rem;
    background-color: rgb(255 255 255 / 35%);
}

@media (max-width: 48.75em) {
    .flow-lead {
        inset-block: env(safe-area-inset-top, 0px) auto;
        margin-block: 0;
        max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }

    .flow-lead__panel {
        padding: .75rem;
    }

    .flow-lead__header {
        margin-bottom: .5rem;
    }

    .flow-lead__form,
    .flow-lead__contacts {
        gap: .375rem;
    }

    .flow-lead__contacts,
    .flow-lead__status {
        margin-top: .5rem;
    }

    .flow-lead .flow-lead__contact {
        gap: .25rem;
        min-height: 2.75rem;
        padding-inline: .25rem;
        font-size: .8125rem;
    }

    .flow-lead .flow-lead__contact-icon {
        width: 1.25rem;
        height: 1.25rem;
        padding: .1875rem;
    }
}
