/* ============================================
   ВИДЖЕТ СВЯЗИ В НИЖНЕМ ПРАВОМ УГЛУ
   ============================================ */

.messenger-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Open Sans', sans-serif;
}

.messenger-widget__button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.messenger-widget__button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.messenger-widget__button-icon {
    width: 30px;
    height: 30px;
    fill: white;
}

.messenger-widget__popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.messenger-widget__popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.messenger-widget__popup::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.messenger-widget__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.messenger-widget__icon svg {
    width: 100%;
    height: 100%;
}

.messenger-widget__title {
    font-size: 18px;
    font-weight: 700;
    color: #2C2C2C;
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.3;
}

.messenger-widget__description {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

.messenger-widget__buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.messenger-widget__link {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 12px;
}

.messenger-widget__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: white;
}

.messenger-widget__link--max {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.messenger-widget__link--telegram {
    background: #0088cc;
}

.messenger-widget__link--email {
    background: #2C2C2C;
}

.messenger-widget__link-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.messenger-widget__link-icon svg {
    width: 100%;
    height: 100%;
    fill: white;
}

.messenger-widget__note {
    font-size: 12px;
    color: #666;
    text-align: center;
    line-height: 1.4;
}

.messenger-widget__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.messenger-widget__close:hover {
    opacity: 1;
}

.messenger-widget__close-icon {
    width: 14px;
    height: 14px;
}

.messenger-widget__close-icon svg {
    width: 100%;
    height: 100%;
    fill: #2C2C2C;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .messenger-widget {
        bottom: 15px;
        right: 15px;
    }
    
    .messenger-widget__button {
        width: 56px;
        height: 56px;
    }
    
    .messenger-widget__popup {
        width: calc(100vw - 30px);
        max-width: 320px;
        bottom: 76px;
    }
}
