#mgu-floating-chat-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 99999;
    transition: transform 0.15s cubic-bezier(.4,1.6,.7,1.2), box-shadow 0.15s;
}
#mgu-floating-chat-btn button {
    background: none;
    color: #fff;
    border: none;
    width: 70px;
    height: 70px;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.18s cubic-bezier(.4,1.6,.7,1.2), box-shadow 0.18s;
}
#mgu-floating-chat-btn.mgu-float-btn-hover,
#mgu-floating-chat-btn button:hover {
    transform: scale(1.08) rotate(-4deg);
}
#mgu-floating-chat-btn button span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
#mgu-floating-chat-window {
    position: fixed;
    bottom: 110px;
    right: 40px;
    width: 400px;
    max-width: 98vw;
    z-index: 99999;
    display: none;
    transition: box-shadow 0.18s, transform 0.18s cubic-bezier(.4,1.6,.7,1.2);
}
#mgu-floating-chat-window.mgu-chat-window-hover {
    transform: translateY(-7px) scale(1.012);
    box-shadow: 0 16px 48px #3ca7ff38, 0 2px 12px #1859b220;
}
#mgu-floating-chat-window > div {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px #0004;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 540px;
    border: 2.5px solid #3ca7ff30;
}
#mgu-floating-chat-window > div > div:first-child {
    background: linear-gradient(90deg, #1859b2 80%, #3ca7ff 100%);
    color: #fff;
    padding: 14px 18px;
    font-size: 19px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: Montserrat, Arial, sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #3070d030;
}
#mgu-floating-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 23px;
    cursor: pointer;
    margin-left: 15px;
}
#mgu-floating-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 17px 13px 7px 13px;
    background: #f6f8fa;
}
.mgu-message-wrap {
    display: flex;
    margin-bottom: 10px;
}
.mgu-message-wrap.right {
    justify-content: flex-end;
}
.mgu-message-wrap.left {
    justify-content: flex-start;
}
.mgu-message {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 15.5px;
    word-break: break-word;
    box-shadow: 0 1px 6px #0001;
    transition: background 0.18s, color 0.18s;
    padding: 10px 16px;
    border-radius: 20px 20px 7px 20px;
    max-width: 74%;
    background: #e7f0fd;
    color: #1859b2;
    position: relative;
    opacity: 0.97;
}
.mgu-message.user {
    background: linear-gradient(135deg, #1859b2 60%, #3ca7ff 100%);
    color: #fff;
    border-radius: 20px 20px 20px 7px;
    align-self: flex-end;
    box-shadow: 0 2px 12px #3ca7ff30;
}
.mgu-message.bot {
    background: #e9f7fb;
    color: #1859b2;
    border-radius: 20px 20px 7px 20px;
    align-self: flex-start;
    box-shadow: 0 1px 6px #3070d01a;
}
.typing-dots {
    display: inline-block;
    vertical-align: middle;
    height: 1.2em;
}
.typing-dots span {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin: 0 2px;
    background: #3ca7ff;
    border-radius: 50%;
    opacity: 0.7;
    animation: mgu-dot-anim 1.2s infinite;
}
.typing-dots span:nth-child(2) {
    animation-delay: 0.25s;
}
.typing-dots span:nth-child(3) {
    animation-delay: 0.5s;
}
@keyframes mgu-dot-anim {
    0%, 80%, 100% { opacity: 0.4; transform: translateY(0);}
    40% { opacity: 1; transform: translateY(-4px);}
}
#mgu-floating-chat-window > div > div:last-child {
    padding: 13px 13px 15px 13px;
    border-top: 1px solid #e3e8ee;
    background: #f2f4f7;
    display: flex;
    gap: 10px;
    align-items: center;
}
.mgu-social-row {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 14px 0 10px 0;
}
.mgu-social-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}
#mgu-floating-chat-input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1.5px solid #3ca7ff;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    background: #fff;
    transition: border 0.18s;
    min-width: 0;
}
#mgu-floating-chat-input:focus {
    border-color: #1859b2;
}
#mgu-floating-chat-send {
    background: transparent;
    color: #3ca7ff;
    border: 1.5px solid #3ca7ff;
    border-radius: 10px;
    padding: 10px 17px;
    font-size: 20px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 1px 8px #3ca7ff10;
    transition: background 0.18s, box-shadow 0.18s, transform 0.18s, border 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}
