/* ===== WRAPPER ===== */
.wpbolt-wrapper {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.wpbolt-wrapper.wpbolt-left { align-items: flex-start; }

/* ===== HIDE RULES ===== */
@media (max-width: 767px) { .wpbolt-hide-mobile { display: none !important; } }
@media (min-width: 768px) { .wpbolt-hide-desktop { display: none !important; } }

/* ===== BUTTON ===== */
.wpbolt-btn-wrap { position: relative; display: flex; align-items: center; gap: 10px; }
.wpbolt-left .wpbolt-btn-wrap { flex-direction: row-reverse; }

.wpbolt-button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    box-shadow: 0 4px 20px rgba(37,211,102,0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    flex-shrink: 0;
}
.wpbolt-button svg { width: 55%; height: 55%; flex-shrink: 0; }
.wpbolt-button:hover { transform: scale(1.12); box-shadow: 0 6px 28px rgba(37,211,102,0.65); }

/* ===== CTA LABEL ===== */
.wpbolt-cta-label {
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    font-family: sans-serif;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    cursor: pointer;
}

/* ===== TOOLTIP ===== */
.wpbolt-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    font-family: sans-serif;
}
.wpbolt-left .wpbolt-tooltip { right: auto; left: calc(100% + 12px); }
.wpbolt-tooltip::after {
    content: '';
    position: absolute;
    top: 50%; right: -5px;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #1a1a1a;
    border-right: 0;
}
.wpbolt-left .wpbolt-tooltip::after { right: auto; left: -5px; border-left: 0; border-right-color: #1a1a1a; }
.wpbolt-button:hover .wpbolt-tooltip { opacity: 1; }

/* ===== BADGE ===== */
.wpbolt-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: #ff3b30;
    color: white;
    font-size: 11px;
    font-weight: 700;
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    animation: wpbolt-badge-pop 0.4s ease;
}
@keyframes wpbolt-badge-pop { 0%{transform:scale(0)} 70%{transform:scale(1.2)} 100%{transform:scale(1)} }

/* ===== ANIMATIONS ===== */
.wpbolt-anim-bounce .wpbolt-button { animation: wpbolt-bounce 2.2s ease-in-out infinite; }
@keyframes wpbolt-bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

.wpbolt-anim-pulse .wpbolt-button { animation: wpbolt-pulse 2s ease-in-out infinite; }
@keyframes wpbolt-pulse {
    0%{box-shadow:0 0 0 0 rgba(37,211,102,0.6)}
    70%{box-shadow:0 0 0 16px rgba(37,211,102,0)}
    100%{box-shadow:0 0 0 0 rgba(37,211,102,0)}
}

.wpbolt-anim-shake .wpbolt-button { animation: wpbolt-shake 3s ease-in-out infinite; }
@keyframes wpbolt-shake {
    0%,90%,100%{transform:rotate(0deg)}
    92%{transform:rotate(-12deg)}
    94%{transform:rotate(12deg)}
    96%{transform:rotate(-8deg)}
    98%{transform:rotate(8deg)}
}

.wpbolt-button:hover { animation: none !important; transform: scale(1.12); }

/* ===== WELCOME BUBBLE ===== */
.wpbolt-bubble {
    background: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    font-family: sans-serif;
    font-size: 13px;
    color: #333;
    max-width: 220px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: wpbolt-fadein 0.4s ease;
}
.wpbolt-bubble-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 12px;
    padding: 0;
    flex-shrink: 0;
}
@keyframes wpbolt-fadein { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }

/* ===== CHAT POPUP ===== */
.wpbolt-popup {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    width: 300px;
    font-family: sans-serif;
    animation: wpbolt-fadein 0.3s ease;
}

.wpbolt-popup-header { padding: 16px; }
.wpbolt-popup-agent { display: flex; align-items: center; gap: 10px; position: relative; }
.wpbolt-popup-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.5); flex-shrink: 0; }
.wpbolt-popup-avatar-default { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.wpbolt-popup-info { flex: 1; }
.wpbolt-popup-info strong { display: block; color: white; font-size: 14px; font-weight: 700; }
.wpbolt-popup-info span { color: rgba(255,255,255,0.8); font-size: 12px; }

.wpbolt-status-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid white; flex-shrink: 0; }
.wpbolt-status-online { background: #4ade80; }
.wpbolt-status-away   { background: #fbbf24; }
.wpbolt-status-offline{ background: #9ca3af; }

.wpbolt-popup-close {
    position: absolute; top: 0; right: 0;
    background: rgba(255,255,255,0.2);
    border: none; color: white;
    width: 24px; height: 24px;
    border-radius: 50%; cursor: pointer;
    font-size: 12px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
}

.wpbolt-popup-body { padding: 16px; background: #f9fafb; }
.wpbolt-popup-msg {
    background: white;
    padding: 10px 14px;
    border-radius: 0 12px 12px 12px;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.wpbolt-offline-msg { background: #fff7ed; color: #92400e; }
.wpbolt-popup-time { font-size: 11px; color: #9ca3af; margin-top: 6px; text-align: right; }

.wpbolt-popup-footer { padding: 12px 16px; }
.wpbolt-popup-cta {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    color: white; text-decoration: none;
    padding: 12px; border-radius: 10px;
    font-size: 14px; font-weight: 600;
    transition: opacity 0.2s;
}
.wpbolt-popup-cta:hover { opacity: 0.9; color: white; }
