/* ═══════════════════════════════════════════════════════
   FLOATING CONTACT — دکمه شناور تماس با ما
   ═══════════════════════════════════════════════════════ */

.fc-wrapper {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9998;
    font-family: inherit;
}

/* ══════════ دکمه اصلی ══════════ */
.fc-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.4),
                0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: fc-pulse 2.5s infinite;
}

@keyframes fc-pulse {
    0% {
        box-shadow: 0 8px 24px rgba(29, 78, 216, 0.4),
                    0 4px 12px rgba(0, 0, 0, 0.1),
                    0 0 0 0 rgba(29, 78, 216, 0.6);
    }
    70% {
        box-shadow: 0 8px 24px rgba(29, 78, 216, 0.4),
                    0 4px 12px rgba(0, 0, 0, 0.1),
                    0 0 0 16px rgba(29, 78, 216, 0);
    }
    100% {
        box-shadow: 0 8px 24px rgba(29, 78, 216, 0.4),
                    0 4px 12px rgba(0, 0, 0, 0.1),
                    0 0 0 0 rgba(29, 78, 216, 0);
    }
}

.fc-toggle:hover {
    transform: scale(1.08);
    background: linear-gradient(135deg, #1e40af, #2563eb);
}

.fc-toggle:active {
    transform: scale(0.95);
}

/* آیکون‌های داخل دکمه */
.fc-icon-open,
.fc-icon-close {
    position: absolute;
    transition: all 0.3s ease;
}

.fc-icon-close {
    opacity: 0;
    transform: rotate(-90deg);
    font-size: 22px;
}

.fc-wrapper.fc-open .fc-icon-open {
    opacity: 0;
    transform: rotate(90deg);
}

.fc-wrapper.fc-open .fc-icon-close {
    opacity: 1;
    transform: rotate(0);
}

/* ══════════ منوی آیتم‌ها ══════════ */
.fc-menu {
    position: absolute;
    bottom: 75px;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.fc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    text-decoration: none;
    opacity: 0;
    transform: translateY(15px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    white-space: nowrap;
}

.fc-wrapper.fc-open .fc-item {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* تأخیر پله‌ای برای انیمیشن ورود */
.fc-wrapper.fc-open .fc-item:nth-child(1) { transition-delay: 0.05s; }
.fc-wrapper.fc-open .fc-item:nth-child(2) { transition-delay: 0.1s; }
.fc-wrapper.fc-open .fc-item:nth-child(3) { transition-delay: 0.15s; }
.fc-wrapper.fc-open .fc-item:nth-child(4) { transition-delay: 0.2s; }

.fc-item-label {
    background: #fff;
    color: #334155;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    order: 2;
}

.fc-item-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
    order: 1;
}

.fc-item:hover .fc-item-icon {
    transform: scale(1.1) rotate(5deg);
}

.fc-item:hover .fc-item-label {
    background: #1d4ed8;
    color: #fff;
}

/* رنگ اختصاصی هر آیتم */
.fc-call .fc-item-icon {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
}

.fc-whatsapp .fc-item-icon {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.fc-telegram .fc-item-icon {
    background: linear-gradient(135deg, #0088cc, #00A9E0);
}

.fc-bale .fc-item-icon {
    background: linear-gradient(135deg, #10B981, #059669);
}

/* ══════════ حالت RTL ══════════ */
/* (چون سایت RTL هست، دکمه سمت چپ قرار می‌گیره) */
html[dir="rtl"] .fc-wrapper {
    left: 24px;
    right: auto;
}

html[dir="rtl"] .fc-item {
    flex-direction: row-reverse;
}

/* ══════════ موبایل ══════════ */
@media (max-width: 640px) {
    .fc-wrapper {
        bottom: 16px;
        left: 16px;
    }

    .fc-toggle {
        width: 54px;
        height: 54px;
        font-size: 22px;
    }

    .fc-menu {
        bottom: 66px;
        gap: 8px;
    }

    .fc-item-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .fc-item-label {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ══════════ حالت dark mode ══════════ */
body.dark-mode .fc-item-label {
    background: #1e293b;
    color: #e2e8f0;
}

body.dark-mode .fc-item:hover .fc-item-label {
    background: #1d4ed8;
    color: #fff;
}