/* ════════════════════════════════════════
   FLOATING CONTACT BUTTON
   ════════════════════════════════════════ */
.fc-wrap {
    position: fixed;
    bottom: 30px;
    z-index: 99999;
    font-family: "Vazirmatn", sans-serif;
    direction: rtl;
}

.fc-wrap.fc-pos-left {
    left: 30px;
}

.fc-wrap.fc-pos-right {
    right: 30px;
}

.fc-wrap *,
.fc-wrap *::before,
.fc-wrap *::after {
    box-sizing: border-box;
}

/* ─── Toggle Button ─── */
.fc-toggle {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #E67E22, #D35400) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none !important;
    box-shadow: 0 12px 32px rgba(230, 126, 34, .45),
                0 4px 12px rgba(230, 126, 34, .25);
    transition: all .35s cubic-bezier(.4, 0, .2, 1);
    -webkit-appearance: none !important;
    appearance: none !important;
    padding: 0 !important;
    z-index: 2;
}

.fc-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 16px 40px rgba(230, 126, 34, .55),
                0 6px 16px rgba(230, 126, 34, .35);
}

.fc-wrap.on .fc-toggle {
    background: linear-gradient(135deg, #1B3A5C, #0F2640) !important;
    box-shadow: 0 12px 32px rgba(15, 38, 64, .35),
                0 4px 12px rgba(15, 38, 64, .25);
}

.fc-toggle-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .35s cubic-bezier(.4, 0, .2, 1);
}

.fc-toggle-icon svg {
    width: 26px !important;
    height: 26px !important;
    stroke: #fff !important;
    fill: none !important;
    display: block !important;
}

.fc-icon-chat {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.fc-icon-close {
    opacity: 0;
    transform: rotate(-90deg) scale(.5);
}

.fc-wrap.on .fc-icon-chat {
    opacity: 0;
    transform: rotate(90deg) scale(.5);
}

.fc-wrap.on .fc-icon-close {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* ─── Pulse Animation ─── */
.fc-toggle-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(230, 126, 34, .5);
    animation: fcPulse 2.5s infinite;
    pointer-events: none;
    z-index: -1;
}

.fc-toggle-pulse:nth-child(2) {
    animation-delay: 1.25s;
}

@keyframes fcPulse {
    0% {
        transform: scale(1);
        opacity: .6;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.fc-wrap.on .fc-toggle-pulse {
    display: none;
}

/* ─── Panel ─── */
.fc-panel {
    position: absolute;
    bottom: calc(100% + 14px);
    width: 320px;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(15, 38, 64, .18),
                0 8px 24px rgba(15, 38, 64, .08);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(.92);
    transform-origin: bottom right;
    transition: all .35s cubic-bezier(.4, 0, .2, 1);
}

.fc-pos-left .fc-panel {
    left: 0;
    transform-origin: bottom left;
}

.fc-pos-right .fc-panel {
    right: 0;
    transform-origin: bottom right;
}

.fc-wrap.on .fc-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* ─── Panel Header ─── */
.fc-panel-head {
    padding: 22px 22px 18px;
    background: linear-gradient(135deg, #1B3A5C, #0F2640);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.fc-panel-head::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(230, 126, 34, .25) 0%, transparent 70%);
    pointer-events: none;
}

.fc-panel-head h4 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    position: relative;
    z-index: 1;
}

.fc-panel-head p {
    margin: 0;
    font-size: .78rem;
    color: rgba(255, 255, 255, .75);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* ─── Panel Body ─── */
.fc-panel-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 60vh;
    overflow-y: auto;
}

.fc-panel-body::-webkit-scrollbar {
    width: 4px;
}

.fc-panel-body::-webkit-scrollbar-thumb {
    background: rgba(15, 38, 64, .15);
    border-radius: 99px;
}

/* ─── Items ─── */
.fc-item {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 14px !important;
    border-radius: 14px;
    text-decoration: none !important;
    color: #444 !important;
    transition: all .25s ease;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.fc-item:hover {
    background: rgba(15, 38, 64, .04) !important;
    transform: translateX(-4px);
}

.fc-item-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    transition: all .3s ease;
}

.fc-item-icon svg {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor !important;
    display: block !important;
}

/* ─── رنگ‌های هر آیتم ─── */
.fc-whatsapp .fc-item-icon {
    background: linear-gradient(135deg, #25D366, #128C7E);
    box-shadow: 0 6px 16px rgba(37, 211, 102, .3);
}

.fc-telegram .fc-item-icon {
    background: linear-gradient(135deg, #29B6F6, #0288D1);
    box-shadow: 0 6px 16px rgba(41, 182, 246, .3);
}

.fc-phone .fc-item-icon {
    background: linear-gradient(135deg, #E67E22, #D35400);
    box-shadow: 0 6px 16px rgba(230, 126, 34, .3);
}

.fc-email .fc-item-icon {
    background: linear-gradient(135deg, #5C6BC0, #3949AB);
    box-shadow: 0 6px 16px rgba(92, 107, 192, .3);
}

.fc-instagram .fc-item-icon {
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    box-shadow: 0 6px 16px rgba(220, 39, 67, .3);
}

.fc-item:hover .fc-item-icon {
    transform: scale(1.08);
}

/* ─── Item Text ─── */
.fc-item-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.fc-item-title {
    font-size: .92rem;
    font-weight: 700;
    color: #1B3A5C;
    line-height: 1.3;
}

.fc-item-desc {
    font-size: .72rem;
    color: #888;
    font-weight: 500;
    line-height: 1.3;
}

/* ─── Arrow ─── */
.fc-item-arrow {
    color: #ccc;
    flex-shrink: 0;
    transition: all .25s ease;
    transform: rotate(180deg);
}

.fc-item-arrow svg {
    width: 14px !important;
    height: 14px !important;
    stroke: currentColor !important;
    fill: none !important;
}

.fc-item:hover .fc-item-arrow {
    color: #E67E22;
    transform: rotate(180deg) translateX(-3px);
}

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 600px) {
    .fc-wrap {
        bottom: 20px;
    }
    .fc-wrap.fc-pos-left {
        left: 20px;
    }
    .fc-wrap.fc-pos-right {
        right: 20px;
    }
    .fc-toggle {
        width: 56px;
        height: 56px;
    }
    .fc-toggle-icon svg {
        width: 22px !important;
        height: 22px !important;
    }
    .fc-panel {
        width: calc(100vw - 40px);
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .fc-wrap {
        bottom: 16px;
    }
    .fc-wrap.fc-pos-left {
        left: 16px;
    }
    .fc-wrap.fc-pos-right {
        right: 16px;
    }
    .fc-toggle {
        width: 52px;
        height: 52px;
    }
    .fc-panel {
        max-width: calc(100vw - 32px);
    }
    .fc-item {
        padding: 11px 12px !important;
    }
    .fc-item-icon {
        width: 38px;
        height: 38px;
    }
    .fc-item-title {
        font-size: .87rem;
    }
}

/* ════════════════════════════════════════
   تنظیم همزمانی با دکمه scroll-top فوتر
   ════════════════════════════════════════ */
.fc-pos-right ~ .ftr .ftr-top,
.ftr:has(~ .fc-pos-right) .ftr-top {
    /* اگر دکمه شناور سمت راست بود، scroll-top میره سمت چپ */
}