/* ========== ВИДЖЕТ (СКРЫТЫЙ ПО УМОЛЧАНИЮ) ========== */
.messenger-fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Основной виджет — карточка с кнопками */
.messenger-widget {
   /* background: #ffffff;
    border-radius: 28px;
    width: 320px;
    max-width: calc(100vw - 48px);*/
    /*box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.1);*/
    overflow: hidden;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    transform-origin: bottom right;
    margin-bottom: 16px;
    opacity: 0;
    transform: scale(0.85);
    visibility: hidden;
    pointer-events: none;
}

/* Класс для показа виджета */
.messenger-widget.active {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
    pointer-events: auto;
}

/* Стили внутри виджета (адаптированы под компактность) */
.widget-header {
    background: #1f2b3c;
    padding: 1rem 1.2rem;
    color: white;
    text-align: center;
}

.widget-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.widget-header h3 i {
    font-size: 1.3rem;
    color: #ffd966;
}

.widget-header p {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 4px;
}

.widget-body {
    /*padding: 1.2rem 1rem 1.2rem 1rem;*/
    /*background: #fff;*/
}

.buttons-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.messenger-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 50%;
    padding: 0.5rem;
    text-decoration: none;
    color: #1a2634;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    cursor: pointer;
}

.btn-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-left i {
    font-size: 1.6rem;
    /*width: 28px;*/
    text-align: center;
}

.btn-name {
    font-size: 0.9rem;
}

.btn-right {
    background: #f0f2f5;
    border-radius: 30px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: normal;
    color: #4a627a;
}

.btn-right i {
    font-size: 0.7rem;
    margin-left: 4px;
}

/* Цветные эффекты при ховере (такие же) */
.btn-telegram {
    background: #e8f4ff;
    border-color: #27a6e5;
   /* transform: translateX(4px);*/
}
.btn-telegram .btn-left i { color: #27a6e5; }

.btn-whatsapp {
    background: #e6f9ef;
    border-color: #25D366;
    /*transform: translateX(4px);*/
}
.btn-whatsapp .btn-left i { color: #25D366; }

.btn-viber svg {
    width: 25px;
    height: 25px;
    /* transform: translateX(4px);*/
}
.btn-viber svg path {
    fill:#1a2634;
}
.btn-viber {
    background: #f3eefc;
    border-color: #7360f2;
   /* transform: translateX(4px);*/
}
.btn-viber .btn-left svg path { fill: #7360f2; }

.btn-vk {
    background: #eff2ff;
    border-color: #0077ff;
   /* transform: translateX(4px);*/
}
.btn-vk .btn-left i { color: #0077ff; }

.btn-discord {
    background: #eceaff;
    border-color: #5865F2;
    /*transform: translateX(4px);*/
}
.btn-discord .btn-left i { color: #5865F2; }

.btn-signal {
    background: #e8f2fe;
    border-color: #3b76f0;
    /*transform: translateX(4px);*/
}
.btn-signal .btn-left i { color: #3b76f0; }

.widget-footer {
    background: #f8fafd;
    border-top: 1px solid #e9edf2;
    padding: 0.6rem;
    text-align: center;
    font-size: 0.6rem;
    color: #5c6f87;
}

/* ===== ПЛАВАЮЩАЯ КНОПКА ВЫЗОВА ===== */
.fab-button {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #2b5f8a, #1f3e54);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.25s ease;
    border: none;
    color: white;
    font-size: 26px;
    z-index: 1002;
    position: relative;
}

.fab-button:hover {
    transform: scale(1.07);
    background: linear-gradient(135deg, #367bb0, #264c69);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.3);
}

.fab-button:active {
    transform: scale(0.96);
}

/* Анимация пульсации (необязательная, для привлечения внимания) */
.fab-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(43, 95, 138, 0.4);
    z-index: -1;
    animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    70% {
        transform: scale(1.35);
        opacity: 0;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Адаптив для мобильных */
@media (max-width: 480px) {
   /* .messenger-widget {
        width: 290px;
    }*/
    .fab-button {
        width: 52px;
        height: 52px;
        font-size: 24px;
    }
    .btn-left i {
        font-size: 1.4rem;
        width: 24px;
    }
    .btn-name {
        font-size: 0.85rem;
    }
}