/* ============================================================
   WA Click Tracker – Floating Widget Styles
   ============================================================ */

/* ---- Widget container ---- */
#wact-widget {
    position: fixed !important;
    z-index: 999999 !important;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* ---- Position variants ---- */
#wact-widget.wact-position-bottom-right { bottom: 24px !important; right: 24px !important; }
#wact-widget.wact-position-bottom-left  { bottom: 24px !important; left: 24px !important; }
#wact-widget.wact-position-top-right    { top: 24px !important; right: 24px !important; }
#wact-widget.wact-position-top-left     { top: 24px !important; left: 24px !important; }

/* ---- Icon button ---- */
.wact-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wact-color, #25D366);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45), 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s;
    color: #fff;
}
.wact-icon svg { display: block; }

/* ---- Size variants ---- */
.wact-size-small  .wact-icon { width: 48px; height: 48px; }
.wact-size-small  .wact-icon svg { width: 24px; height: 24px; }

.wact-size-medium .wact-icon { width: 60px; height: 60px; }
.wact-size-medium .wact-icon svg { width: 30px; height: 30px; }

.wact-size-large  .wact-icon { width: 72px; height: 72px; }
.wact-size-large  .wact-icon svg { width: 36px; height: 36px; }

/* ---- Hover ---- */
#wact-widget:hover  .wact-icon { transform: scale(1.12); box-shadow: 0 6px 28px rgba(37, 211, 102, 0.6), 0 4px 12px rgba(0,0,0,0.3); }
#wact-widget:focus  .wact-icon { outline: 3px solid rgba(37, 211, 102, 0.5); }
#wact-widget.wact-clicked .wact-icon { transform: scale(0.92); }

/* ---- Pulse ring ---- */
.wact-pulse {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--wact-color, #25D366);
    opacity: 0;
    z-index: 1;
    animation: wactPulse 2.4s ease-out infinite;
}
@keyframes wactPulse {
    0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.65; }
    70%  { transform: translate(-50%, -50%) scale(1.7); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1.7); opacity: 0; }
}

/* ---- Tooltip ---- */
.wact-tooltip {
    position: absolute;
    white-space: nowrap;
    background: #1a1a2e;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: 1px solid rgba(37, 211, 102, 0.25);
    z-index: 3;
}

/* Position tooltip based on widget corner */
.wact-position-bottom-right .wact-tooltip,
.wact-position-top-right    .wact-tooltip {
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
}
.wact-position-bottom-right .wact-tooltip::after,
.wact-position-top-right    .wact-tooltip::after {
    content: '';
    position: absolute;
    right: -6px; top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right: none;
    border-left-color: #1a1a2e;
}

.wact-position-bottom-left .wact-tooltip,
.wact-position-top-left    .wact-tooltip {
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
}
.wact-position-bottom-left .wact-tooltip::after,
.wact-position-top-left    .wact-tooltip::after {
    content: '';
    position: absolute;
    left: -6px; top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left: none;
    border-right-color: #1a1a2e;
}

/* Show tooltip on hover */
#wact-widget:hover .wact-tooltip,
#wact-widget:focus .wact-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

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

/* ---- Shortcode inline button ---- */
.wact-shortcode-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 10px;
    padding: 12px 22px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}
.wact-shortcode-btn:hover {
    background: #1ebe58;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
    color: #fff !important;
}
.wact-shortcode-btn:active { transform: translateY(0); }
.wact-shortcode-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.wact-shortcode-btn.wact-loading { opacity: 0.75; pointer-events: none; }
