/* ===== ویجت چت / ارتباط شناور ===== */
.mkfc-widget {
    position: fixed;
    bottom: 20px;
    z-index: 99990;
    font-family: inherit;
    direction: rtl;
}
.mkfc-widget.mkfc-pos-left { left: 20px; }
.mkfc-widget.mkfc-pos-right { right: 20px; }

/* دکمه اصلی شناور */
.mkfc-toggle {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--mkfc-main, #2e7d32);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
}
.mkfc-toggle:hover { transform: scale(1.06); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3); }
.mkfc-toggle:focus { outline: none; }

.mkfc-toggle .mkfc-ic-close { display: none; }
.mkfc-widget.mkfc-open .mkfc-toggle .mkfc-ic-open { display: none; }
.mkfc-widget.mkfc-open .mkfc-toggle .mkfc-ic-close { display: block; }

/* پالس ملایم */
.mkfc-toggle::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 0 var(--mkfc-main, #2e7d32);
    animation: mkfc-pulse 2.4s infinite;
}
.mkfc-widget.mkfc-open .mkfc-toggle::after { animation: none; }
@keyframes mkfc-pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.45); }
    70% { box-shadow: 0 0 0 14px rgba(46, 125, 50, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); }
}

/* پنل کانال‌ها */
.mkfc-panel {
    position: absolute;
    bottom: 72px;
    width: 260px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.96);
    transform-origin: bottom center;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.mkfc-pos-left .mkfc-panel { left: 0; transform-origin: bottom left; }
.mkfc-pos-right .mkfc-panel { right: 0; transform-origin: bottom right; }
.mkfc-widget.mkfc-open .mkfc-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.mkfc-header {
    background: var(--mkfc-main, #2e7d32);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.mkfc-header-text { display: flex; flex-direction: column; line-height: 1.5; }
.mkfc-title { font-size: 15px; font-weight: 700; }
.mkfc-subtitle { font-size: 12px; opacity: 0.85; }
.mkfc-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.mkfc-close:hover { background: rgba(255, 255, 255, 0.28); }

.mkfc-list { padding: 8px; max-height: 60vh; overflow-y: auto; }
.mkfc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #222;
    transition: background 0.15s ease;
}
.mkfc-item:hover { background: #f4f5f7; text-decoration: none; color: #222; }
.mkfc-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--mkfc-item, #2e7d32);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.mkfc-item-label { font-size: 14px; font-weight: 600; }

@media (max-width: 480px) {
    .mkfc-panel { width: calc(100vw - 40px); }
}
