/* Messenger Widget - Disshelp.ru */

/* Container */
.messenger-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Main Button */
.messenger-widget-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(10, 16, 34, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.messenger-widget-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.3);
    background: rgba(10, 16, 34, 0.85);
}

/* Icon Circle */
.messenger-widget-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #67e8f9 0%, #a78bfa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.messenger-widget-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* Text Content */
.messenger-widget-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.messenger-widget-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
}

.messenger-widget-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

/* Chevron */
.messenger-widget-chevron {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.messenger-widget-chevron svg {
    width: 16px;
    height: 16px;
    fill: rgba(255, 255, 255, 0.5);
}

.messenger-widget.active .messenger-widget-chevron {
    transform: rotate(180deg);
}

/* Panel */
.messenger-widget-panel {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    background: rgba(10, 16, 34, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 240px;
}

.messenger-widget.active .messenger-widget-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Messenger Items */
.messenger-widget-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.messenger-widget-item:last-child {
    margin-bottom: 0;
}

.messenger-widget-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

/* Messenger Icons */
.messenger-widget-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.messenger-widget-item-icon svg {
    width: 22px;
    height: 22px;
    fill: white;
}

/* WhatsApp */
.messenger-widget-item.whatsapp .messenger-widget-item-icon {
    background: linear-gradient(135deg, #25D366 0%, #1EBEA5 100%);
}

/* Telegram */
.messenger-widget-item.telegram .messenger-widget-item-icon {
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
}

/* Max */
.messenger-widget-item.max .messenger-widget-item-icon {
    background: linear-gradient(135deg, #23C0FF 0%, #8A2BE2 100%);
}

/* Messenger Text */
.messenger-widget-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.messenger-widget-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.messenger-widget-item-action {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Mobile Styles */
@media (max-width: 480px) {
    .messenger-widget {
        bottom: 16px;
        right: 16px;
    }

    .messenger-widget-btn {
        padding: 10px 16px;
        gap: 10px;
    }

    .messenger-widget-icon {
        width: 38px;
        height: 38px;
    }

    .messenger-widget-icon svg {
        width: 20px;
        height: 20px;
    }

    .messenger-widget-title {
        font-size: 14px;
    }

    .messenger-widget-subtitle {
        font-size: 11px;
    }

    .messenger-widget-panel {
        min-width: 220px;
        right: 0;
    }

    .messenger-widget-item {
        padding: 10px 14px;
    }

    .messenger-widget-item-icon {
        width: 36px;
        height: 36px;
    }

    .messenger-widget-item-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* Pulse Animation for Attention */
@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.messenger-widget-icon::before {
    content: '';
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #67e8f9 0%, #a78bfa 100%);
    animation: pulse-ring 2s ease-out infinite;
    z-index: -1;
}

.messenger-widget-icon {
    position: relative;
}

/* Hide pulse when panel is open */
.messenger-widget.active .messenger-widget-icon::before {
    animation: none;
    opacity: 0;
}
