/* ===== ОСНОВНОЙ КОНТЕЙНЕР ===== */
#contact-button-yds-wrapper {
    position: fixed;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

#contact-button-yds-wrapper.contact-button-position-right {
    right: 20px;
}

#contact-button-yds-wrapper.contact-button-position-left {
    left: 20px;
}

/* ===== ТЕЛЕФОН (появляется по клику) ===== */
.contact-button-phone-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    pointer-events: none;
}

#contact-button-yds-wrapper.active .contact-button-phone-top {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.contact-button-phone-top:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.contact-button-phone-top svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

/* ===== РЯД: мессенджеры + кнопка ===== */
.contact-button-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

/* ===== МЕССЕНДЖЕРЫ (появляются по клику) ===== */
.contact-button-messengers {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#contact-button-yds-wrapper.active .contact-button-messengers {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

.contact-button-messenger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 8px;
    text-decoration: none;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    transition: all 0.2s ease;
    min-width: 44px;
}

.contact-button-messenger:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    background: #f8fafc;
}

.contact-button-messenger svg {
    width: var(--messenger-size, 40px);
    height: var(--messenger-size, 40px);
    fill: currentColor;
}

.contact-button-messenger span {
    font-size: 9px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    line-height: 1.2;
}

/* ===== ОСНОВНАЯ КНОПКА ===== */
.contact-button-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 25px rgba(0,0,0,0.3);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    position: relative;
    border: none;
    user-select: none;
    flex-shrink: 0;
    z-index: 2;
}

.contact-button-main:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 35px rgba(0,0,0,0.4);
}

.contact-button-main:active {
    transform: scale(0.92);
}

.contact-button-main svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* Пульсация */
.contact-button-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.4;
    animation: pulse-animation 2.5s ease-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes pulse-animation {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Индикатор статуса */
.contact-button-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2.5px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.contact-button-status-text {
    display: none;
}

/* ===== EMAIL (появляется по клику) ===== */
.contact-button-email-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
    pointer-events: none;
}

#contact-button-yds-wrapper.active .contact-button-email-bottom {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.contact-button-email-bottom:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.contact-button-email-bottom svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 600px) {
    #contact-button-yds-wrapper.contact-button-position-right {
        right: 10px;
    }
    
    #contact-button-yds-wrapper.contact-button-position-left {
        left: 10px;
    }
    
    .contact-button-main {
        width: 50px;
        height: 50px;
    }
    
    .contact-button-main svg {
        width: 24px;
        height: 24px;
    }
    
    .contact-button-messengers {
        gap: 4px;
    }
    
    .contact-button-messenger {
        padding: 4px 6px;
        min-width: 36px;
    }
    
    .contact-button-messenger svg {
        width: 32px !important;
        height: 32px !important;
    }
    
    .contact-button-messenger span {
        font-size: 7px;
    }
    
    .contact-button-phone-top,
    .contact-button-email-bottom {
        padding: 6px 12px;
        font-size: 12px;
        gap: 6px;
    }
    
    .contact-button-phone-top svg,
    .contact-button-email-bottom svg {
        width: 15px;
        height: 15px;
    }
    
    .contact-button-status {
        width: 14px;
        height: 14px;
        border-width: 2px;
        font-size: 6px;
    }
}

@media (max-width: 400px) {
    .contact-button-messenger {
        padding: 3px 4px;
        min-width: 30px;
    }
    
    .contact-button-messenger svg {
        width: 26px !important;
        height: 26px !important;
    }
    
    .contact-button-messenger span {
        font-size: 6px;
    }
    
    .contact-button-row {
        gap: 6px;
    }
}