/* ==========================================================================
   CTA Bar Big — cta-bar-big.css v2.0.0
   by BigPromoter.com
   ========================================================================== */

:root {
    --cbb-color: #E74C3C;
    --cbb-color-dark: color-mix(in srgb, var(--cbb-color) 70%, #000);
    --cbb-white: #ffffff;
    --cbb-dark: #1a1a1a;
    --cbb-shadow: 0 6px 24px rgba(0,0,0,.30);
    --cbb-fab-size: 62px;
    --cbb-z: 9990;
    --cbb-bottom: 26px;
    --cbb-side: 24px;
    --cbb-speed: 280ms;
    --cbb-ease: cubic-bezier(.34,1.56,.64,1);
    --cbb-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================================
   FLOATING WIDGET
   ============================================================ */
.cbb-widget {
    position: fixed;
    bottom: var(--cbb-bottom);
    z-index: var(--cbb-z);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    font-family: var(--cbb-font);
}
.cbb-right { right: var(--cbb-side); align-items: flex-end; }
.cbb-left  { left:  var(--cbb-side); align-items: flex-start; }

/* ---- Urgency badge ---- */
.cbb-urgency {
    background: #ff6b35;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(255,107,53,.5);
    animation: cbbBounce 1.6s ease-in-out infinite;
    white-space: nowrap;
    text-transform: uppercase;
}
@keyframes cbbBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-4px); }
}

/* ---- FAB wrapper: holds the pulse ring + button in one layer ---- */
.cbb-fab-wrap {
    position: relative;
    width: var(--cbb-fab-size);
    height: var(--cbb-fab-size);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Pulse ring — absolutely centred behind the FAB ---- */
.cbb-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--cbb-color);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}
.cbb-widget.pulse-on .cbb-ring {
    animation: cbbPulse 2.4s ease-out infinite;
}

@keyframes cbbPulse {
    0%   { transform: scale(1);   opacity: .55; }
    70%  { transform: scale(2.1); opacity: 0;   }
    100% { transform: scale(2.1); opacity: 0;   }
}

/* ---- FAB ---- */
.cbb-fab {
    position: relative;
    z-index: 1;              /* sits above the pulse ring */
    width: var(--cbb-fab-size);
    height: var(--cbb-fab-size);
    border-radius: 50%;
    background: var(--cbb-color);
    border: none;
    cursor: pointer;
    box-shadow: var(--cbb-shadow);
    color: var(--cbb-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--cbb-speed) ease,
                transform var(--cbb-speed) var(--cbb-ease),
                box-shadow var(--cbb-speed) ease;
    -webkit-tap-highlight-color: transparent;
    outline-offset: 3px;
}
.cbb-fab:hover {
    background: var(--cbb-color-dark);
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
.cbb-fab:active { transform: scale(.94); }

.cbb-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--cbb-speed) ease, transform var(--cbb-speed) var(--cbb-ease);
}
.cbb-icon svg { width: 26px; height: 26px; }

.cbb-icon-open  { opacity: 1;  transform: rotate(0deg)   scale(1);   }
.cbb-icon-close { opacity: 0;  transform: rotate(-90deg) scale(.7);  }

.cbb-fab[aria-expanded="true"] .cbb-icon-open  { opacity: 0;  transform: rotate(90deg) scale(.7);  }
.cbb-fab[aria-expanded="true"] .cbb-icon-close { opacity: 1;  transform: rotate(0deg)  scale(1);   }

/* ---- Speed-dial menu ---- */
.cbb-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    align-items: flex-end;
}
.cbb-left .cbb-menu { align-items: flex-start; }

