/**
 * PowerChat Frontend Styles (Robust Zero-Collision & Theme-Proof Scoping)
 */

.powerchat-widget-container {
    position: fixed !important;
    z-index: var(--pc-z-index, 999990) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    line-height: 1.4 !important;
    -webkit-font-smoothing: antialiased !important;
}

.powerchat-pos-bottom {
    bottom: var(--pc-offset-v, 30px) !important;
    top: auto !important;
}

.powerchat-pos-top {
    top: var(--pc-offset-v, 30px) !important;
    bottom: auto !important;
}

.powerchat-pos-right {
    right: var(--pc-offset-h, 30px) !important;
    left: auto !important;
}

.powerchat-pos-left {
    left: var(--pc-offset-h, 30px) !important;
    right: auto !important;
}

/* Floating Trigger Button (Theme-Proof Reset) */
button.powerchat-main-btn,
.powerchat-main-btn {
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    width: var(--pc-btn-size, 58px) !important;
    height: var(--pc-btn-size, 58px) !important;
    min-width: var(--pc-btn-size, 58px) !important;
    min-height: var(--pc-btn-size, 58px) !important;
    background-color: var(--pc-btn-bg, #25D366) !important;
    background-image: none !important;
    border-radius: var(--pc-btn-radius, 50%) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 5 !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: 1 !important;
    text-decoration: none !important;
    vertical-align: middle !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18) !important;
    transform: none;
    transition: background-color 0.2s ease !important;
    will-change: transform;
}

