/**
 * Floating Connect Widget - Frontend Styles
 * Version: 1.1.0
 */

/* ============================================
   উইজেট কন্টেইনার
   ============================================ */

.fcw-widget {
    position: fixed;
    z-index: 99998;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

.fcw-bottom-right {
    bottom: 24px;
    right: 20px;
}

.fcw-bottom-left {
    bottom: 24px;
    left: 20px;
}

/* ============================================
   মেইন বাটন (Connect Now)
   ============================================ */

.fcw-main-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border: none;
    border-radius: 50px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
    white-space: nowrap;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.fcw-bottom-right .fcw-main-btn {
    flex-direction: row;
}

.fcw-bottom-left .fcw-main-btn {
    flex-direction: row-reverse;
}

.fcw-main-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transition: left 0.5s;
}

.fcw-main-btn:hover::before {
    left: 100%;
}

.fcw-main-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 3px 10px rgba(0, 0, 0, 0.25);
}

.fcw-main-btn:active {
    transform: scale(0.97);
}

.fcw-btn-text {
    display: inline-block;
}

/* ============================================
   ফ্লোটিং আইকন কন্টেইনার - 2x2 গ্রিড
   ============================================ */

.fcw-icons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.fcw-bottom-right .fcw-icons {
    justify-items: end;
}

.fcw-bottom-left .fcw-icons {
    justify-items: start;
}

.fcw-widget.fcw-open .fcw-icons {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* প্রতিটি আইকনে স্ট্যাগার অ্যানিমেশন */
.fcw-widget.fcw-open .fcw-icons .fcw-icon-btn:nth-child(1) {
    transition-delay: 0.03s;
}
.fcw-widget.fcw-open .fcw-icons .fcw-icon-btn:nth-child(2) {
    transition-delay: 0.06s;
}
.fcw-widget.fcw-open .fcw-icons .fcw-icon-btn:nth-child(3) {
    transition-delay: 0.09s;
}
.fcw-widget.fcw-open .fcw-icons .fcw-icon-btn:nth-child(4) {
    transition-delay: 0.12s;
}

/* ============================================
   আইকন বাটন
   ============================================ */

.fcw-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fcw-icon-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.35);
}

.fcw-icon-btn:active {
    transform: scale(0.92);
}

.fcw-widget.fcw-open .fcw-icon-btn {
    opacity: 1;
    transform: scale(1);
}

/* আইকন হোভার টুলটিপ */
.fcw-icon-btn {
    position: relative;
}

.fcw-icon-btn::after {
    content: attr(title);
    position: absolute;
    padding: 6px 12px;
    background: #1d2327;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.fcw-bottom-right .fcw-icon-btn::after {
    right: 62px;
    top: 50%;
    transform: translateY(-50%) translateX(5px);
}

.fcw-bottom-left .fcw-icon-btn::after {
    left: 62px;
    top: 50%;
    transform: translateY(-50%) translateX(-5px);
}

.fcw-icon-btn:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* ============================================
   আইকন কালার ওভাররাইড
   ============================================ */

.fcw-phone svg { fill: #fff; }
.fcw-whatsapp svg { fill: #fff; }
.fcw-email svg { fill: #fff; }
.fcw-chat svg { fill: #fff; }

/* ============================================
   পালস অ্যানিমেশন (মেইন বাটনে)
   ============================================ */

@keyframes fcwPulse {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 255, 255, 0.25);
    }
    70% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 0 12px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.fcw-widget:not(.fcw-open) .fcw-main-btn {
    animation: fcwPulse 2.5s infinite;
}

/* ============================================
   মোবাইল রেসপন্সিভ
   ============================================ */

@media (max-width: 768px) {
    .fcw-widget {
        bottom: 18px;
    }

    .fcw-bottom-right {
        right: 14px;
    }

    .fcw-bottom-left {
        left: 14px;
    }

    .fcw-main-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .fcw-icon-btn {
        width: 46px;
        height: 46px;
    }

    .fcw-icons {
        gap: 9px;
        margin-bottom: 12px;
    }

    .fcw-bottom-right .fcw-icon-btn::after {
        right: 56px;
    }

    .fcw-bottom-left .fcw-icon-btn::after {
        left: 56px;
    }
}

@media (max-width: 400px) {
    .fcw-main-btn {
        padding: 11px 16px;
        font-size: 13px;
    }

    .fcw-icon-btn {
        width: 42px;
        height: 42px;
    }

    .fcw-icon-btn svg {
        width: 18px;
        height: 18px;
    }

    .fcw-icons {
        gap: 8px;
    }
}
