.al-widget { z-index: 1000; position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); color: #142742; font: 400 15px/1.5 system-ui, sans-serif; }
.al-widget *, .al-widget *::before, .al-widget *::after { box-sizing: border-box; }
.al-widget [hidden] { display: none !important; }
.al-widget button, .al-widget input { font: inherit; }
.al-widget button { cursor: pointer; }
.al-widget button:focus-visible, .al-widget a:focus-visible, .al-widget input:focus-visible { outline: 3px solid #1683d2; outline-offset: 2px; }
.al-launch { display: flex; align-items: center; gap: .55rem; margin-left: auto; border: 0; border-radius: 999px; padding: .82rem 1.15rem; background: #11599c; box-shadow: 0 8px 32px #10244036; color: white; font-weight: 700 !important; }
.al-launch span { font-size: 18px; line-height: 1; }
.al-panel { width: min(375px, calc(100vw - 32px)); max-height: min(580px, calc(100dvh - 94px)); display: flex; flex-direction: column; margin-bottom: 10px; overflow: hidden; background: #fff; border: 1px solid #d7e1ed; border-radius: 16px; box-shadow: 0 18px 52px #0a1e3c33; }
.al-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #112644; padding: 13px 15px; color: #fff; }
#al-widget .al-title { margin: 0; color: #fff !important; font-size: 17px; font-weight: 750; }
.al-header-actions { display: flex; align-items: center; gap: 4px; }
.al-header button { min-height: 36px; padding: 5px 9px; border: 1px solid #7387a3; border-radius: 7px; background: transparent; color: #fff; }
.al-close { font-size: 20px !important; line-height: 1 !important; }
.al-chat { min-height: 78px; overflow: auto; overscroll-behavior: contain; padding: 14px; background: #f6f9fd; }
.al-message { max-width: 92%; margin: 0 0 .65rem; padding: .64rem .75rem; border-radius: .85rem; background: #e7eff8; color: #172f4d; overflow-wrap: anywhere; }
.al-message:last-child { margin-bottom: 0; }
.al-user { margin-left: auto; background: #11599c; color: white; }
.al-actions { display: flex; flex-wrap: wrap; gap: .45rem; padding: 10px 14px 6px; }
.al-actions button { min-height: 36px; padding: 4px 9px; background: white; border: 1px solid #98b0cc; border-radius: 999px; color: #174d81; }
.al-contacts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 7px 14px 5px;
}
.al-widget .al-contacts a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .5rem .6rem;
    border: 1px solid #11599c;
    border-radius: 8px;
    background: #fff;
    color: #11599c;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}
.al-widget .al-contacts .al-book {
    background: #11599c;
    color: #fff;
}
.al-widget .al-contacts .al-book:hover { background: #0b487f; }
.al-widget .al-contacts .al-call:hover { background: #edf5fc; }
.al-form { display: flex; align-items: stretch; gap: .4rem; padding: 7px 14px 0; }
.al-form input { flex: 1; min-width: 0; width: 65%; padding: .48rem .65rem; border: 1px solid #98b0cc; border-radius: 8px; background: #fff; color: #142742; font-size: 16px; }
.al-form button { min-height: 44px; padding-inline: .7rem; border: 0; border-radius: 8px; background: #11599c; color: white; }
.al-form button:disabled { opacity: .6; }
.al-note { margin: 5px 14px 10px; color: #495d75; font-size: 12px; }
.al-status { margin: 0; padding: 0 14px; color: #495d75; }
.al-status:not(:empty) { padding-bottom: 5px; }
@media (max-width: 767px) {
    .al-widget { bottom: calc(71px + env(safe-area-inset-bottom, 0px)); }
    .al-panel { max-height: min(540px, calc(100dvh - 125px - env(safe-area-inset-bottom, 0px))); }
}
