.fcs-wrapper,
.fcs-modal,
.fcs-floating-btn,
.fcs-modal * {
    font-family: inherit !important;
}

.fcs-wrapper {
    direction: rtl;
    position: static;
    z-index: 999999;
    pointer-events: none;
}

.fcs-floating-btn,
.fcs-floating-btn:hover,
.fcs-floating-btn:focus,
.fcs-floating-btn:active,
.fcs-floating-btn:visited {
    pointer-events: auto;
    position: fixed !important;
    bottom: 22px !important;
    top: auto !important;
    border: 0 !important;
    outline: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    color: inherit !important;
    cursor: pointer;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: transform 0.25s ease;
    line-height: normal;
    text-transform: none;
    min-width: 0;
    min-height: 0;
    width: auto;
    height: auto;
}

.fcs-floating-btn:hover {
    transform: translateY(-3px);
    background: transparent !important;
    background-color: transparent !important;
}

.fcs-floating-btn:focus-visible {
    outline: 3px solid rgba(var(--fcs-primary-rgb, 31, 111, 255), 0.45);
    outline-offset: 4px;
    border-radius: 16px;
}

.fcs-floating-btn.fcs-side-right {
    right: 18px !important;
    left: auto !important;
}

.fcs-floating-btn.fcs-side-left {
    left: 18px !important;
    right: auto !important;
}

.fcs-btn-core {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: visible;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.fcs-social-core {
    background: radial-gradient(circle at 30% 30%, #5ec8ff 0%, var(--fcs-primary, #1f6fff) 48%, #0c4fd6 100%);
    animation: fcs-float 3s ease-in-out infinite;
}

.fcs-phone-core {
    background: radial-gradient(circle at 35% 30%, #2fd65c 0%, var(--fcs-secondary, #008A00) 50%, #006400 100%);
    animation: fcs-float 3.2s ease-in-out infinite;
}

.fcs-ripple {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid currentColor;
    color: inherit;
    opacity: 0;
    pointer-events: none;
    animation: fcs-ripple 2s ease-out infinite;
}

.fcs-social-core .fcs-ripple {
    color: var(--fcs-primary, #1f6fff);
}

.fcs-phone-core .fcs-ripple {
    color: var(--fcs-secondary, #008A00);
}

.fcs-icon-stack {
    position: relative;
    width: 34px;
    height: 34px;
    z-index: 2;
}

.fcs-icon-slide {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.35s ease, transform 0.35s ease;
    color: #fff;
}

.fcs-icon-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.fcs-icon-slide svg,
.fcs-phone-icon svg,
.fcs-icon-slide .fcs-custom-icon,
.fcs-item-icon .fcs-custom-icon {
    width: 30px;
    height: 30px;
    display: block;
    object-fit: contain;
}

.fcs-item-icon .fcs-custom-icon {
    width: 22px;
    height: 22px;
}

.fcs-phone-icon {
    position: relative;
    z-index: 2;
    color: #fff;
    display: grid;
    place-items: center;
}

.fcs-btn-label {
    max-width: 110px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.88);
    color: #fff;
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

/* Modal */
.fcs-modal {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: none;
}

.fcs-modal.is-open {
    display: block;
}

.fcs-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(2px);
}

.fcs-modal-dialog {
    position: relative;
    width: min(92vw, 420px);
    max-height: min(80vh, 640px);
    overflow: auto;
    margin: 10vh auto 0;
    background: #fff;
    border-radius: 22px;
    padding: 22px 18px 18px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
    direction: rtl;
    text-align: right;
    animation: fcs-dialog-in 0.28s ease;
}

.fcs-modal-dialog::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--fcs-primary, #1f6fff), var(--fcs-secondary, #008A00));
}

.fcs-modal-dialog h3 {
    margin: 4px 0 16px;
    padding-right: 0;
    padding-left: 48px;
    font-size: 17px;
    line-height: 1.6;
    color: #111827;
}

.fcs-close {
    position: absolute !important;
    top: 14px !important;
    left: 14px !important;
    right: auto !important;
    border: 0 !important;
    background: #111827 !important;
    color: #fff !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    font-size: 22px !important;
    line-height: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    z-index: 3;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
    transition: transform 0.2s ease, background 0.2s ease;
}

.fcs-close:hover,
.fcs-close:focus {
    background: #000 !important;
    color: #fff !important;
    transform: scale(1.06);
}

.fcs-list {
    display: grid;
    gap: 10px;
}

.fcs-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.fcs-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(var(--fcs-primary-rgb, 31, 111, 255), 0.28);
}

.fcs-item-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--fcs-primary, #1f6fff);
}

.fcs-item-icon svg {
    width: 22px;
    height: 22px;
}

.fcs-item-text {
    flex: 1 1 auto;
    min-width: 0;
}

.fcs-item-label {
    display: block;
    color: #111827;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.fcs-item-desc {
    display: block;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.fcs-item-arrow {
    color: #9ca3af;
    font-size: 22px;
    line-height: 1;
}

.fcs-platform-whatsapp .fcs-item-icon { background: #25D366; }
.fcs-platform-telegram .fcs-item-icon { background: #2AABEE; }
.fcs-platform-instagram .fcs-item-icon { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.fcs-platform-eitaa .fcs-item-icon { background: #f39c12; }
.fcs-platform-bale .fcs-item-icon { background: #00a3e0; }
.fcs-platform-rubika .fcs-item-icon { background: #7b2ff7; }
.fcs-platform-soroush .fcs-item-icon { background: #00bcd4; }
.fcs-platform-gap .fcs-item-icon { background: #009688; }
.fcs-platform-linkedin .fcs-item-icon { background: #0A66C2; }
.fcs-platform-youtube .fcs-item-icon { background: #FF0000; }
.fcs-platform-x .fcs-item-icon { background: #111111; }
.fcs-platform-phone .fcs-item-icon { background: var(--fcs-secondary, #008A00); }
.fcs-platform-chat .fcs-item-icon { background: var(--fcs-primary, #1f6fff); }

body.fcs-modal-open {
    overflow: hidden;
}

.fcs-hide-mobile,
.fcs-hide-desktop {
    display: block;
}

@media (max-width: 767px) {
    .fcs-hide-mobile {
        display: none !important;
    }

    .fcs-floating-btn {
        bottom: 16px;
    }

    .fcs-floating-btn.fcs-side-right {
        right: 12px !important;
        left: auto !important;
    }

    .fcs-floating-btn.fcs-side-left {
        left: 12px !important;
        right: auto !important;
    }

    .fcs-btn-core {
        width: 58px;
        height: 58px;
    }

    .fcs-icon-stack {
        width: 28px;
        height: 28px;
    }

    .fcs-icon-slide svg,
    .fcs-phone-icon svg {
        width: 26px;
        height: 26px;
    }

    .fcs-btn-label {
        max-width: 96px;
        font-size: 10px;
        padding: 4px 8px;
    }

    .fcs-modal-dialog {
        width: min(94vw, 420px);
        margin-top: 8vh;
        padding: 18px 14px 14px;
    }
}

@media (min-width: 768px) {
    .fcs-hide-desktop {
        display: none !important;
    }
}

@keyframes fcs-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes fcs-ripple {
    0% {
        transform: scale(1);
        opacity: 0.55;
    }
    100% {
        transform: scale(1.55);
        opacity: 0;
    }
}

@keyframes fcs-dialog-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .fcs-social-core,
    .fcs-phone-core,
    .fcs-ripple,
    .fcs-modal-dialog {
        animation: none !important;
    }

    .fcs-icon-slide {
        transition: none;
    }
}
