/**
 * Mobile call + Raychat floating action buttons
 */
.mobile-fab-wrap {
    position: fixed;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    bottom: max(18px, env(safe-area-inset-bottom));
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-decoration: none;
    font: inherit;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

a.mobile-fab-wrap:hover,
a.mobile-fab-wrap:focus,
a.mobile-fab-wrap:focus-visible,
a.mobile-fab-wrap:active,
button.mobile-fab-wrap:hover,
button.mobile-fab-wrap:focus,
button.mobile-fab-wrap:focus-visible,
button.mobile-fab-wrap:active {
    text-decoration: none;
    color: inherit;
    outline: none !important;
    box-shadow: none;
    border: none;
}

.mobile-fab-wrap--left {
    left: max(16px, env(safe-area-inset-left));
    display: none;
}

.mobile-fab-wrap--right {
    right: max(16px, env(safe-area-inset-right));
}

.mobile-fab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-fab:focus,
.mobile-fab:focus-visible,
.mobile-fab:active {
    outline: none !important;
}

.mobile-fab i {
    font-size: 24px;
    line-height: 1;
}

.mobile-fab:active,
.mobile-fab-wrap:active .mobile-fab {
    transform: scale(0.94);
}

.mobile-fab-label {
    font-family: iransans, yekan, tahoma, sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    color: #334155;
    background: rgba(255, 255, 255, 0.96);
    padding: 3px 9px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
    white-space: nowrap;
    text-align: center;
    pointer-events: none;
}

.mobile-fab--call {
    background: linear-gradient(145deg, #22c55e 0%, #16a34a 55%, #15803d 100%);
    box-shadow:
        0 8px 24px rgba(22, 163, 74, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.12);
    animation: mobile-fab-pulse-green 2.4s ease-in-out infinite;
}

.mobile-fab--call i {
    transform: scaleX(-1);
}

.mobile-fab--call::before,
.mobile-fab--chat::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    pointer-events: none;
}

.mobile-fab--call::before {
    border: 2px solid rgba(34, 197, 94, 0.35);
    animation: mobile-fab-ring 2.4s ease-out infinite;
}

.mobile-fab--call:active,
.mobile-fab-wrap:active .mobile-fab--call {
    box-shadow:
        0 4px 14px rgba(22, 163, 74, 0.35),
        0 1px 4px rgba(0, 0, 0, 0.1);
}

.mobile-fab--chat {
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
    box-shadow:
        0 8px 24px rgba(37, 99, 235, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.12);
    animation: mobile-fab-pulse-blue 2.4s ease-in-out infinite;
}

.mobile-fab--chat::before {
    border: 2px solid rgba(59, 130, 246, 0.35);
    animation: mobile-fab-ring 2.4s ease-out infinite;
}

.mobile-fab--chat:active,
.mobile-fab-wrap:active .mobile-fab--chat {
    box-shadow:
        0 4px 14px rgba(37, 99, 235, 0.35),
        0 1px 4px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 767px) {
    .mobile-fab-wrap--left {
        display: flex;
    }
}

@keyframes mobile-fab-pulse-green {
    0%, 100% { box-shadow: 0 8px 24px rgba(22, 163, 74, 0.45), 0 2px 8px rgba(0, 0, 0, 0.12); }
    50% { box-shadow: 0 10px 28px rgba(34, 197, 94, 0.55), 0 3px 10px rgba(0, 0, 0, 0.14); }
}

@keyframes mobile-fab-pulse-blue {
    0%, 100% { box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45), 0 2px 8px rgba(0, 0, 0, 0.12); }
    50% { box-shadow: 0 10px 28px rgba(59, 130, 246, 0.55), 0 3px 10px rgba(0, 0, 0, 0.14); }
}

@keyframes mobile-fab-ring {
    0% { transform: scale(0.92); opacity: 0.7; }
    70% { transform: scale(1.18); opacity: 0; }
    100% { transform: scale(1.18); opacity: 0; }
}