#mgu-floating-chat-send:hover {
    background: #e7f0fd;
    border-color: #1859b2;
    color: #1859b2;
    box-shadow: 0 4px 16px #3ca7ff33;
    transform: scale(1.06);
}
#mgu-floating-chat-send img {
    width: 33px;
    height: 33px;
    display: block;
    object-fit: contain;
    background: transparent;
}
.mgu-menu-btn#mgu-mainmenu-open {
    background: transparent;
    color: #3ca7ff;
    border: 1.5px solid #3ca7ff;
    border-radius: 10px;
    padding: 7px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 2px;
    cursor: pointer;
    box-shadow: 0 1px 8px #3ca7ff12;
    transition: background 0.18s, box-shadow 0.18s, transform 0.18s, border 0.18s;
}
.mgu-menu-btn#mgu-mainmenu-open:hover {
    background: #e7f0fd;
    border-color: #1859b2;
    color: #1859b2;
    box-shadow: 0 3px 12px #3ca7ff22;
    transform: scale(1.04);
}
.mgu-menu-icon {
    width: 23px;
    height: 23px;
    display: block;
}

/* Меню как чат-сообщение */
.mgu-menu-message {
    background: #f7fbff;
    color: #1859b2;
    border-radius: 14px;
    box-shadow: 0 6px 18px #3ca7ff0a;
    border: 1.5px solid #3ca7ff;
    padding: 16px 10px 14px 10px;
    min-width: 220px;
    max-width: 100%;
    margin-bottom: 4px;
    position: relative;
    animation: fadeInMenu .23s cubic-bezier(.6,1.4,.7,1.2);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.mgu-menu-message .mgu-menu-float-close {
    position: absolute;
    top: 8px;
    left: 8px;
    background: transparent;
    border: none;
    color: #3070d0;
    font-size: 20px;
    cursor: pointer;
    z-index: 100001;
    padding: 2px 7px;
    border-radius: 7px;
    transition: background 0.17s, color 0.17s;
}
.mgu-menu-message .mgu-menu-float-close:hover {
    background: #e7f0fd;
    color: #1859b2;
}
.mgu-menu-dropdown {
    position: relative;
    width: 100%;
    font-family: 'Montserrat', Arial, sans-serif;
    margin-top: 0;
}
.mgu-menu-toggle {
    background: #fafdff;
    color: #1859b2;
    border: none;
    border-radius: 10px;
    padding: 10px 10px 10px 0;
    font-size: 18px;
    font-family: inherit;
    font-weight: 700;
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    gap: 12px;
    transition: background 0.18s, color 0.18s;
    margin-bottom: 13px;
    box-shadow: 0 2px 8px #3ca7ff09;
}
.mgu-menu-toggle:hover,
.mgu-menu-toggle:focus {
    background: #e7f0fd;
    color: #1859b2;
}
.mgu-menu-toggle-arrow {
    width: 20px;
    height: 20px;
    margin-right: 7px;
    margin-left: 2px;
    transition: transform 0.22s cubic-bezier(.4,1.3,.7,1.2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.mgu-menu-toggle-arrow svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke: #3ca7ff;
    stroke-width: 2.1;
    fill: none;
}
.mgu-menu-dropdown.open .mgu-menu-toggle-arrow {
    transform: rotate(-180deg);
}
.mgu-menu-toggle-text {
    font-size: 18px;
    font-family: inherit;
    font-weight: 700;
    text-align: center;
    flex: 1;
}
.mgu-menu-options {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    z-index: 100000;
    display: flex !important;
    flex-direction: column;
    padding: 0;
    margin-top: 0;
    gap: 7px;
}
.mgu-menu-option {
    background: #fafdff;
    color: #1859b2;
    border: 1.2px solid #3ca7ff;
    border-radius: 7px;
    padding: 8px 14px 8px 32px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background 0.15s, color 0.15s, border 0.15s;
    position: relative;
    gap: 9px;
}
.mgu-menu-option span {
    font-size: 18px;
    margin-right: 7px;
    display: inline-block;
}
.mgu-menu-option:hover,
.mgu-menu-option:focus {
    background: #e7f0fd;
    color: #1859b2;
    border-color: #1859b2;
}
.mgu-menu-anim-show {
    animation: fadeInMenu .23s cubic-bezier(.6,1.4,.7,1.2);
}
@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(-14px);}
    to   { opacity: 1; transform: translateY(0);}
}