/* Floating Contact Buttons Pro - Frontend */

.fcb-wrap {
    position: fixed;
    bottom: 25px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.fcb-right { right: 25px; }
.fcb-left { left: 25px; }

/* Main Button */
#fcb-container .fcb-main,
.fcb-wrap .fcb-main {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    aspect-ratio: 1 / 1 !important;
    border: none !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    transition: background-color 0.5s ease, transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}
#fcb-container .fcb-main:hover,
.fcb-wrap .fcb-main:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 25px rgba(0,0,0,0.3);
}

/* Pulse Animation - as separate element */
.fcb-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: fcb-pulse-anim 2s ease-out infinite;
    pointer-events: none;
}
.fcb-wrap.open .fcb-pulse {
    animation: none;
    opacity: 0;
}
@keyframes fcb-pulse-anim {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Icon Rotator */
.fcb-icon-rotator {
    position: relative;
    width: 28px;
    height: 28px;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 2;
}
.fcb-rot-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px) scale(0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.fcb-rot-icon.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.fcb-rot-icon.exit {
    opacity: 0;
    transform: translateY(-20px) scale(0.5);
}
.fcb-rot-icon i {
    font-size: 24px;
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Close Icon */
.fcb-close-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg) scale(0);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}
.fcb-close-icon i {
    font-size: 24px;
    color: #fff;
}
#fcb-container.open .fcb-icon-rotator,
.fcb-wrap.open .fcb-icon-rotator {
    opacity: 0 !important;
    transform: rotate(90deg) scale(0) !important;
}
#fcb-container.open .fcb-close-icon,
.fcb-wrap.open .fcb-close-icon {
    opacity: 1 !important;
    transform: translate(-50%, -50%) rotate(0) scale(1) !important;
}

/* Buttons List */
.fcb-list {
    position: absolute;
    bottom: 70px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}
.fcb-right .fcb-list { right: 0; align-items: flex-end; }
.fcb-left .fcb-list { left: 0; align-items: flex-start; }

#fcb-container.open .fcb-list,
.fcb-wrap.open .fcb-list {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Individual Buttons */
#fcb-container .fcb-btn,
.fcb-wrap .fcb-btn {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    aspect-ratio: 1 / 1 !important;
    border: none !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    position: relative;
    transform: scale(0);
    opacity: 0;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}
.fcb-btn i {
    font-size: 20px;
    color: #fff;
}
.fcb-btn:hover {
    transform: scale(1.12) !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

/* Staggered animation */
#fcb-container.open .fcb-btn,
.fcb-wrap.open .fcb-btn {
    transform: scale(1) !important;
    opacity: 1 !important;
}
.fcb-wrap.open .fcb-btn:nth-child(1) { transition-delay: 0.03s; }
.fcb-wrap.open .fcb-btn:nth-child(2) { transition-delay: 0.06s; }
.fcb-wrap.open .fcb-btn:nth-child(3) { transition-delay: 0.09s; }
.fcb-wrap.open .fcb-btn:nth-child(4) { transition-delay: 0.12s; }
.fcb-wrap.open .fcb-btn:nth-child(5) { transition-delay: 0.15s; }
.fcb-wrap.open .fcb-btn:nth-child(6) { transition-delay: 0.18s; }
.fcb-wrap.open .fcb-btn:nth-child(7) { transition-delay: 0.21s; }
.fcb-wrap.open .fcb-btn:nth-child(8) { transition-delay: 0.24s; }

/* Tooltips */
.fcb-tooltip {
    position: absolute;
    white-space: nowrap;
    background: #333;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}
.fcb-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
}
.fcb-right .fcb-tooltip { right: calc(100% + 12px); }
.fcb-right .fcb-tooltip::after { left: 100%; border-left-color: #333; }
.fcb-left .fcb-tooltip { left: calc(100% + 12px); }
.fcb-left .fcb-tooltip::after { right: 100%; border-right-color: #333; }

.fcb-btn:hover .fcb-tooltip,
.fcb-main:hover .fcb-tooltip {
    opacity: 1;
}

/* Modal */
.fcb-modal {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.fcb-modal.active {
    opacity: 1;
    visibility: visible;
}
.fcb-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}
.fcb-modal-box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: translateY(30px) scale(0.95);
    transition: all 0.3s ease;
}
.fcb-modal.active .fcb-modal-box {
    transform: translateY(0) scale(1);
}
.fcb-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.fcb-modal-close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}
.fcb-modal-close i {
    font-size: 16px;
    color: #666;
}
.fcb-modal-box h3 {
    margin: 0 0 20px;
    font-size: 22px;
    color: #333;
}

/* Mobile */
@media (max-width: 768px) {
    .fcb-wrap { bottom: 20px; }
    .fcb-right { right: 20px; }
    .fcb-left { left: 20px; }
    .fcb-main { 
        width: 56px !important; 
        height: 56px !important; 
        min-width: 56px !important;
        min-height: 56px !important;
        max-width: 56px !important;
        max-height: 56px !important;
    }
    .fcb-btn { 
        width: 46px !important; 
        height: 46px !important;
        min-width: 46px !important;
        min-height: 46px !important;
        max-width: 46px !important;
        max-height: 46px !important;
    }
    .fcb-tooltip { display: none; }
    .fcb-modal-box { padding: 24px; }
}
