/* WP Contact Widget Pro v3 — Frontend */

:root {
    --wcw-size:   56px;
    --wcw-bottom: 28px;
}

#wcw-widget {
    position: fixed;
    bottom: var(--wcw-bottom);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#wcw-widget.wcw-right { right: 24px; align-items: flex-end; }
#wcw-widget.wcw-left  { left: 24px;  align-items: flex-start; }

/* ── Round button ── */
.wcw-btn {
    position: relative;
    width: var(--wcw-size);
    height: var(--wcw-size);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.22);
    transition: width .28s cubic-bezier(.4,0,.2,1),
                border-radius .28s cubic-bezier(.4,0,.2,1),
                padding .28s cubic-bezier(.4,0,.2,1),
                transform .18s ease,
                box-shadow .18s ease;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Pulse ring */
.wcw-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    opacity: 0.4;
    animation: wcw-pulse 2.8s ease-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes wcw-pulse {
    0%   { transform: scale(1);    opacity: 0.4; }
    70%  { transform: scale(1.6);  opacity: 0; }
    100% { transform: scale(1.6);  opacity: 0; }
}

/* ── Icon ── */
.wcw-icon {
    position: relative;
    z-index: 1;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    pointer-events: none;
}
.wcw-icon svg { width: 24px; height: 24px; }
.wcw-icon img { width: 24px; height: 24px; object-fit: contain; }

/* ── Label ── */
.wcw-label {
    position: relative;
    z-index: 1;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 13px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transition: max-width .28s cubic-bezier(.4,0,.2,1), opacity .2s ease, margin .28s ease;
    pointer-events: none;
}

/* ── Hover: expand to pill ── */
.wcw-btn:hover {
    border-radius: 50px;
    width: auto;
    padding: 0 16px 0 12px;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0,0,0,.28);
    text-decoration: none;
    color: #fff;
}
.wcw-btn:hover::after { display: none; }
.wcw-btn:hover .wcw-label {
    max-width: 180px;
    opacity: 1;
    margin-left: 8px;
}
.wcw-btn:active { transform: scale(0.96); }

/* Right-side: label expands leftward */
#wcw-widget.wcw-right .wcw-btn { flex-direction: row-reverse; }
#wcw-widget.wcw-right .wcw-btn:hover { padding: 0 12px 0 16px; }
#wcw-widget.wcw-right .wcw-btn:hover .wcw-label { margin-left: 0; margin-right: 8px; }

/* ── Responsive ── */
@media (max-width: 767px) {
    #wcw-widget.wcw-desktop-only { display: none !important; }
    /* Slightly smaller on mobile */
    :root { --wcw-size: max(44px, calc(var(--wcw-size) - 8px)); }
}
@media (min-width: 768px) {
    #wcw-widget.wcw-mobile-only { display: none !important; }
}

/* ── Mobile tap state ── */
.wcw-btn.wcw-tapped {
    border-radius: 50px;
    width: auto;
    padding: 0 16px 0 12px;
}
.wcw-btn.wcw-tapped .wcw-label { max-width: 180px; opacity: 1; margin-left: 8px; }
.wcw-btn.wcw-tapped::after { display: none; }

#wcw-widget.wcw-right .wcw-btn.wcw-tapped { padding: 0 12px 0 16px; }
#wcw-widget.wcw-right .wcw-btn.wcw-tapped .wcw-label { margin-left: 0; margin-right: 8px; }
