/* Scoped to controls inserted into the verified DeStyle CRM form. */
.b24-form [data-destyle-phone] {
    position: relative; z-index: 20; display: grid; grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 8px; align-items: start;
}
.b24-form [data-destyle-phone] > .destyle-phone-country + div { min-width: 0; }
.b24-form [data-destyle-phone] > .destyle-phone-ui:last-child { grid-column: 1 / -1; }
.b24-form .destyle-phone-country { position: relative; min-width: 0; }
.b24-form .destyle-phone-country summary {
    display: flex; align-items: center; justify-content: center; gap: 9px; box-sizing: border-box;
    min-height: 52px; padding: 0 8px; border: 1px solid #d8d8d8; border-radius: 4px;
    background: #f8f8f8; cursor: pointer; list-style: none;
}
.b24-form .destyle-phone-country summary::-webkit-details-marker { display: none; }
.b24-form .destyle-phone-country summary::after {
    content: ''; width: 7px; height: 7px; flex: none;
    border-right: 1.5px solid #666; border-bottom: 1.5px solid #666;
    transform: translateY(-2px) rotate(45deg);
}
.b24-form .destyle-phone-options {
    position: absolute; z-index: 10; top: calc(100% + 4px); left: 0; width: 235px; max-width: calc(100vw - 32px);
    max-height: 280px; overflow-y: auto; padding: 4px; border: 1px solid #dedede; border-radius: 6px;
    background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
.b24-form .destyle-phone-options button {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px;
    border: 0; border-radius: 4px; background: transparent; color: #333; text-align: left;
    font: inherit; font-size: 14px; line-height: 1.3; cursor: pointer;
}
.b24-form .destyle-phone-options button:hover, .b24-form .destyle-phone-options button[aria-pressed="true"] { background: #f4f4f4; }
.b24-form .destyle-phone-flag {
    display: inline-block; flex: none; width: 28px; height: 18px;
    background: center / contain no-repeat; filter: drop-shadow(0 0 0.5px rgba(0, 0, 0, .25));
}
.b24-form .destyle-phone-flag--by { background-image: url('phone-flags/by.svg'); }
.b24-form .destyle-phone-flag--ru { background-image: url('phone-flags/ru.svg'); }
.b24-form .destyle-phone-flag--kz { background-image: url('phone-flags/kz.svg'); }
.b24-form .destyle-phone-flag--am { background-image: url('phone-flags/am.svg'); }
.b24-form .destyle-phone-flag--az { background-image: url('phone-flags/az.svg'); }
.b24-form .destyle-phone-flag--kg { background-image: url('phone-flags/kg.svg'); }
.b24-form .destyle-phone-flag--uz { background-image: url('phone-flags/uz.svg'); }
.b24-form .destyle-phone-flag--tj { background-image: url('phone-flags/tj.svg'); }
.b24-form .destyle-phone-flag--tm { background-image: url('phone-flags/tm.svg'); }
.b24-form .destyle-phone-hint, .b24-form .destyle-phone-error {
    margin: 7px 0 0; font: inherit; font-size: 13px; font-weight: 400; line-height: 1.45; overflow-wrap: anywhere;
}
.b24-form .destyle-phone-hint { color: #777; }
.b24-form .destyle-phone-error { color: #a12435; }
.b24-form .destyle-phone-error:empty { display: none; }
.b24-form .destyle-phone-retry {
    min-height: 44px; padding: 8px 12px; background: #fff; color: #222;
    border: 1px solid #767676; border-radius: 4px; font: inherit; cursor: pointer;
}
.b24-form .destyle-phone-retry[hidden] { display: none; }
.b24-form .destyle-phone-country summary:focus-visible, .b24-form .destyle-phone-options button:focus-visible,
.b24-form .destyle-phone-retry:focus-visible {
    outline: 3px solid #b64450; outline-offset: 3px;
}

/* Use the accessible inline message instead of Bitrix's overlapping tooltip for this field. */
.b24-form [data-destyle-phone] .b24-form-control-alert-message { display: none !important; }
