/* CTA Tracker Frontend */
#cta-tracker-container * { box-sizing: border-box; }

/* ---- Base Button ---- */
.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none !important;
    font-family: inherit;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    position: fixed;
    z-index: 99999;
    padding: 0 20px;
    transition: transform .2s, opacity .2s, box-shadow .2s;
    will-change: transform;
}
.cta-btn:hover { transform: scale(1.05); opacity: .95; }
.cta-btn:active { transform: scale(.97); }

/* ---- Icon ---- */
.cta-btn-icon { flex-shrink: 0; display: flex; align-items: center; }
.cta-btn-icon svg { width: 1em; height: 1em; fill: currentColor; }

/* ---- Text ---- */
.cta-btn-text { display: flex; flex-direction: column; }
.cta-btn-label { font-size: inherit; }
.cta-btn-sub { font-size: .72em; opacity: .85; font-weight: 400; }

/* ---- Shadow ---- */
.cta-shadow { box-shadow: 0 4px 24px rgba(0,0,0,.28) !important; }

/* ---- Floating positions ---- */
.cta-disp-floating.cta-pos-bottom-right  { bottom: 24px; right: 24px; }
.cta-disp-floating.cta-pos-bottom-left   { bottom: 24px; left:  24px; }
.cta-disp-floating.cta-pos-bottom-center { bottom: 24px; left: 50%; transform: translateX(-50%); }
.cta-disp-floating.cta-pos-bottom-center:hover { transform: translateX(-50%) scale(1.05); }
.cta-disp-floating.cta-pos-left-middle   { left: 24px; top: 50%; transform: translateY(-50%); }
.cta-disp-floating.cta-pos-left-middle:hover  { transform: translateY(-50%) scale(1.05); }
.cta-disp-floating.cta-pos-right-middle  { right: 24px; top: 50%; transform: translateY(-50%); }
.cta-disp-floating.cta-pos-right-middle:hover { transform: translateY(-50%) scale(1.05); }

/* ---- Bar (full width) ---- */
.cta-disp-bar {
    left: 0; right: 0; width: 100%;
    border-radius: 0 !important;
    padding: 14px 20px;
    min-width: unset !important;
    justify-content: center;
    gap: 16px;
}
.cta-disp-bar.cta-pos-bottom-full { bottom: 0; }
.cta-disp-bar.cta-pos-top-full    { top: 0; }
.cta-disp-bar.cta-pos-bottom-left,
.cta-disp-bar.cta-pos-bottom-right,
.cta-disp-bar.cta-pos-bottom-center { bottom: 0; }

/* ---- Animations ---- */
@keyframes cta-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.4), 0 4px 24px rgba(0,0,0,.28); }
    50%       { box-shadow: 0 0 0 10px rgba(255,255,255,0), 0 4px 24px rgba(0,0,0,.28); }
}
@keyframes cta-bounce {
    0%,100% { transform: translateY(0); }
    30%     { transform: translateY(-8px); }
    60%     { transform: translateY(-3px); }
}
@keyframes cta-shake {
    0%,100% { transform: rotate(0deg); }
    25%     { transform: rotate(-4deg); }
    75%     { transform: rotate(4deg); }
}
@keyframes cta-glow {
    0%,100% { filter: brightness(1) drop-shadow(0 0 0px currentColor); }
    50%     { filter: brightness(1.15) drop-shadow(0 0 8px currentColor); }
}

.cta-anim-pulse  { animation: cta-pulse  2s ease-in-out infinite; }
.cta-anim-bounce { animation: cta-bounce 2s ease-in-out infinite; }
.cta-anim-shake  { animation: cta-shake  3s ease-in-out infinite; }
.cta-anim-glow   { animation: cta-glow   2s ease-in-out infinite; }

/* bounce/shake positions need translate preservation */
.cta-disp-floating.cta-pos-bottom-right.cta-anim-bounce,
.cta-disp-floating.cta-pos-bottom-right.cta-anim-shake { transform-origin: center bottom; }
.cta-disp-floating.cta-pos-bottom-left.cta-anim-bounce,
.cta-disp-floating.cta-pos-bottom-left.cta-anim-shake  { transform-origin: center bottom; }

/* ---- Device visibility ---- */
@media (min-width: 769px) { .cta-device-mobile  { display: none !important; } }
@media (max-width: 768px) { .cta-device-desktop { display: none !important; } }

/* ---- Mobile adjustments ---- */
@media (max-width: 600px) {
    .cta-disp-floating.cta-pos-bottom-right { bottom: 16px; right: 16px; }
    .cta-disp-floating.cta-pos-bottom-left  { bottom: 16px; left:  16px; }
    .cta-btn-label { font-size: .9em; }
    .cta-btn-sub   { font-size: .68em; }
}