/* ---- Time-aware status pill ---- */
.cbb-status {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--cbb-speed) ease, transform var(--cbb-speed) var(--cbb-ease);
}
.cbb-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cbb-status--open  { background: #d4edda; color: #155724; }
.cbb-status--open::before  { background: #28a745; box-shadow: 0 0 0 2px rgba(40,167,69,.25); animation: cbbDot 1.4s ease infinite; }
.cbb-status--closed { background: #f8d7da; color: #721c24; }
.cbb-status--closed::before { background: #dc3545; }


@keyframes cbbDot {
    0%,100% { box-shadow: 0 0 0 2px rgba(40,167,69,.25); }
    50%      { box-shadow: 0 0 0 5px rgba(40,167,69,.08); }
}

/* ---- Google Reviews badge (inside menu) ---- */
.cbb-reviews {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border-radius: 20px;
    padding: 5px 12px 5px 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,.18);
    font-size: 12px;
    font-weight: 600;
    color: var(--cbb-dark);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--cbb-speed) ease, transform var(--cbb-speed) var(--cbb-ease);
}
.cbb-reviews-stars { color: #FBBC05; font-size: 13px; letter-spacing: 1px; }
.cbb-star--empty   { color: #ddd; }
.cbb-reviews-text  { color: #555; font-size: 11px; }
.cbb-reviews-text strong { color: var(--cbb-dark); }


/* ---- Action items ---- */
.cbb-action {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    opacity: 0;
    transform: translateY(10px) scale(.93);
    transition: opacity var(--cbb-speed) ease,
                transform var(--cbb-speed) var(--cbb-ease);
    pointer-events: none;
}
.cbb-left .cbb-action { flex-direction: row-reverse; transform: translateY(10px) scale(.93); }

/* Menu open state */
.cbb-menu.is-open { pointer-events: auto; }
.cbb-menu.is-open .cbb-action,
.cbb-menu.is-open .cbb-status,
.cbb-menu.is-open .cbb-reviews {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
/* Stagger delays */
.cbb-menu.is-open > *:nth-child(1) { transition-delay: .03s; }
.cbb-menu.is-open > *:nth-child(2) { transition-delay: .07s; }
.cbb-menu.is-open > *:nth-child(3) { transition-delay: .11s; }
.cbb-menu.is-open > *:nth-child(4) { transition-delay: .15s; }
.cbb-menu.is-open > *:nth-child(5) { transition-delay: .19s; }
.cbb-menu.is-open > *:nth-child(6) { transition-delay: .23s; }

/* Action label pill */
.cbb-action-label {
    background: var(--cbb-dark);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
    font-family: var(--cbb-font);
}

/* Action icon circle */
.cbb-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cbb-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--cbb-shadow);
    color: #fff;
    transition: transform 200ms var(--cbb-ease), background 200ms ease;
}
.cbb-action-icon svg { width: 20px; height: 20px; }
.cbb-action:hover .cbb-action-icon { background: var(--cbb-color-dark); transform: scale(1.12); }

/* Action type colors */
.cbb-action--phone .cbb-action-icon  { background: var(--cbb-color); }
.cbb-action--sms   .cbb-action-icon  { background: #2ecc71; }
.cbb-action--sms:hover .cbb-action-icon { background: #27ae60; }
.cbb-action--quote .cbb-action-icon  { background: #2c3e50; }
.cbb-action--quote:hover .cbb-action-icon { background: #1a252f; }
.cbb-action--chat  .cbb-action-icon  { background: #8e44ad; }
.cbb-action--chat:hover .cbb-action-icon { background: #6c3483; }

/* ============================================================
   STICKY SCROLL BAR
   ============================================================ */
.cbb-sticky-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: calc(var(--cbb-z) - 1);
    background: var(--cbb-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 20px;
    font-family: var(--cbb-font);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
    transform: translateY(-100%);
    transition: transform 380ms cubic-bezier(.4,0,.2,1);
    will-change: transform;
}
.cbb-sticky-bar.is-visible { transform: translateY(0); }

.cbb-sticky-bar__text { flex: 1; text-align: center; }

.cbb-sticky-bar__btn {
    background: #fff;
    color: var(--cbb-color);
    padding: 7px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 180ms ease, box-shadow 180ms ease;
    flex-shrink: 0;
}
.cbb-sticky-bar__btn:hover { transform: scale(1.04); box-shadow: 0 3px 12px rgba(0,0,0,.2); }

.cbb-sticky-bar__close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,.75);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 150ms;
}
.cbb-sticky-bar__close:hover { color: #fff; }

/* ============================================================
   EXIT-INTENT POPUP
   ============================================================ */
.cbb-exit-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--cbb-z) + 10);
    background: rgba(0,0,0,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 320ms ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.cbb-exit-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.cbb-exit-modal {
    background: #fff;
    border-radius: 18px;
    padding: 40px 36px 32px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    text-align: center;
    position: relative;
    font-family: var(--cbb-font);
    transform: scale(.9) translateY(20px);
    transition: transform 320ms var(--cbb-ease);
}
.cbb-exit-overlay.is-visible .cbb-exit-modal {
    transform: scale(1) translateY(0);
}

.cbb-exit-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    color: #aaa;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 150ms;
}
.cbb-exit-close:hover { color: #333; }

.cbb-exit-icon { margin-bottom: 16px; display: flex; justify-content: center; }
/* Reuse reviews badge inside exit popup (standalone) */
.cbb-exit-icon .cbb-reviews {
    opacity: 1;
    transform: none;
    box-shadow: 0 3px 12px rgba(0,0,0,.15);
}

.cbb-exit-modal h2 {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 10px;
    line-height: 1.3;
}
.cbb-exit-modal p {
    font-size: 15px;
    color: #555;
    margin: 0 0 24px;
    line-height: 1.6;
}

.cbb-exit-cta {
    display: inline-block;
    background: var(--cbb-color);
    color: #fff;
    padding: 14px 32px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.cbb-exit-cta:hover {
    background: var(--cbb-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0,0,0,.3);
}

.cbb-exit-dismiss {
    background: none;
    border: none;
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
    margin-top: 16px;
    padding: 4px 8px;
    transition: color 150ms;
    font-family: var(--cbb-font);
}
.cbb-exit-dismiss:hover { color: #555; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    :root {
        --cbb-fab-size: 56px;
        --cbb-bottom: 18px;
        --cbb-side: 16px;
    }
    .cbb-action-icon { width: 44px; height: 44px; }
    .cbb-action-icon svg { width: 18px; height: 18px; }
    .cbb-action-label { font-size: 12px; padding: 5px 12px; }
    .cbb-sticky-bar { font-size: 12px; padding: 8px 12px; gap: 10px; }
    .cbb-sticky-bar__btn { padding: 6px 13px; font-size: 12px; }
    .cbb-exit-modal { padding: 32px 22px 26px; }
    .cbb-exit-modal h2 { font-size: 19px; }
}

/* ---- Reduce motion ---- */
@media (prefers-reduced-motion: reduce) {
    .cbb-urgency, .cbb-ring, .cbb-status--open::before { animation: none; }
    .cbb-fab, .cbb-icon, .cbb-action, .cbb-action-icon,
    .cbb-status, .cbb-reviews, .cbb-exit-overlay,
    .cbb-exit-modal, .cbb-sticky-bar { transition: none; }
}