button.powerchat-main-btn:hover,
.powerchat-main-btn:hover {
    background-color: var(--pc-btn-bg, #25D366) !important;
    color: #ffffff !important;
    transform: none;
}

/* Zero Hover Float enforcement: transform-based periodic effects are exempt,
   every other state must never lift the button on hover.
   Keep this list in sync with the TARGET family in powerchat-animations.css. */
.powerchat-widget-container:not(.powerchat-anim-heartbeat):not(.powerchat-anim-bounce):not(.powerchat-anim-jump):not(.powerchat-anim-jelly):not(.powerchat-anim-rubberband):not(.powerchat-anim-wiggle):not(.powerchat-anim-waggle):not(.powerchat-anim-shake):not(.powerchat-anim-tada):not(.powerchat-anim-flip3d):not(.powerchat-anim-glow-breath) .powerchat-main-btn:hover {
    transform: none !important;
    translate: none !important;
    scale: none !important;
    rotate: none !important;
}

.powerchat-main-btn svg {
    width: var(--pc-icon-size, calc(var(--pc-btn-size, 58px) * 0.55)) !important;
    height: var(--pc-icon-size, calc(var(--pc-btn-size, 58px) * 0.55)) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    fill: #ffffff !important;
    color: #ffffff !important;
    display: block !important;
    margin: 0 !important;
    pointer-events: none !important;
}

/* Icon colour guard.
 *
 * An inline SVG carries its colour as a `fill` presentation attribute, and
 * every author rule beats that attribute. Themes commonly ship a rule such as
 * `body svg { fill: #666 }`, which turned the white header glyph and the Start
 * Chat icon grey on the live site while the admin preview stayed correct (the
 * preview never loads the theme stylesheet). This selector is more specific
 * than `body svg`, so the widget keeps its own colour, and currentColor keeps
 * every icon in step with the text beside it. */
.powerchat-widget-container svg {
    fill: currentColor !important;
}

/* Unread Badge */
.powerchat-badge-count {
    position: absolute !important;
    top: -2px !important;
    right: -2px !important;
    background: var(--pc-badge-bg, #FF4C4C) !important;
    color: var(--pc-badge-color, #ffffff) !important;
    border: 2px solid var(--pc-badge-border, #ffffff) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 4px !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 6 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    line-height: 1 !important;
    animation: pcBadgePop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.powerchat-badge-count[hidden] {
    display: none !important;
}

@keyframes pcBadgePop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Tooltip label next to the floating button */
.powerchat-tooltip {
    position: absolute !important;
    top: calc(var(--pc-btn-size, 58px) / 2) !important;
    transform: translateY(-50%) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: max-content !important;
    max-width: 240px !important;
    padding: var(--pc-tip-pad, 8px 12px) !important;
    background: var(--pc-tip-bg, #0F172A) !important;
    color: var(--pc-tip-fg, #FFFFFF) !important;
    border: var(--pc-tip-bw, 0px) solid var(--pc-tip-border, #0F172A) !important;
    border-radius: var(--pc-tip-radius, 8px) !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
    text-transform: none !important;
    box-sizing: border-box !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18) !important;
    z-index: 4 !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.16s ease, visibility 0.16s ease !important;
}

.powerchat-tooltip[hidden] {
    display: none !important;
}

/* The label is a tooltip: it only appears while the visitor points at the
   button, or reaches it with the keyboard. */
.powerchat-widget-container:hover .powerchat-tooltip,
.powerchat-widget-container:focus-within .powerchat-tooltip {
    opacity: 1 !important;
    visibility: visible !important;
    animation: pcTipIn 0.2s ease-out !important;
}

/* The label always sits on the outer, free side of the button. */
.powerchat-pos-right .powerchat-tooltip {
    right: calc(100% + 12px) !important;
    left: auto !important;
}

.powerchat-pos-left .powerchat-tooltip {
    left: calc(100% + 12px) !important;
    right: auto !important;
}

.powerchat-tooltip-dot {
    width: 8px !important;
    height: 8px !important;
    min-width: 8px !important;
    border-radius: 50% !important;
    background: var(--pc-tip-dot, #22C55E) !important;
    flex: 0 0 auto !important;
    animation: pcTipDot 1.8s ease-in-out infinite !important;
}

.powerchat-tooltip-text {
    display: inline !important;
    color: inherit !important;
    margin: 0 !important;
}

@keyframes pcTipIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes pcTipDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(0.72); opacity: 0.65; }
}

/* Multi-Agent Popup Modal */
.powerchat-popup {
    position: absolute !important;
    width: var(--pc-popup-w-desktop, 360px) !important;
    max-width: calc(100vw - 32px) !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 40px -6px rgba(0, 0, 0, 0.22) !important;
    border: none !important;
    overflow: hidden !important;
    display: none !important;
    flex-direction: column !important;
    z-index: 20 !important;
    box-sizing: border-box !important;
}

.powerchat-pos-bottom .powerchat-popup {
    bottom: calc(var(--pc-btn-size, 58px) + 16px) !important;
    top: auto !important;
}

.powerchat-pos-top .powerchat-popup {
    top: calc(var(--pc-btn-size, 58px) + 16px) !important;
    bottom: auto !important;
}

.powerchat-pos-right .powerchat-popup {
    right: 0 !important;
    left: auto !important;
}

.powerchat-pos-left .powerchat-popup {
    left: 0 !important;
    right: auto !important;
}

.powerchat-popup.is-active {
    display: flex !important;
}

/* Header */
.powerchat-header {
    background: var(--pc-header-bg, #075E54) !important;
    color: #ffffff !important;
    padding: 16px 42px 16px 18px !important;
    position: relative !important;
    box-sizing: border-box !important;
}

/* Close Button (Theme Reset) */
button.powerchat-close-btn,
.powerchat-close-btn {
    all: unset !important;
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    left: auto !important;
    bottom: auto !important;
    width: 24px !important;
    height: 24px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #ffffff !important;
    opacity: 0.8 !important;
    cursor: pointer !important;
    font-size: 18px !important;
    line-height: 24px !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
}

button.powerchat-close-btn:hover,
.powerchat-close-btn:hover {
    opacity: 1 !important;
    background: transparent !important;
    color: #ffffff !important;
}

.powerchat-header-title {
    font-size: var(--pc-title-size, 15px) !important;
    font-weight: 700 !important;
    color: var(--pc-header-title, #ffffff) !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.powerchat-header-sub {
    font-size: var(--pc-sub-size, 12px) !important;
    color: var(--pc-header-sub, rgba(255, 255, 255, 0.85)) !important;
    margin: 4px 0 0 0 !important;
    line-height: 1.35 !important;
}

/* Body */
.powerchat-body {
    background: #f9fafb !important;
    padding: 12px !important;
    max-height: 280px !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    box-sizing: border-box !important;
}

.powerchat-agent-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    padding: 10px 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    color: inherit !important;
    transform: none !important;
    transition: border-color 0.15s ease !important;
    box-sizing: border-box !important;
}

.powerchat-agent-card:hover {
    border-color: #cbd5e1 !important;
}

.powerchat-avatar {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    border-radius: 50% !important;
    background: #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    color: #475569 !important;
    font-size: 13px !important;
    position: relative !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
}

.powerchat-avatar img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

.powerchat-status-dot {
    position: absolute !important;
    bottom: -1px !important;
    right: -1px !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    border: 2px solid #ffffff !important;
}

.status-online {
    background: #16a34a !important;
}

.status-offline {
    background: #d97706 !important;
}

.powerchat-agent-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.powerchat-agent-name {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
}

.powerchat-agent-role {
    font-size: 11px !important;
    color: #64748b !important;
    margin-top: 1px !important;
}

.powerchat-agent-status-text {
    font-size: 11px !important;
    font-weight: 500 !important;
    margin-top: 2px !important;
}

.status-online-text {
    color: #16a34a !important;
}

.status-offline-text {
    color: #d97706 !important;
}

.powerchat-action-icon {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: #f0fdf4 !important;
    color: #16a34a !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.powerchat-action-icon svg {
    width: 16px !important;
    height: 16px !important;
    fill: currentColor !important;
}

/* WooCommerce Order Button */
.powerchat-woo-order-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    background-color: #25D366 !important;
    background: #25D366 !important;
    color: #ffffff !important;
    padding: 11px 20px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transform: none !important;
    transition: background-color 0.2s ease !important;
    box-sizing: border-box !important;
}

.powerchat-woo-order-btn:hover {
    background-color: #20bd5a !important;
    background: #20bd5a !important;
    color: #ffffff !important;
}

.powerchat-woo-order-btn svg {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor !important;
    flex-shrink: 0 !important;
}

/* Single-Agent Chat Box Styles */
.powerchat-single-header-content {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.powerchat-single-avatar {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

.powerchat-single-avatar svg {
    width: 30px !important;
    height: 30px !important;
}

.powerchat-single-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
}

.powerchat-single-header-meta {
    flex: 1 !important;
    min-width: 0 !important;
}

.powerchat-single-body {
    background-color: #e5ddd5 !important;
    background-image: url('../images/chat-bg.jpg') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: cover !important;
    padding: 16px !important;
    box-sizing: border-box !important;
}

.powerchat-chat-bubble {
    background: #ffffff !important;
    border-radius: 8px 8px 8px 2px !important;
    padding: 10px 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
    margin-bottom: 14px !important;
    position: relative !important;
    max-width: 90% !important;
}

.powerchat-bubble-author {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #075E54 !important;
    margin-bottom: 4px !important;
}

.powerchat-bubble-text {
    font-size: var(--pc-msg-size, 13px) !important;
    line-height: 1.45 !important;
    color: var(--pc-msg-color, #111827) !important;
    word-break: break-word !important;
}

.powerchat-bubble-time {
    font-size: 10px !important;
    color: #9ca3af !important;
    text-align: right !important;
    margin-top: 4px !important;
}

.powerchat-single-cta-wrap {
    display: flex !important;
    justify-content: center !important;
    padding-top: 4px !important;
}

button.powerchat-start-chat-btn,
.powerchat-start-chat-btn {
    all: unset !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background-color: #25D366 !important;
    background: #25D366 !important;
    color: #ffffff !important;
    padding: 10px 22px !important;
    border-radius: 24px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 3px 8px rgba(37, 211, 102, 0.35) !important;
    transform: none !important;
    transition: background-color 0.2s ease !important;
    width: 100% !important;
    text-align: center !important;
}

button.powerchat-start-chat-btn:hover,
.powerchat-start-chat-btn:hover {
    background-color: #20bd5a !important;
    background: #20bd5a !important;
    color: #ffffff !important;
    transform: none !important;
}

/* ---------------------------------------------------------------
 * RESPONSIVE DEVICE TARGETING (Cache-safe, CSS only)
 * ------------------------------------------------------------- */
@media (min-width: 783px) {
    .powerchat-widget-container.powerchat-device-mobile {
        display: none !important;
    }
}

@media (max-width: 782px) {
    .powerchat-widget-container.powerchat-device-desktop {
        display: none !important;
    }
}

/* ---------------------------------------------------------------
 * INLINE SHORTCODE / BLOCK BUTTON
 * ------------------------------------------------------------- */
.powerchat-inline-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background-color: #25D366 !important;
    background-image: none !important;
    color: #ffffff !important;
    padding: 10px 18px !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.28) !important;
    transform: none !important;
    transition: background-color 0.2s ease !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

.powerchat-inline-btn:hover,
.powerchat-inline-btn:focus {
    background-color: #20bd5a !important;
    color: #ffffff !important;
    transform: none !important;
}

.powerchat-inline-btn svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    fill: currentColor !important;
    display: block !important;
    margin: 0 !important;
    pointer-events: none !important;
}

/* ---------------------------------------------------------------
 * OFFLINE AGENT STATE
 * ------------------------------------------------------------- */
.powerchat-agent-card.is-offline {
    opacity: 0.82 !important;
}

.powerchat-agent-card.is-offline:hover {
    opacity: 1 !important;
    border-color: #e5e7eb !important;
}

.powerchat-agent-card.is-offline .powerchat-action-icon {
    background: #fff7ed !important;
    color: #d97706 !important;
}

/* Accessibility (WCAG 2.1): Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .powerchat-badge-count {
        animation: none !important;
        transition: none !important;
    }

    .powerchat-tooltip,
    .powerchat-tooltip-dot {
        animation: none !important;
    }

    .powerchat-tooltip {
        transition: none !important;
    }
}
/* Badge models — 50-01, 50-03, 50-10, 50-12, 50-13 */
.powerchat-badge-count.powerchat-badge--dot {
    top: 0 !important;
    right: 0 !important;
    min-width: 13px !important;
    width: 13px !important;
    height: 13px !important;
    padding: 0 !important;
    font-size: 0 !important;
}

.powerchat-badge-count.powerchat-badge--square {
    border-radius: 7px !important;
}

.powerchat-badge-count.powerchat-badge--pop {
    animation: pcBadgePopLoop 2.4s ease-in-out infinite !important;
}

@keyframes pcBadgePopLoop {
    0%, 70%, 100% { transform: scale(1); }
    78% { transform: scale(1.28); }
    86% { transform: scale(0.94); }
    93% { transform: scale(1.08); }
}

.powerchat-badge-count.powerchat-badge--halo::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 2px solid var(--pc-badge-bg, #FF4C4C);
    animation: pcBadgeHalo 2s ease-out infinite;
    pointer-events: none;
}

@keyframes pcBadgeHalo {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.9); opacity: 0; }
}

/* Typing indicator — 53-01, 53-02, 53-04, 53-08, 53-09, 53-10, 53-12 */
.powerchat-typing {
    position: absolute !important;
    right: 0 !important;
    bottom: calc(var(--pc-btn-size, 58px) + 13px) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 11px 14px !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.14) !important;
    box-sizing: border-box !important;
    z-index: 5 !important;
}

.powerchat-typing[hidden] {
    display: none !important;
}

.powerchat-typing i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    animation: pcTypingBounce 1.3s ease-in-out infinite;
}

.powerchat-typing i:nth-child(2) { animation-delay: 0.16s; }
.powerchat-typing i:nth-child(3) { animation-delay: 0.32s; }

@keyframes pcTypingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
    30% { transform: translateY(-5px); opacity: 1; }
}

.powerchat-typing--label {
    padding: 8px 13px !important;
    gap: 7px !important;
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
}

.powerchat-typing-dots { display: inline-flex; gap: 3px; }
.powerchat-typing--label i { width: 5px; height: 5px; background: var(--pc-btn-bg, #25D366); }

.powerchat-typing--bare {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 0 6px !important;
}

.powerchat-typing--bare i { width: 8px; height: 8px; background: var(--pc-btn-bg, #25D366); }

.powerchat-typing--square i {
    border-radius: 2px;
    animation: pcTypingMorph 1.5s ease-in-out infinite;
}

@keyframes pcTypingMorph {
    0%, 100% { border-radius: 2px; background: #94a3b8; }
    50% { border-radius: 50%; background: var(--pc-btn-bg, #25D366); }
}

.powerchat-typing--comet i {
    background: var(--pc-btn-bg, #25D366);
    animation: pcTypingComet 1.4s ease-in-out infinite;
}

@keyframes pcTypingComet {
    0%, 100% { transform: scale(0.6); opacity: 0.3; }
    40% { transform: scale(1.35); opacity: 1; }
}

.powerchat-typing--shimmer {
    padding: 9px 14px !important;
    font-size: 11.5px;
    font-weight: 700;
}

.powerchat-typing-shimmer {
    background: linear-gradient(90deg, #94a3b8 0%, #0f172a 45%, #94a3b8 90%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: pcTypingShimmer 2.2s linear infinite;
}

@keyframes pcTypingShimmer {
    0% { background-position: 120% 0; }
    100% { background-position: -120% 0; }
}

.powerchat-typing--big { padding: 14px 18px !important; }
.powerchat-typing--big i { width: 9px; height: 9px; }
/* Closed-state bubble (Working Hours → Show Offline Message) */
.powerchat-offline-bubble {
    position: absolute !important;
    right: 0 !important;
    bottom: calc(var(--pc-btn-size, 58px) + 13px) !important;
    width: 230px !important;
    max-width: calc(100vw - 48px) !important;
    padding: 10px 13px !important;
    background: #ffffff !important;
    color: #334155 !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    font-weight: 500 !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.16) !important;
    box-sizing: border-box !important;
    z-index: 5 !important;
}

.powerchat-offline-bubble[hidden] {
    display: none !important;
}
/* WhatsApp link blocked outside working hours (Hours → Disable Link) */
button.powerchat-start-chat-btn.is-blocked,
button.powerchat-start-chat-btn:disabled,
.powerchat-start-chat-btn.is-blocked,
.powerchat-start-chat-btn:disabled {
    background: #94a3b8 !important;
    background-color: #94a3b8 !important;
    color: rgba(255, 255, 255, 0.92) !important;
    cursor: not-allowed !important;
}

button.powerchat-start-chat-btn.is-blocked:hover,
button.powerchat-start-chat-btn:disabled:hover {
    background: #94a3b8 !important;
    background-color: #94a3b8 !important;
    transform: none !important;
}

.powerchat-agent-card.is-blocked {
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

/* Chat window width per device (Position → Chat Window Width) */
@media (min-width: 1025px) {
    .powerchat-popup {
        width: var(--pc-popup-w-desktop, 360px) !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .powerchat-popup {
        width: var(--pc-popup-w-tablet, 340px) !important;
    }
}

@media (max-width: 767px) {
    .powerchat-popup {
        width: var(--pc-popup-w-mobile, calc(100vw - 32px)) !important;
    }
}

/* ---------------------------------------------------------------
 * POPUP OPEN ANIMATIONS (Popup → Open Animation)
 * Applied only while the window is active, so every open replays.
 * ------------------------------------------------------------- */
.powerchat-popup.powerchat-popup-anim-fade-up.is-active { animation: pcPopFadeUp var(--pc-popup-anim-dur, 700ms) cubic-bezier(.21, 1.02, .73, 1) both !important; }
.powerchat-popup.powerchat-popup-anim-slide-right.is-active { animation: pcPopSlideRight var(--pc-popup-anim-dur, 700ms) cubic-bezier(.22, 1, .36, 1) both !important; }
.powerchat-popup.powerchat-popup-anim-slide-left.is-active { animation: pcPopSlideLeft var(--pc-popup-anim-dur, 700ms) cubic-bezier(.22, 1, .36, 1) both !important; }
.powerchat-popup.powerchat-popup-anim-grow.is-active { animation: pcPopGrow var(--pc-popup-anim-dur, 700ms) cubic-bezier(.34, 1.35, .64, 1) both !important; transform-origin: bottom right !important; }
.powerchat-popup.powerchat-popup-anim-zoom.is-active { animation: pcPopZoom var(--pc-popup-anim-dur, 700ms) ease-out both !important; }
.powerchat-popup.powerchat-popup-anim-spring.is-active { animation: pcPopSpring var(--pc-popup-anim-dur, 700ms) cubic-bezier(.34, 1.5, .64, 1) both !important; transform-origin: bottom right !important; }
.powerchat-popup.powerchat-popup-anim-drop.is-active { animation: pcPopDrop var(--pc-popup-anim-dur, 700ms) cubic-bezier(.22, 1, .36, 1) both !important; }
.powerchat-popup.powerchat-popup-anim-flip.is-active { animation: pcPopFlip var(--pc-popup-anim-dur, 700ms) cubic-bezier(.22, 1, .36, 1) both !important; transform-origin: top center !important; }
.powerchat-popup.powerchat-popup-anim-swing.is-active { animation: pcPopSwing var(--pc-popup-anim-dur, 700ms) cubic-bezier(.34, 1.35, .64, 1) both !important; transform-origin: bottom right !important; }
.powerchat-popup.powerchat-popup-anim-blur.is-active { animation: pcPopBlur var(--pc-popup-anim-dur, 700ms) ease-out both !important; }
.powerchat-popup.powerchat-popup-anim-unfold.is-active { animation: pcPopUnfold var(--pc-popup-anim-dur, 700ms) cubic-bezier(.22, 1, .36, 1) both !important; transform-origin: bottom center !important; }
.powerchat-popup.powerchat-popup-anim-elastic.is-active { animation: pcPopElastic var(--pc-popup-anim-dur, 700ms) cubic-bezier(.22, 1.4, .36, 1) both !important; }
.powerchat-popup.powerchat-popup-anim-corner.is-active { animation: pcPopCorner var(--pc-popup-anim-dur, 700ms) cubic-bezier(.22, 1, .36, 1) both !important; transform-origin: bottom right !important; }
.powerchat-popup.powerchat-popup-anim-bounce.is-active { animation: pcPopBounce var(--pc-popup-anim-dur, 700ms) cubic-bezier(.28, .84, .42, 1) both !important; }
.powerchat-popup.powerchat-popup-anim-curtain.is-active { animation: pcPopCurtain var(--pc-popup-anim-dur, 700ms) cubic-bezier(.22, 1, .36, 1) both !important; }
.powerchat-popup.powerchat-popup-anim-soft.is-active { animation: pcPopSoft var(--pc-popup-anim-dur, 700ms) cubic-bezier(.4, 0, .2, 1) both !important; }

@keyframes pcPopFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

@keyframes pcPopSlideRight {
    from { opacity: 0; transform: translateX(48px); }
    to { opacity: 1; transform: none; }
}

@keyframes pcPopSlideLeft {
    from { opacity: 0; transform: translateX(-48px); }
    to { opacity: 1; transform: none; }
}

@keyframes pcPopGrow {
    from { opacity: 0; transform: scale(.35); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pcPopZoom {
    from { opacity: 0; transform: scale(.82); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pcPopSpring {
    0% { opacity: 0; transform: scale(.5); }
    60% { opacity: 1; transform: scale(1.06); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes pcPopDrop {
    from { opacity: 0; transform: translateY(-26px) scale(.97); }
    to { opacity: 1; transform: none; }
}

@keyframes pcPopFlip {
    from { opacity: 0; transform: perspective(700px) rotateX(-72deg); }
    to { opacity: 1; transform: perspective(700px) rotateX(0); }
}

@keyframes pcPopSwing {
    from { opacity: 0; transform: rotate(-9deg) scale(.9); }
    to { opacity: 1; transform: none; }
}

@keyframes pcPopBlur {
    from { opacity: 0; filter: blur(10px); transform: scale(.98); }
    to { opacity: 1; filter: blur(0); transform: none; }
}

@keyframes pcPopUnfold {
    from { opacity: 0; transform: scaleY(.55); }
    to { opacity: 1; transform: scaleY(1); }
}

@keyframes pcPopElastic {
    0% { opacity: 0; transform: translateY(34px); }
    70% { opacity: 1; transform: translateY(-6px); }
    100% { opacity: 1; transform: none; }
}

@keyframes pcPopCorner {
    from { opacity: 0; transform: translate(26px, 26px) scale(.94); }
    to { opacity: 1; transform: none; }
}

@keyframes pcPopBounce {
    0% { opacity: 0; transform: translateY(44px); }
    55% { opacity: 1; transform: translateY(-10px); }
    78% { transform: translateY(4px); }
    100% { opacity: 1; transform: none; }
}

@keyframes pcPopCurtain {
    from { opacity: 1; clip-path: inset(100% 0 0 0 round 12px); }
    to { opacity: 1; clip-path: inset(0 0 0 0 round 12px); }
}

@keyframes pcPopSoft {
    from { opacity: 0; transform: scale(.96) translateY(8px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .powerchat-popup.is-active {
        animation: none !important;
    }
}
