/* ── CodesFix Floating Contact Button — Frontend CSS ──────────────────────── */
/* All rules are scoped to #cfcb-wrap / .cfcb-* — zero theme/plugin conflicts */

#cfcb-wrap,
#cfcb-wrap *,
#cfcb-wrap *::before,
#cfcb-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    line-height: 1;
}

#cfcb-wrap {
    --cfcb-size: 60px;
    --cfcb-icon: 26px;
    --cfcb-bg: #25D366;
    --cfcb-icon-color: #ffffff;
    --cfcb-shadow: rgba(37,211,102,0.45);
    --cfcb-bottom: 30px;
    --cfcb-right: 30px;
    --cfcb-radius: 50px;
    --cfcb-label-bg: #25D366;
    --cfcb-label-color: #ffffff;

    position: fixed;
    bottom: var(--cfcb-bottom);
    right: var(--cfcb-right);
    z-index: 2147483647;
    display: flex;
    align-items: center;
    gap: 10px;
    /* start hidden — JS will reveal */
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity .35s ease, transform .35s ease;
}

/* Visible state applied by JS */
#cfcb-wrap.cfcb--visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Fade animation variant */
#cfcb-wrap.cfcb--anim-fade { transform: translateY(0); }
#cfcb-wrap.cfcb--anim-fade.cfcb--visible { opacity: 1; }

/* Bounce animation variant */
#cfcb-wrap.cfcb--anim-bounce { transform: scale(0.5) translateY(30px); }
#cfcb-wrap.cfcb--anim-bounce.cfcb--visible { transform: scale(1) translateY(0); }

/* ── Button ─────────────────────────────────────────────── */
.cfcb__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--cfcb-size);
    height: var(--cfcb-size);
    border-radius: var(--cfcb-radius);
    background: var(--cfcb-bg);
    color: var(--cfcb-icon-color);
    text-decoration: none !important;
    box-shadow: 0 6px 24px var(--cfcb-shadow);
    position: relative;
    flex-shrink: 0;
    transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    border: none;
    cursor: pointer;
}

.cfcb__btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 32px var(--cfcb-shadow);
    text-decoration: none !important;
}

.cfcb__btn:active {
    transform: scale(0.95);
}

.cfcb__btn:focus-visible {
    outline: 3px solid var(--cfcb-bg);
    outline-offset: 3px;
}

/* ── Icon ───────────────────────────────────────────────── */
.cfcb__icon {
    width: var(--cfcb-icon);
    height: var(--cfcb-icon);
    fill: var(--cfcb-icon-color);
    flex-shrink: 0;
    display: block;
    pointer-events: none;
}

/* ── Pulse ring ─────────────────────────────────────────── */
.cfcb__btn.cfcb--pulse::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 3px solid var(--cfcb-bg);
    animation: cfcb-pulse 2.2s ease-out infinite;
    pointer-events: none;
}

@keyframes cfcb-pulse {
    0%   { transform: scale(1);    opacity: .7; }
    70%  { transform: scale(1.55); opacity: 0;  }
    100% { transform: scale(1.55); opacity: 0;  }
}

/* ── Tooltip ────────────────────────────────────────────── */
.cfcb__tooltip {
    position: absolute;
    right: calc(var(--cfcb-size) + 14px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: #1a1a2e;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 13px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: .2px;
    box-shadow: 0 4px 14px rgba(0,0,0,.22);
    z-index: 1;
}
.cfcb__tooltip::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right: none;
    border-left-color: #1a1a2e;
}

#cfcb-wrap:hover .cfcb__tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ── Side label ─────────────────────────────────────────── */
.cfcb__label {
    background: var(--cfcb-label-bg);
    color: var(--cfcb-label-color);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 3px 12px rgba(0,0,0,.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: .3px;
    cursor: default;
}

/* ── Responsive visibility ──────────────────────────────── */
@media (max-width: 767px) {
    #cfcb-wrap.cfcb--hide-mobile { display: none !important; }
}
@media (min-width: 768px) {
    #cfcb-wrap.cfcb--hide-desktop { display: none !important; }
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .cfcb__btn.cfcb--pulse::before { animation: none; }
    #cfcb-wrap { transition: opacity .1s; }
    .cfcb__btn { transition: none; }
}
