/* Основная кнопка */
.floating-button {
    position: fixed;
    /* bottom: 20px; */
    top: 55%;
    right: 35px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.floating-button svg {
    width: 30px;
    height: 30px;
    fill: white;
    transition: all 0.3s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    }
}

/* Цвета для разных состояний кнопки */
.phone-mode {
    background-color: #2962FF;
    box-shadow: 0 0 15px rgba(41, 98, 255, 0.5);
}

.whatsapp-mode {
    background-color: #25D366;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.5);
}

.telegram-mode {
    background-color: #0088cc;
    box-shadow: 0 0 15px rgba(0, 136, 204, 0.5);
}

.floating-button:hover {
    transform: scale(1.1);
}

/* Состояние "скрытой" кнопки — плавное исчезновение */
.floating-button.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

/* Виджет мессенджеров */
.messenger-widget {
    position: fixed;
    /* bottom: 90px; */
    top: 40%;
    right: 20px;
    width: 280px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.messenger-widget__header {
    padding: 10px 15px;
    display: flex;
    justify-content: flex-end;
    position: absolute;
    width: 30px;
    right: 0;
}

.messenger-widget__close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
    padding: 2px 6px;
    line-height: 1;
}

.messenger-widget__close:hover {
    color: #333;
}

.messenger-widget__contents {
    padding: 15px;
}

.messenger-widget__contacts {
    margin-bottom: 15px;
}

.messenger-widget__contacts > div {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    column-gap: 10px;
    font-size: 15px;
    line-height: normal;
}

.messenger-widget__contacts > div:last-child {
    border-bottom: none;
}

.messenger-widget__contacts a {
    font-weight: normal;
    color: black;
}

.messenger-widget__contacts a:hover {
    text-decoration: underline;
}

.messenger-widget__contacts__icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.messenger-widget__contacts__icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.messenger-widget__contacts__phone__icon svg path,
.messenger-widget__contacts__email__icon svg path {
    fill: #000;
}

.messenger-widget__contacts__telegram__icon svg circle {
    fill: #039be5;
}

.messenger-widget__contacts__telegram__icon svg path {
    fill: #fff;
}

.messenger-widget__contacts__whatsapp__icon svg circle {
    fill: #25D366;
}

.messenger-widget__contacts__whatsapp__icon svg path {
    fill: #fff;
}

.messenger-widget__contacts__telegram__icon,
.messenger-widget__contacts__whatsapp__icon,
.messenger-widget__contacts__phone__icon,
.messenger-widget__contacts__email__icon {
    display: flex;
}

.messenger-widget__contacts__telegram__icon svg,
.messenger-widget__contacts__whatsapp__icon svg,
.messenger-widget__contacts__phone__icon svg,
.messenger-widget__contacts__email__icon svg {
    width: 20px;
    height: auto;
}

.messenger-widget__contacts__item {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.messenger-widget__work-time {
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin: 15px 0;
    font-size: 14px;
    color: #888;
}

.messenger-widget__work-time__work-day,
.messenger-widget__work-time__work-time {
    padding: 4px 0;
}

.messenger-widget__links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.messenger-widget__links a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    padding: 5px 0;
    transition: color 0.2s;
}

.messenger-widget__links a:hover {
    color: #0088cc;
}




/* Новогодняя шапка для кнопки */
.floating-button.has-santa-hat::after {
    content: '';
    position: absolute;
    top: -28px;
    right: -25px;
    width: 80px;
    height: 80px;
    background-image: url("/sites/default/files/images/artage-io-thumb-alt.png");
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 2;
    pointer-events: none; /* Чтобы шапка не мешала кликам */
}




/* ADAPTIVE */
@media (max-width: 768px) {
    /* .floating-button.has-santa-hat::after {
        width: 20px;
        height: 20px;
        top: -6px;
        right: -6px;
    } */
    .floating-button {
        bottom: 20px;
        top: auto;
        right: 35px;
    }
    .messenger-widget {
        top: auto;
        bottom: 90px;
    }
}