/* ===== CONTACT BUTTON WIDGET ===== */
.cb-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin: -8px;
}

/* ===== КНОПКИ — ОДНАКОВИЙ РОЗМІР ===== */
.cb-main-btn,
.cb-item-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.cb-main-btn i,
.cb-item-btn i {
    font-size: 22px;
}

/* ===== ГОЛОВНА КНОПКА ===== */
.cb-main-btn {
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s;
    z-index: 2;
}
.cb-main-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.cb-main-btn i {
    position: absolute;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.cb-main-btn .cb-icon-open  { opacity: 1; transform: rotate(0deg) scale(1); }
.cb-main-btn .cb-icon-close { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.cb-widget.open .cb-main-btn .cb-icon-open  { opacity: 0; transform: rotate(90deg) scale(0.5); }
.cb-widget.open .cb-main-btn .cb-icon-close { opacity: 1; transform: rotate(0deg) scale(1); }

/* ===== ЛЕЙБЛ ЗБОКУ ===== */
.cb-main-label {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20,20,20,0.9);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    pointer-events: none;
    animation: cb-label-appear 0.4s ease forwards, cb-label-pulse 3s ease-in-out 1.5s infinite;
}
.cb-main-label::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(20,20,20,0.9);
    border-right: none;
}
.cb-widget.open .cb-main-label { display: none; }

@keyframes cb-label-appear {
    from { opacity: 0; transform: translateY(-50%) translateX(8px); }
    to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}
@keyframes cb-label-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

/* ===== АЙТЕМИ ===== */
.cb-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
}
.cb-widget.open .cb-items {
    max-height: 600px;
    opacity: 1;
    overflow: visible;
}

.cb-item-btn {
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s, opacity 0.25s;
    transform: scale(0);
    opacity: 0;
}
.cb-widget.open .cb-item-btn { transform: scale(1); opacity: 1; }
.cb-widget.open .cb-item-btn:nth-child(1) { transition-delay: 0.05s; }
.cb-widget.open .cb-item-btn:nth-child(2) { transition-delay: 0.10s; }
.cb-widget.open .cb-item-btn:nth-child(3) { transition-delay: 0.15s; }
.cb-widget.open .cb-item-btn:nth-child(4) { transition-delay: 0.20s; }
.cb-widget.open .cb-item-btn:nth-child(5) { transition-delay: 0.25s; }
.cb-widget.open .cb-item-btn:nth-child(6) { transition-delay: 0.30s; }

.cb-item-btn:hover {
    transform: scale(1.12) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Лейбл при наведенні */
.cb-item-label {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: rgba(20,20,20,0.9);
    color: #fff;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}
.cb-item-label::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(20,20,20,0.9);
    border-right: none;
}
.cb-item-btn:hover .cb-item-label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ===== МОБАЙЛ ===== */
@media (max-width: 480px) {
    .cb-widget { bottom: 16px; right: 16px; }
    .cb-main-btn, .cb-item-btn { width: 48px; height: 48px; }
    .cb-main-btn i, .cb-item-btn i { font-size: 20px; }
}
