/**
 * AgentPow Widget Stylesheet.
 *
 * 60 FPS Hardware-Accelerated Microinteractions (Linear/Stripe-inspired aesthetics),
 * Glassmorphism, Responsive WooCommerce Product Micro-Cards, and Proactive Teasers.
 *
 * @package AgentPow
 * @author  Jose Rojas <https://joserojas.dev>
 */

:root {
    --ap-primary: #6366f1;
    --ap-primary-hover: #4f46e5;
    --ap-primary-rgb: 99, 102, 241;
    --ap-bg: #ffffff;
    --ap-card-bg: #f8fafc;
    --ap-text-main: #0f172a;
    --ap-text-muted: #64748b;
    --ap-border: rgba(226, 232, 240, 0.8);
    /* Header contact icons (call / WhatsApp). Neutral by default so they sit in
       the same visual family as the minimize & close controls instead of
       shouting brand colours. The server overrides these from the panel. */
    --ap-hdr-icon: #0f172a;
    --ap-hdr-icon-bg: rgba(15, 23, 42, 0.07);
    --ap-hdr-icon-bg-hover: rgba(15, 23, 42, 0.14);
    --ap-shadow-float: 0 20px 35px -10px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.05);
    --ap-radius-bubble: 18px;
    --ap-transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Root Wrapper */
.agentpow-root {
    position: fixed;
    bottom: var(--ap-offset-y, 20px);
    right: var(--ap-offset-x, 20px);
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ap-text-main);
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

.agentpow-root *,
.agentpow-root *::before,
.agentpow-root *::after {
    box-sizing: border-box;
}

/* Quadrant Position Classes */
.agentpow-root.agentpow-pos-bottom-right {
    bottom: var(--ap-offset-y, 20px);
    right: var(--ap-offset-x, 20px);
    top: auto;
    left: auto;
}

.agentpow-root.agentpow-pos-bottom-left {
    bottom: var(--ap-offset-y, 20px);
    left: var(--ap-offset-x, 20px);
    top: auto;
    right: auto;
}

.agentpow-root.agentpow-pos-top-right {
    top: var(--ap-offset-y, 20px);
    right: var(--ap-offset-x, 20px);
    bottom: auto;
    left: auto;
}

.agentpow-root.agentpow-pos-top-left {
    top: var(--ap-offset-y, 20px);
    left: var(--ap-offset-x, 20px);
    bottom: auto;
    right: auto;
}

/* Window Placement Adjustments based on Quadrant */
.agentpow-root.agentpow-pos-bottom-left .agentpow-window {
    right: auto;
    left: 0;
}

.agentpow-root.agentpow-pos-top-right .agentpow-window {
    bottom: auto;
    top: 75px;
}

.agentpow-root.agentpow-pos-top-left .agentpow-window {
    bottom: auto;
    top: 75px;
    right: auto;
    left: 0;
}

/* Teaser Placement Adjustments based on Quadrant */
.agentpow-root.agentpow-pos-bottom-left .agentpow-teaser {
    right: auto;
    left: 0;
}

.agentpow-root.agentpow-pos-top-right .agentpow-teaser {
    bottom: auto;
    top: 75px;
}

.agentpow-root.agentpow-pos-top-left .agentpow-teaser {
    bottom: auto;
    top: 75px;
    right: auto;
    left: 0;
}

/* Floating Launcher Button — Hardened against WordPress theme overrides */
.agentpow-launcher {
    position: relative !important;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--ap-primary) !important;
    background-color: var(--ap-primary) !important;
    border: var(--ap-launcher-border, none) !important;
    cursor: pointer !important;
    box-shadow: var(--ap-launcher-shadow, 0 10px 25px -5px rgba(0, 0, 0, 0.25)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--ap-primary-contrast, #ffffff) !important;
    transform: translate3d(0, 0, 0) scale(1);
    transition: var(--ap-transition);
    will-change: transform, box-shadow;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    text-decoration: none !important;
    line-height: 1 !important;
    font-size: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

.agentpow-launcher:hover {
    transform: translate3d(0, -3px, 0) scale(1.05);
    box-shadow: 0 14px 28px -5px rgba(var(--ap-primary-rgb), 0.5) !important;
    background: var(--ap-primary-hover) !important;
    background-color: var(--ap-primary-hover) !important;
}

.agentpow-launcher:active {
    transform: translate3d(0, 0, 0) scale(0.96);
}

.agentpow-launcher:focus {
    outline: 2px solid var(--ap-primary) !important;
    outline-offset: 3px !important;
}

/* Shapes */
/* Shapes */
.agentpow-launcher.agentpow-shape-circle {
    border-radius: 50%;
}

.agentpow-launcher.agentpow-shape-squircle {
    border-radius: 18px;
}

/* Pill Launcher Button - Full Geometry */
.agentpow-launcher.agentpow-shape-pill,
.agentpow-root.agentpow-shape-pill .agentpow-launcher {
    width: auto !important;
    min-width: 140px !important;
    max-width: 320px !important;
    height: 52px;
    padding: 0 18px !important;
    border-radius: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    box-sizing: border-box !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.agentpow-launcher.agentpow-shape-pill.agentpow-launcher-active,
.agentpow-root.agentpow-shape-pill .agentpow-launcher.agentpow-launcher-active {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    padding: 0 !important;
    border-radius: 50% !important;
}

.agentpow-launcher.agentpow-shape-pill.agentpow-launcher-active .agentpow-launcher-pill-text,
.agentpow-root.agentpow-shape-pill .agentpow-launcher.agentpow-launcher-active .agentpow-launcher-pill-text {
    display: none !important;
}

.agentpow-launcher.agentpow-shape-pill.agentpow-launcher-active .agentpow-launcher-avatar,
.agentpow-root.agentpow-shape-pill .agentpow-launcher.agentpow-launcher-active .agentpow-launcher-avatar {
    display: none !important;
}

.agentpow-launcher.agentpow-shape-pill .agentpow-launcher-avatar,
.agentpow-root.agentpow-shape-pill .agentpow-launcher .agentpow-launcher-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.agentpow-launcher-pill-text,
.agentpow-launcher.agentpow-shape-pill .agentpow-launcher-pill-text,
.agentpow-root.agentpow-shape-pill .agentpow-launcher .agentpow-launcher-pill-text {
    display: inline-block !important;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

/* Sizes */
.agentpow-launcher.agentpow-size-compact {
    width: 50px;
    height: 50px;
}

.agentpow-launcher.agentpow-size-compact.agentpow-shape-pill,
.agentpow-root.agentpow-size-compact.agentpow-shape-pill .agentpow-launcher {
    height: 44px !important;
    min-width: 120px !important;
    padding: 0 14px !important;
}

.agentpow-launcher.agentpow-size-standard {
    width: 60px;
    height: 60px;
}

.agentpow-launcher.agentpow-size-standard.agentpow-shape-pill,
.agentpow-root.agentpow-size-standard.agentpow-shape-pill .agentpow-launcher {
    height: 52px !important;
    min-width: 140px !important;
    padding: 0 18px !important;
}

.agentpow-launcher.agentpow-size-large {
    width: 68px;
    height: 68px;
}

.agentpow-launcher.agentpow-size-large.agentpow-shape-pill,
.agentpow-root.agentpow-size-large.agentpow-shape-pill .agentpow-launcher {
    height: 60px !important;
    min-width: 160px !important;
    padding: 0 22px !important;
}

/* Animations */
.agentpow-launcher.agentpow-anim-pulse {
    animation: apLauncherPulse 2.4s infinite ease-in-out;
}

.agentpow-launcher.agentpow-anim-bounce {
    animation: apLauncherBounce 3s infinite ease-in-out;
}

.agentpow-launcher.agentpow-anim-subtle {
    animation: apLauncherFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.agentpow-launcher.agentpow-anim-none {
    animation: none !important;
}

@keyframes apLauncherPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 25px -5px rgba(var(--ap-primary-rgb), 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 16px 32px -5px rgba(var(--ap-primary-rgb), 0.55); }
}

@keyframes apLauncherBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

@keyframes apLauncherFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.agentpow-launcher-avatar {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.agentpow-chat-svg,
.agentpow-close-svg {
    width: 28px;
    height: 28px;
    stroke: var(--ap-launcher-icon, var(--ap-primary-contrast, #ffffff)) !important;
    fill: none !important;
    transition: var(--ap-transition);
    display: block;
}

.agentpow-launcher .agentpow-chat-svg,
.agentpow-launcher .agentpow-close-svg {
    stroke: var(--ap-launcher-icon, var(--ap-primary-contrast, #ffffff)) !important;
    fill: none !important;
}

.agentpow-launcher.agentpow-launcher-active .agentpow-launcher-avatar {
    display: none !important;
}

.agentpow-launcher.agentpow-launcher-active .agentpow-close-svg {
    display: block !important;
}

/* Online Pulse Status Indicator */
.agentpow-status-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 13px;
    height: 13px;
    background: #10b981;
    border: 2.5px solid #ffffff;
    border-radius: 50%;
}

.agentpow-status-indicator::after {
    content: "";
    position: absolute;
    top: -2.5px;
    left: -2.5px;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #10b981;
    animation: apPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
    z-index: -1;
}

@keyframes apPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    70% {
        transform: scale(2.2);
        opacity: 0;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* Proactive Tooltip / Teaser Bubble */
.agentpow-teaser {
    position: absolute;
    bottom: 74px;
    right: 0;
    width: 290px;
    max-width: calc(100vw - 32px);
    background: #ffffff;
    border: 1px solid var(--ap-border, #e2e8f0);
    border-radius: 16px;
    box-shadow: 0 14px 35px -8px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.06);
    padding: 14px 16px;
    cursor: pointer;
    transform-origin: bottom right;
    animation: apSpringEntrance 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    z-index: 999998;
    box-sizing: border-box;
}

@keyframes apSpringEntrance {
    0% {
        opacity: 0;
        transform: translate3d(0, 15px, 0) scale(0.92);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.agentpow-teaser-content {
    position: relative;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.agentpow-teaser-close {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.18);
    border: none;
    font-size: 15px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    z-index: 5;
    padding: 0;
}

.agentpow-teaser-close:hover {
    background: rgba(239, 68, 68, 0.18);
    color: #ef4444;
    transform: scale(1.12);
}

.agentpow-teaser-body {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-right: 24px; /* Ensure text never collides with the close button */
    box-sizing: border-box;
}

.agentpow-teaser-icon {
    font-size: 18px;
    line-height: 1.2;
    flex-shrink: 0;
}

.agentpow-teaser-body p {
    margin: 0;
    font-size: 13.5px;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.45;
    word-break: break-word;
}

/* Chat Dialog Window */
.agentpow-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 560px;
    max-height: calc(100vh - 120px);
    background: var(--ap-bg);
    border-radius: 20px;
    box-shadow: var(--ap-shadow-float);
    border: 1px solid var(--ap-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    animation: apWindowPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes apWindowPop {
    0% {
        opacity: 0;
        transform: translate3d(0, 20px, 0) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

/* Glassmorphism Header */
.agentpow-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--ap-border);
    position: relative;
    z-index: 10;
}

.agentpow-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agentpow-header-avatar {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(var(--ap-primary-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.agentpow-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agentpow-header-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 9px;
    height: 9px;
    background: #10b981;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.agentpow-header-name {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--ap-text-main);
    line-height: 1.2;
}

.agentpow-header-status {
    font-size: 11.5px;
    color: #10b981;
    font-weight: 500;
}

.agentpow-header-ctrls {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Unified ghost header controls — hardened with !important so the host
   WordPress/Woo theme cannot inject its global button borders/backgrounds
   (which used to render 4 mismatched boxed squares next to the title). */
.agentpow-ctrl-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--ap-text-muted, #64748b) !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    font-size: 18px !important;
    line-height: 1 !important;
    font-family: inherit !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.agentpow-ctrl-btn:hover {
    background: rgba(var(--ap-primary-rgb, 99, 102, 241), 0.14) !important;
    color: var(--ap-primary, #6366f1) !important;
}

.agentpow-ctrl-btn:active {
    transform: scale(0.9);
}

.agentpow-ctrl-btn:focus-visible {
    outline: 2px solid var(--ap-primary, #6366f1) !important;
    outline-offset: 2px !important;
}

/* WhatsApp header chip — neutral token pair shared with the call chip. The
   brand is carried by the logo shape, not by a saturated disc. */
.agentpow-wa-header-btn {
    color: var(--ap-hdr-icon, #0f172a) !important;
    background: var(--ap-hdr-icon-bg, rgba(15, 23, 42, 0.07)) !important;
    border: none !important;
    box-shadow: none !important;
}

.agentpow-wa-header-btn svg {
    display: block;
    width: 17px;
    height: 17px;
    fill: currentColor !important;
    transition: fill 0.2s ease;
}

.agentpow-wa-header-btn:hover {
    background: var(--ap-hdr-icon-bg-hover, rgba(15, 23, 42, 0.14)) !important;
    color: var(--ap-hdr-icon, #0f172a) !important;
}

.agentpow-wa-header-btn:hover svg {
    fill: currentColor !important;
}

.agentpow-msg-wa-btn {
    background: #25d366 !important;
    color: #ffffff !important;
    font-weight: 600;
    margin-top: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
}

.agentpow-msg-wa-btn:hover {
    background: #1ebc59 !important;
}

/* Persistent Free Shipping Progress Bar */
.agentpow-shipping-bar-container {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
    border-bottom: 1px solid var(--ap-border);
    padding: 8px 16px 10px;
    position: relative;
    z-index: 9;
    flex-shrink: 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.agentpow-shipping-bar-container.qualified {
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(209, 250, 229, 0.98));
    border-bottom-color: rgba(16, 185, 129, 0.35);
}

.agentpow-shipping-bar-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.agentpow-shipping-bar-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ap-text-main);
    line-height: 1.3;
}

.agentpow-shipping-bar-left {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agentpow-shipping-bar-icon {
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}

.agentpow-shipping-bar-pct {
    font-size: 11px;
    font-weight: 700;
    color: var(--ap-primary);
    flex-shrink: 0;
    padding-left: 6px;
}

.agentpow-shipping-bar-container.qualified .agentpow-shipping-bar-text,
.agentpow-shipping-bar-container.qualified .agentpow-shipping-bar-pct {
    color: #065f46;
}

.agentpow-shipping-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.agentpow-shipping-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ap-primary), #6366f1);
    border-radius: 999px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.agentpow-shipping-bar-container.qualified .agentpow-shipping-bar-fill {
    background: linear-gradient(90deg, #10b981, #059669);
}

/* Messages Stream */
.agentpow-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
    background: #fafafa;
}

.agentpow-messages::-webkit-scrollbar {
    width: 5px;
}
.agentpow-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* Message Bubbles */
.agentpow-msg {
    display: flex;
    flex-direction: column;
    max-width: 84%;
    animation: apMsgFade 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes apMsgFade {
    0% {
        opacity: 0;
        transform: translate3d(0, 8px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.agentpow-msg.user {
    align-self: flex-end;
}

.agentpow-msg.assistant {
    align-self: flex-start;
}

.agentpow-bubble {
    padding: 11px 15px;
    font-size: 13.5px;
    line-height: 1.45;
    word-break: break-word;
}

.agentpow-msg.user .agentpow-bubble {
    background: var(--ap-primary);
    color: #ffffff;
    border-radius: var(--ap-radius-bubble) var(--ap-radius-bubble) 4px var(--ap-radius-bubble);
}

.agentpow-msg.assistant .agentpow-bubble {
    background: #ffffff;
    color: var(--ap-text-main);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-bubble) var(--ap-radius-bubble) var(--ap-radius-bubble) 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.agentpow-msg-source {
    margin-top: 4px;
    font-size: 10.5px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Admin-only technical debug badge (provider / model / tokens / latency) */
.agentpow-debug-badge {
    margin-top: 8px;
    padding: 5px 9px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    line-height: 1.5;
    color: #a5b4fc;
    background: rgba(15, 23, 42, 0.55);
    border: 1px dashed rgba(129, 140, 248, 0.5);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    user-select: text;
}
.agentpow-debug-badge b {
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-right: 3px;
}

/* Embedded Media: Videos, Images & Social Cards */
.agentpow-video-embed {
    margin-top: 10px;
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.agentpow-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.agentpow-msg-media-img {
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    max-width: 100%;
}

.agentpow-msg-media-img img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.agentpow-msg-media-img:hover img {
    transform: scale(1.02);
}

.agentpow-social-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s ease;
}

.agentpow-social-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.agentpow-social-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.agentpow-social-info {
    flex: 1;
    min-width: 0;
}

.agentpow-social-type {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.03em;
}

.agentpow-social-title {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agentpow-social-arrow {
    font-size: 14px;
    color: #94a3b8;
    font-weight: bold;
}

/* Micro-Cards for WooCommerce Products & Carousel */
.agentpow-carousel-wrapper {
    position: relative;
    width: 100%;
    margin-top: 6px;
    margin-bottom: 4px;
}

.agentpow-cards-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    touch-action: pan-x;
    padding: 6px 4px 8px 4px;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
    scrollbar-width: none !important; /* Firefox: completely hide ugly desktop track */
    -ms-overflow-style: none !important; /* IE 10+ */
}

.agentpow-cards-carousel.is-dragging {
    cursor: grabbing !important;
    scroll-snap-type: none !important;
    user-select: none !important;
}

.agentpow-cards-carousel.is-dragging * {
    pointer-events: none !important;
}

.agentpow-carousel-nav-btn {
    position: absolute;
    top: 72px; /* Perfectly centered on the 145px product image canvas, never covering title or buttons */
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    line-height: 1;
}

.agentpow-carousel-nav-btn:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    color: var(--ap-primary);
}

.agentpow-carousel-nav-btn.prev {
    left: -6px;
}

.agentpow-carousel-nav-btn.next {
    right: -6px;
}

.agentpow-carousel-nav-btn:disabled,
.agentpow-carousel-nav-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Completely suppress native scrollbars on all browsers */
.agentpow-cards-carousel::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.agentpow-product-card {
    flex: 0 0 205px;
    scroll-snap-align: start;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.agentpow-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.agentpow-card-img-wrap {
    position: relative;
    width: 100%;
    height: 145px;
    background: #ffffff;
    border-radius: 13px 13px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #f1f5f9;
}

.agentpow-card-img-wrap a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.agentpow-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    display: block;
    transition: transform 0.25s ease;
}

.agentpow-product-card:hover .agentpow-card-img-wrap img {
    transform: scale(1.06);
}

.agentpow-sale-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.agentpow-card-details {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.agentpow-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    transition: color 0.15s ease;
}

.agentpow-card-title:hover {
    color: var(--ap-primary, #4f46e5);
}

.agentpow-card-price {
    font-size: 15px;
    font-weight: 800;
    color: #2563eb;
    margin-top: 4px;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.agentpow-card-rating {
    font-size: 10.5px;
    font-weight: 700;
    color: #d97706;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    background: rgba(245, 158, 11, 0.12);
    padding: 1px 5px;
    border-radius: 4px;
}

.agentpow-card-vars {
    font-size: 10.5px;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 6px;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Proactive Quick Suggestion Chips — modern "suggestion cards" grid.
   A 2-column adaptive grid keeps EVERY suggestion visible and tappable (no hidden
   overflow, no scrolling needed), with a glassy gradient look and icon bubbles. */
.agentpow-quick-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 6px 0;
    animation: apFadeIn 0.3s ease-out;
}

@media (max-width: 380px) {
    .agentpow-quick-chips {
        grid-template-columns: 1fr;
    }
}

.agentpow-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 8px 10px;
    -webkit-appearance: none !important;
    appearance: none !important;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(236, 72, 153, 0.10)) !important;
    border: 1px solid rgba(99, 102, 241, 0.28) !important;
    box-shadow: none !important;
    color: inherit;
    font-size: 11.5px;
    font-weight: 600;
    text-align: left;
    line-height: 1.3;
    cursor: pointer;
    white-space: normal;
    overflow: hidden;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    outline: none;
    user-select: none;
}

.agentpow-chip-ico {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 13px;
}

.agentpow-chip-lbl {
    flex: 1 1 auto;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.agentpow-chip:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.25);
}

.agentpow-chip:active {
    transform: scale(0.97);
}

/* Layout lock: higher specificity + !important so the suggestion-card grid keeps
   its shape even if a stale cached stylesheet, a minifier bundle or a theme reset
   tries to override the chip layout (the bug that produced stacked icons and
   single-line overflowing labels). */
.agentpow-window .agentpow-quick-chips {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    width: auto !important;
}

.agentpow-window .agentpow-chip {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow: hidden !important;
}

.agentpow-window .agentpow-chip-ico {
    display: grid !important;
    flex: 0 0 auto !important;
    width: 24px !important;
    height: 24px !important;
}

.agentpow-window .agentpow-chip-lbl {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
}

@media (max-width: 380px) {
    .agentpow-window .agentpow-quick-chips {
        grid-template-columns: 1fr !important;
    }
}

/* In-chat live cart summary card (rendered by the "Ver mi carrito" chip) */
.apow-cart-card {
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    padding: 10px 12px;
    margin: 6px 0;
    font-size: 12px;
}

.apow-cart-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.apow-cart-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 0;
    border-bottom: 1px dashed rgba(99, 102, 241, 0.2);
}

.apow-cart-line-name {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apow-cart-line-total {
    flex: 0 0 auto;
    font-weight: 600;
}

.apow-cart-more {
    opacity: 0.7;
    border-bottom: none;
}

.apow-cart-empty {
    opacity: 0.75;
    padding: 4px 0;
}

.apow-cart-fs {
    margin-top: 6px;
    color: #b45309;
}

.apow-cart-fs.qualified {
    color: #059669;
    font-weight: 700;
}

.apow-cart-total {
    margin-top: 6px;
    text-align: right;
}

.apow-cart-ctas {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.apow-cart-cta {
    flex: 1 1 0;
    text-align: center;
    padding: 7px 10px;
    border-radius: 100px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: var(--ap-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.apow-cart-cta.primary {
    background: var(--ap-primary);
    color: #ffffff;
    border-color: transparent;
}

.apow-cart-cta:hover {
    filter: brightness(1.08);
}

.agentpow-card-btn {
    width: 100%;
    background: var(--ap-primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background 0.2s, transform 0.15s;
    outline: none;
}

.agentpow-card-btn:hover {
    background: var(--ap-primary-hover);
}

.agentpow-card-btn:active {
    transform: scale(0.97);
}

.agentpow-card-btn.loading {
    opacity: 0.8;
    pointer-events: none;
}

.agentpow-card-btn.added {
    background: #10b981;
}

.agentpow-card-btn-group {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
}

.agentpow-card-btn-group .agentpow-card-btn {
    flex: 1;
    min-width: 0;
    padding: 8px 6px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

.agentpow-card-btn-group .agentpow-cart-btn {
    background: var(--ap-primary, #4f46e5);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
}

.agentpow-card-btn-group .agentpow-cart-btn:hover {
    background: var(--ap-primary-hover, #4338ca);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}

.agentpow-instant-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
}

.agentpow-instant-btn:hover {
    background: linear-gradient(135deg, #fbbf24, #d97706) !important;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
    filter: brightness(1.05);
}

/* Suppress WooCommerce native view cart injected link inside product cards */
.agentpow-product-card .added_to_cart,
.agentpow-product-card a.added_to_cart.wc-forward,
.agentpow-card-btn-group .added_to_cart {
    display: none !important;
}

.agentpow-stock-alert-btn {
    background: #475569 !important;
    color: #ffffff !important;
    font-size: 11px !important;
}

.agentpow-stock-alert-btn:hover {
    background: #334155 !important;
}

/* Image Attachment & Preview Tray */
.agentpow-attach-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--ap-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    transition: color 0.2s, background 0.2s, transform 0.2s;
    outline: none;
    padding: 0;
}

.agentpow-attach-btn svg {
    width: 17px;
    height: 17px;
}

.agentpow-attach-btn:hover {
    color: var(--ap-primary);
    background: rgba(var(--ap-primary-rgb), 0.08);
}

.agentpow-image-preview-tray {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px 8px 6px;
    position: relative;
}

.agentpow-preview-thumb {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--ap-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.agentpow-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.agentpow-preview-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    border: 1px solid #ffffff;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.agentpow-msg-user-img {
    margin-bottom: 6px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 180px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.agentpow-msg-user-img img {
    width: 100%;
    height: auto;
    max-height: 140px;
    object-fit: cover;
    display: block;
}

/* Cart Recovery Deal Card */
.agentpow-deal-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1.5px dashed var(--ap-primary, #6366f1) !important;
    border-radius: 14px !important;
    padding: 14px !important;
    margin-top: 10px !important;
    box-sizing: border-box !important;
    text-align: left !important;
}

.agentpow-deal-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: linear-gradient(135deg, var(--ap-primary, #6366f1), var(--ap-primary-hover, #4f46e5)) !important;
    color: #ffffff !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 3px 9px !important;
    border-radius: 20px !important;
    margin-bottom: 8px !important;
}

.agentpow-deal-msg,
.agentpow-deal-card p {
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin: 0 0 10px 0 !important;
    color: inherit !important;
}

.agentpow-deal-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    margin: 8px 0;
}

.agentpow-deal-code code {
    font-size: 13px;
    font-weight: 700;
    color: var(--ap-primary);
    letter-spacing: 1px;
}

.agentpow-deal-btn {
    width: 100% !important;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 12.5px !important;
    font-family: inherit !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-align: center !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35) !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    margin-top: 6px !important;
}

.agentpow-deal-btn:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5) !important;
    transform: translateY(-1px) !important;
}

.agentpow-deal-btn.loading {
    opacity: 0.75 !important;
    cursor: wait !important;
    pointer-events: none !important;
}

/* Zero-Touch RMA Card */
.agentpow-rma-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 8px;
}

.agentpow-rma-card-header {
    margin-bottom: 6px;
}

.agentpow-rma-badge {
    font-size: 11px;
    font-weight: 700;
    color: #1d4ed8;
}

.agentpow-rma-body {
    font-size: 12px;
}

.agentpow-rma-body code {
    background: #eff6ff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #1e40af;
}

.agentpow-rma-note {
    margin: 6px 0 0 0;
    font-size: 11px;
    color: #64748b;
    line-height: 1.35;
}

/* Typing Dots Animation */
.agentpow-typing-bubble {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    border: 1px solid var(--ap-border);
    padding: 10px 14px;
    border-radius: 18px 18px 18px 4px;
    width: fit-content;
    margin-left: 16px;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.agentpow-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: apBounce 1.2s infinite ease-in-out;
}

.agentpow-dot:nth-child(2) {
    animation-delay: 0.2s;
}
.agentpow-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes apBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-5px);
        background: var(--ap-primary);
    }
}

/* Input Form Footer */
.agentpow-input-form {
    padding: 12px 16px 8px 16px;
    background: #ffffff;
    border-top: 1px solid var(--ap-border);
}

.agentpow-input-wrapper {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 4px 6px 4px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.agentpow-input-wrapper:focus-within {
    border-color: var(--ap-primary);
    box-shadow: 0 0 0 3px rgba(var(--ap-primary-rgb), 0.15);
    background: #ffffff;
}

.agentpow-root .agentpow-input-field,
.agentpow-input-field {
    flex: 1;
    border: none !important;
    background: transparent !important;
    font-size: 13.5px !important;
    color: var(--ap-text-main) !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 6px 4px !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    height: auto !important;
}

.agentpow-root .agentpow-input-field::placeholder,
.agentpow-input-field::placeholder {
    color: #64748b !important;
    opacity: 0.85 !important;
}

.agentpow-send-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ap-primary) !important;
    border: none !important;
    box-shadow: none !important;
    color: #ffffff !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, background 0.2s;
    outline: none !important;
    padding: 0 !important;
}

.agentpow-send-btn svg {
    width: 15px;
    height: 15px;
    margin-left: 2px;
}

.agentpow-send-btn:hover {
    background: var(--ap-primary-hover);
    transform: scale(1.05);
}

.agentpow-send-btn:active {
    transform: scale(0.95);
}

.agentpow-branding-sub {
    text-align: center;
    margin-top: 6px;
    font-size: 10px;
    color: #94a3b8;
}

/* The "Pow Ideas" credit sits on the dark chat footer. Without an explicit color it
 * inherited the host theme's / browser default anchor :hover, which flipped to a low-
 * contrast color and made it unreadable on hover. Pin every state to a light-on-dark
 * value so the link stays legible normal, visited, hovered and focused. */
.agentpow-branding-sub a,
.agentpow-branding-sub a:visited {
    color: #cbd5e1 !important;
    text-decoration: none;
    font-weight: 600;
}

.agentpow-branding-sub a:hover,
.agentpow-branding-sub a:focus {
    color: #a5b4fc !important;
    text-decoration: underline;
}

.agentpow-mic-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--ap-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    transition: color 0.2s, background 0.2s, transform 0.2s;
    outline: none;
    padding: 0;
    position: relative;
}

.agentpow-mic-btn svg {
    width: 17px;
    height: 17px;
}

.agentpow-mic-btn:hover {
    color: var(--ap-primary);
    background: rgba(var(--ap-primary-rgb), 0.08);
}

.agentpow-mic-btn.listening {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    animation: ap-pulse-mic 1.4s infinite;
}

@keyframes ap-pulse-mic {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
        transform: scale(1.08);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        transform: scale(1);
    }
}

/* GDPR Privacy Consent Banner */
.agentpow-gdpr-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    padding: 10px 14px;
    font-size: 11.5px;
    color: #475569;
    line-height: 1.4;
    transition: opacity 0.3s ease;
}

.agentpow-gdpr-banner p {
    margin: 0;
    flex: 1;
}

.agentpow-gdpr-banner a {
    color: var(--ap-primary);
    text-decoration: underline;
}

.agentpow-gdpr-btn {
    background: var(--ap-primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.agentpow-gdpr-btn:hover {
    background: var(--ap-primary-hover);
}

/* CSAT Feedback Actions */
.agentpow-feedback-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 11px;
}

.agentpow-fb-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    box-shadow: none !important;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 7px;
    line-height: 1;
    transition: transform 0.15s, background 0.2s, border-color 0.2s;
    outline: none !important;
}

.agentpow-fb-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    transform: scale(1.15);
}

.agentpow-fb-btn.active {
    background: rgba(var(--ap-primary-rgb), 0.12);
    border-color: var(--ap-primary);
}

.agentpow-fb-thanks {
    font-size: 10.5px;
    color: #10b981;
    font-weight: 500;
    margin-left: 4px;
    animation: ap-fade-in 0.3s ease;
}

/* Order Tracking Interactive Summary Card */
.agentpow-order-card {
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.agentpow-order-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}

.agentpow-order-id {
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
}

.agentpow-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #e2e8f0;
    color: #475569;
}

.agentpow-status-badge.status-completed {
    background: #dcfce7;
    color: #15803d;
}

.agentpow-status-badge.status-processing {
    background: #e0f2fe;
    color: #0369a1;
}

.agentpow-status-badge.status-on-hold {
    background: #fef9c3;
    color: #a16207;
}

.agentpow-status-badge.status-cancelled,
.agentpow-status-badge.status-failed {
    background: #fee2e2;
    color: #b91c1c;
}

/* Layout-lock: the badge must stay readable even if theme or stale cached CSS
   tries to recolor generic spans inside the chat bubble. */
.agentpow-root .agentpow-status-badge,
.agentpow-status-badge {
    background: #e2e8f0 !important;
    color: #334155 !important;
}

.agentpow-root .agentpow-status-badge.status-completed,
.agentpow-status-badge.status-completed {
    background: #dcfce7 !important;
    color: #15803d !important;
}

.agentpow-root .agentpow-status-badge.status-processing,
.agentpow-status-badge.status-processing {
    background: #e0f2fe !important;
    color: #0369a1 !important;
}

.agentpow-root .agentpow-status-badge.status-on-hold,
.agentpow-status-badge.status-on-hold {
    background: #fef9c3 !important;
    color: #a16207 !important;
}

.agentpow-root .agentpow-status-badge.status-cancelled,
.agentpow-status-badge.status-cancelled,
.agentpow-root .agentpow-status-badge.status-failed,
.agentpow-status-badge.status-failed {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

.agentpow-root .agentpow-status-badge.status-refunded,
.agentpow-status-badge.status-refunded {
    background: #e2e8f0 !important;
    color: #475569 !important;
}

.agentpow-order-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #334155;
}

.agentpow-order-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

/* Labels never shrink or break mid-word; values wrap right-aligned instead. */
.agentpow-order-row > span:first-child {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 11px;
    color: #64748b;
}

.agentpow-order-row > strong,
.agentpow-order-row > a {
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
    font-weight: 600;
    overflow-wrap: break-word;
}

/* Long values (last status update) read better as a stacked block. */
.agentpow-order-row-stacked {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
}

.agentpow-order-row-stacked > strong {
    text-align: left;
    font-weight: 500;
    line-height: 1.45;
}

.agentpow-order-row a {
    color: var(--ap-primary);
    text-decoration: underline;
}

.agentpow-order-hint {
    margin: 6px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(79, 70, 229, 0.08);
    border-left: 3px solid var(--ap-primary);
    color: var(--ap-text-main);
    font-size: 11.5px;
    line-height: 1.5;
}

.agentpow-order-link {
    display: inline-block;
    margin-top: 6px;
    color: var(--ap-primary);
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
}

.agentpow-order-link:hover {
    text-decoration: underline;
}

/* Adaptive Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --ap-bg: #0f172a;
        --ap-card-bg: #1e293b;
        --ap-text-main: #f8fafc;
        --ap-text-muted: #94a3b8;
        --ap-border: rgba(51, 65, 85, 0.7);
        --ap-hdr-icon: #ffffff;
        --ap-hdr-icon-bg: rgba(255, 255, 255, 0.14);
        --ap-hdr-icon-bg-hover: rgba(255, 255, 255, 0.26);
    }

    .agentpow-order-hint {
        background: rgba(99, 102, 241, 0.16);
        color: #e2e8f0;
    }

    .agentpow-window {
        background: #0f172a;
        border-color: #334155;
        box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
    }

    .agentpow-header-bar {
        background: #1e293b;
        border-bottom-color: #334155;
    }

    .agentpow-shipping-bar-container {
        background: #1e293b;
        border-bottom-color: #334155;
    }

    .agentpow-shipping-bar-container.qualified {
        background: rgba(6, 95, 70, 0.25);
        border-bottom-color: rgba(16, 185, 129, 0.4);
    }

    .agentpow-shipping-bar-container.qualified .agentpow-shipping-bar-text,
    .agentpow-shipping-bar-container.qualified .agentpow-shipping-bar-pct {
        color: #34d399;
    }

    .agentpow-shipping-bar-text {
        color: #f8fafc;
    }

    .agentpow-shipping-bar-track {
        background: rgba(255, 255, 255, 0.1);
    }

    .agentpow-header-name {
        color: #f8fafc;
    }

    .agentpow-ctrl-btn {
        color: #94a3b8;
        background: rgba(255, 255, 255, 0.05);
    }

    .agentpow-ctrl-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }

    .agentpow-messages {
        background: #0f172a;
    }

    .agentpow-msg.assistant .agentpow-bubble {
        background: #1e293b;
        color: #f8fafc !important;
        border: 1px solid #334155;
    }

    .agentpow-msg.assistant .agentpow-bubble * {
        color: inherit;
    }

    .agentpow-product-card {
        background: #1e293b !important;
        border-color: rgba(51, 65, 85, 0.8) !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45) !important;
    }

    .agentpow-product-card:hover {
        border-color: rgba(99, 102, 241, 0.5) !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6) !important;
    }

    .agentpow-card-img-wrap {
        background: #ffffff !important;
        border-bottom-color: rgba(255, 255, 255, 0.08) !important;
    }

    .agentpow-carousel-nav-btn {
        background: rgba(15, 23, 42, 0.88) !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
        color: #f8fafc !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
    }

    .agentpow-carousel-nav-btn:hover {
        background: #1e293b !important;
        color: #38bdf8 !important;
    }

    .agentpow-card-title {
        color: #f8fafc !important;
    }

    .agentpow-card-title:hover {
        color: #818cf8 !important;
    }

    .agentpow-card-price {
        color: #38bdf8 !important;
        font-weight: 800 !important;
    }

    .agentpow-card-vars {
        color: #cbd5e1 !important;
        background: rgba(255, 255, 255, 0.08) !important;
    }

    .agentpow-chip {
        background: rgba(99, 102, 241, 0.18) !important;
        color: #c7d2fe !important;
        border-color: rgba(99, 102, 241, 0.35) !important;
    }

    .agentpow-chip:hover {
        background: #6366f1 !important;
        color: #ffffff !important;
    }

    .apow-cart-card {
        background: rgba(99, 102, 241, 0.14) !important;
        border-color: rgba(99, 102, 241, 0.35) !important;
    }

    .apow-cart-fs {
        color: #fbbf24 !important;
    }

    .apow-cart-fs.qualified {
        color: #34d399 !important;
    }

    .agentpow-order-card {
        background: #1e293b;
        border-color: #334155;
    }

    .agentpow-order-id {
        color: #f8fafc;
    }

    .agentpow-order-row {
        color: #cbd5e1;
    }

    .agentpow-order-row > span:first-child {
        color: #94a3b8;
    }

    .agentpow-root .agentpow-status-badge,
    .agentpow-status-badge {
        background: #334155 !important;
        color: #e2e8f0 !important;
    }

    .agentpow-root .agentpow-status-badge.status-completed,
    .agentpow-status-badge.status-completed {
        background: rgba(34, 197, 94, 0.2) !important;
        color: #86efac !important;
    }

    .agentpow-root .agentpow-status-badge.status-processing,
    .agentpow-status-badge.status-processing {
        background: rgba(56, 189, 248, 0.2) !important;
        color: #7dd3fc !important;
    }

    .agentpow-root .agentpow-status-badge.status-on-hold,
    .agentpow-status-badge.status-on-hold {
        background: rgba(250, 204, 21, 0.18) !important;
        color: #fde047 !important;
    }

    .agentpow-root .agentpow-status-badge.status-cancelled,
    .agentpow-status-badge.status-cancelled,
    .agentpow-root .agentpow-status-badge.status-failed,
    .agentpow-status-badge.status-failed {
        background: rgba(239, 68, 68, 0.2) !important;
        color: #fca5a5 !important;
    }

    .agentpow-root .agentpow-status-badge.status-refunded,
    .agentpow-status-badge.status-refunded {
        background: rgba(148, 163, 184, 0.2) !important;
        color: #cbd5e1 !important;
    }

    .agentpow-fb-btn {
        border-color: rgba(255, 255, 255, 0.18) !important;
        color: #f8fafc;
    }

    .agentpow-fb-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .agentpow-input-form {
        background: #0f172a;
        border-top-color: #334155;
    }

    .agentpow-root .agentpow-input-wrapper,
    .agentpow-input-wrapper {
        background: #1e293b !important;
        border-color: #334155 !important;
    }

    .agentpow-root .agentpow-input-wrapper:focus-within,
    .agentpow-input-wrapper:focus-within {
        background: #0f172a !important;
        border-color: var(--ap-primary) !important;
        box-shadow: 0 0 0 3px rgba(var(--ap-primary-rgb), 0.25) !important;
    }

    .agentpow-root .agentpow-input-field,
    .agentpow-input-field {
        color: #ffffff !important;
        background: transparent !important;
        -webkit-text-fill-color: #ffffff !important;
    }

    .agentpow-root .agentpow-input-field::placeholder,
    .agentpow-input-field::placeholder {
        color: #cbd5e1 !important;
        -webkit-text-fill-color: #cbd5e1 !important;
        opacity: 0.9 !important;
    }

    .agentpow-gdpr-banner {
        background: #1e293b;
        border-top-color: #334155;
        color: #cbd5e1;
    }

    .agentpow-teaser {
        background: #1e293b !important;
        border-color: #334155 !important;
        box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.55), 0 4px 14px rgba(0, 0, 0, 0.4) !important;
    }

    .agentpow-teaser-content {
        background: transparent !important;
        border: none !important;
        color: #f8fafc !important;
    }

    .agentpow-teaser-body p {
        color: #f8fafc !important;
    }

    .agentpow-teaser-close {
        background: rgba(255, 255, 255, 0.12) !important;
        color: #cbd5e1 !important;
    }

    .agentpow-teaser-close:hover {
        background: rgba(239, 68, 68, 0.25) !important;
        color: #fca5a5 !important;
    }

    .agentpow-attach-btn {
        color: #94a3b8;
    }

    .agentpow-attach-btn:hover {
        color: #f8fafc;
        background: rgba(255, 255, 255, 0.1);
    }

    .agentpow-rma-card {
        background: #1e293b;
        border-color: #334155;
        border-left-color: #3b82f6;
    }

    .agentpow-rma-badge {
        color: #60a5fa;
    }

    .agentpow-rma-body code {
        background: #0f172a;
        color: #93c5fd;
    }

    .agentpow-rma-note {
        color: #94a3b8;
    }

    .agentpow-deal-card {
        background: rgba(255, 255, 255, 0.03);
        border-color: var(--ap-primary);
    }

    .agentpow-deal-code {
        background: #1e293b;
        border-color: #334155;
    }

    /* Support Ticket & Email Lead Cards in Dark Mode */
    .agentpow-root .agentpow-ticket-card,
    .agentpow-ticket-card {
        background: #0f172a !important;
        border-color: #475569 !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
    }
    .agentpow-root .agentpow-ticket-header strong,
    .agentpow-root .agentpow-ticket-title,
    .agentpow-ticket-header strong,
    .agentpow-ticket-title {
        color: #fdba74 !important;
    }
    .agentpow-root .agentpow-ticket-header p,
    .agentpow-ticket-header p {
        color: #cbd5e1 !important;
    }
    .agentpow-root .agentpow-ticket-name,
    .agentpow-root .agentpow-ticket-email,
    .agentpow-root .agentpow-ticket-order,
    .agentpow-root .agentpow-ticket-msg,
    .agentpow-ticket-name,
    .agentpow-ticket-email,
    .agentpow-ticket-order,
    .agentpow-ticket-msg {
        background: #1e293b !important;
        border-color: #334155 !important;
        color: #f8fafc !important;
        -webkit-text-fill-color: #f8fafc !important;
    }
    .agentpow-root .agentpow-ticket-name:focus,
    .agentpow-root .agentpow-ticket-email:focus,
    .agentpow-root .agentpow-ticket-order:focus,
    .agentpow-root .agentpow-ticket-msg:focus,
    .agentpow-ticket-name:focus,
    .agentpow-ticket-email:focus,
    .agentpow-ticket-order:focus,
    .agentpow-ticket-msg:focus {
        border-color: #ea580c !important;
        background: #0f172a !important;
    }
    .agentpow-root .agentpow-ticket-name::placeholder,
    .agentpow-root .agentpow-ticket-email::placeholder,
    .agentpow-root .agentpow-ticket-order::placeholder,
    .agentpow-root .agentpow-ticket-msg::placeholder,
    .agentpow-ticket-name::placeholder,
    .agentpow-ticket-email::placeholder,
    .agentpow-ticket-order::placeholder,
    .agentpow-ticket-msg::placeholder {
        color: #64748b !important;
        -webkit-text-fill-color: #64748b !important;
        opacity: 0.9 !important;
    }

    .agentpow-root .agentpow-email-lead-card,
    .agentpow-email-lead-card {
        background: #0f172a !important;
        border-color: #3730a3 !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
    }
    .agentpow-root .agentpow-lead-card-header strong,
    .agentpow-lead-card-header strong {
        color: #c7d2fe !important;
    }
    .agentpow-root .agentpow-lead-coupon-badge,
    .agentpow-lead-coupon-badge {
        background: #1e1b4b !important;
        color: #a5b4fc !important;
        border: 1px solid #4338ca !important;
    }
    .agentpow-root .agentpow-lead-card-header p,
    .agentpow-lead-card-header p {
        color: #cbd5e1 !important;
    }
    .agentpow-root .agentpow-lead-email-input,
    .agentpow-lead-email-input {
        background: #1e293b !important;
        border-color: #334155 !important;
        color: #f8fafc !important;
        -webkit-text-fill-color: #f8fafc !important;
    }
    .agentpow-root .agentpow-lead-email-input:focus,
    .agentpow-lead-email-input:focus {
        border-color: var(--ap-primary, #6366f1) !important;
        background: #0f172a !important;
    }
    .agentpow-root .agentpow-lead-email-input::placeholder,
    .agentpow-lead-email-input::placeholder {
        color: #64748b !important;
        -webkit-text-fill-color: #64748b !important;
        opacity: 0.9 !important;
    }
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE ENGINE (100dvh, Safe Areas & Touch Optimization)
   ========================================================================== */
@media (max-width: 768px) {
    .agentpow-window {
        width: min(420px, calc(100vw - 32px));
    }
}

@media (max-width: 600px) {
    .agentpow-root {
        bottom: max(16px, env(safe-area-inset-bottom, 16px)) !important;
        right: max(16px, env(safe-area-inset-right, 16px)) !important;
        left: auto;
        top: auto;
    }

    .agentpow-root.agentpow-pos-bottom-left,
    .agentpow-root.agentpow-pos-top-left {
        left: max(16px, env(safe-area-inset-left, 16px)) !important;
        right: auto !important;
    }

    /* Fullscreen Modal Viewport on Mobile Devices */
    .agentpow-window {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        height: 100vh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        display: none;
        flex-direction: column !important;
        z-index: 9999999 !important;
        overflow: hidden !important;
    }

    .agentpow-window.agentpow-window-open {
        display: flex !important;
    }

    .agentpow-header {
        padding-top: max(14px, env(safe-area-inset-top, 14px)) !important;
        border-radius: 0 !important;
        flex-shrink: 0;
    }

    /* 44px Touch Target for Close Button */
    .agentpow-header-close {
        min-width: 44px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .agentpow-body {
        flex: 1 1 0% !important;
        padding: 14px !important;
        -webkit-overflow-scrolling: touch !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    .agentpow-input-form {
        padding-bottom: max(14px, calc(10px + env(safe-area-inset-bottom, 0px))) !important;
        flex-shrink: 0;
    }

    /* Product Cards & Carousels: Ensure Zero Horizontal Bleed */
    .agentpow-product-card,
    .agentpow-deal-card,
    .agentpow-rma-card,
    .agentpow-gdpr-banner {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .agentpow-carousel-wrap {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .agentpow-teaser {
        width: calc(100vw - 32px) !important;
        right: 0 !important;
        left: 0 !important;
        margin: 0 auto !important;
        bottom: 75px !important;
    }
}

/* =========================================================================
   RICH MEDIA ATTACHMENTS & EMBEDS (YOUTUBE, VIDEO, IMAGES, SOCIAL CARDS)
   ========================================================================= */
.agentpow-msg-media-img {
    margin-top: 10px;
    margin-bottom: 6px;
    border-radius: 10px;
    overflow: hidden;
    max-width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.agentpow-msg-media-img a {
    display: block;
    line-height: 0;
}

.agentpow-msg-media-img img {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.agentpow-msg-media-img img:hover {
    transform: scale(1.02);
}

.agentpow-video-embed {
    margin-top: 10px;
    margin-bottom: 6px;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

.agentpow-video-embed iframe,
.agentpow-video-embed video {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    object-fit: cover;
}

.agentpow-social-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    margin-bottom: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    transition: all 0.2s ease;
}

.agentpow-social-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.agentpow-social-icon {
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.agentpow-social-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.agentpow-social-platform {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.agentpow-social-link {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ap-primary, #4f46e5) !important;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agentpow-social-link:hover {
    text-decoration: underline !important;
}

/* Email Lead Capture Card */
.agentpow-root .agentpow-email-lead-card,
.agentpow-email-lead-card {
    background: #ffffff !important;
    border: 1.5px solid #c7d2fe !important;
    border-radius: 12px !important;
    padding: 14px !important;
    margin-top: 10px !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08) !important;
}
.agentpow-root .agentpow-lead-card-header,
.agentpow-lead-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}
.agentpow-root .agentpow-lead-icon,
.agentpow-lead-icon {
    font-size: 22px;
    line-height: 1;
}
.agentpow-root .agentpow-lead-title-row,
.agentpow-lead-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.agentpow-root .agentpow-lead-card-header strong,
.agentpow-lead-card-header strong {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}
.agentpow-root .agentpow-lead-coupon-badge,
.agentpow-lead-coupon-badge {
    font-size: 11px !important;
    font-weight: 700 !important;
    font-family: monospace !important;
    background: #e0e7ff !important;
    color: #3730a3 !important;
    padding: 2px 7px !important;
    border-radius: 5px !important;
    border: 1px solid #c7d2fe !important;
}
.agentpow-root .agentpow-lead-card-header p,
.agentpow-lead-card-header p {
    margin: 4px 0 0 0 !important;
    font-size: 11.5px !important;
    color: #475569 !important;
    line-height: 1.45 !important;
}
.agentpow-root .agentpow-lead-card-form,
.agentpow-lead-card-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.agentpow-root .agentpow-lead-email-input,
.agentpow-lead-email-input {
    flex: 1;
    min-width: 0;
    padding: 9px 12px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    outline: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}
.agentpow-root .agentpow-lead-email-input::placeholder,
.agentpow-lead-email-input::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 1 !important;
}
.agentpow-root .agentpow-lead-email-input:focus,
.agentpow-lead-email-input:focus {
    border-color: var(--ap-primary, #4f46e5) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15) !important;
}
.agentpow-root .agentpow-lead-submit-btn,
.agentpow-lead-submit-btn {
    padding: 9px 15px !important;
    background: var(--ap-primary, #4f46e5) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: opacity 0.2s, transform 0.15s !important;
}
.agentpow-root .agentpow-lead-submit-btn:hover,
.agentpow-lead-submit-btn:hover {
    opacity: 0.92 !important;
}
.agentpow-root .agentpow-lead-status,
.agentpow-lead-status {
    margin-top: 8px !important;
    padding: 8px 12px !important;
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 8px !important;
    color: #166534 !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
}

/* Priority Support Escalation Ticket Card */
.agentpow-root .agentpow-ticket-card,
.agentpow-ticket-card {
    background: #ffffff !important;
    border: 1.5px solid #fed7aa !important;
    border-radius: 12px !important;
    padding: 14px !important;
    margin-top: 10px !important;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.08) !important;
}
.agentpow-root .agentpow-ticket-header,
.agentpow-ticket-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}
.agentpow-root .agentpow-ticket-icon,
.agentpow-ticket-icon {
    font-size: 22px;
    line-height: 1;
}
.agentpow-root .agentpow-ticket-header strong,
.agentpow-root .agentpow-ticket-title,
.agentpow-ticket-header strong,
.agentpow-ticket-title {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #9a3412 !important;
    display: block !important;
}
.agentpow-root .agentpow-ticket-header p,
.agentpow-ticket-header p {
    margin: 4px 0 0 0 !important;
    font-size: 11.5px !important;
    color: #475569 !important;
    line-height: 1.45 !important;
}
.agentpow-root .agentpow-ticket-body,
.agentpow-ticket-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.agentpow-root .agentpow-ticket-row,
.agentpow-ticket-row {
    display: flex;
    gap: 8px;
}
@media (max-width: 480px) {
    .agentpow-ticket-row {
        flex-direction: column;
    }
}
.agentpow-root .agentpow-ticket-name,
.agentpow-root .agentpow-ticket-email,
.agentpow-root .agentpow-ticket-order,
.agentpow-root .agentpow-ticket-msg,
.agentpow-ticket-name,
.agentpow-ticket-email,
.agentpow-ticket-order,
.agentpow-ticket-msg {
    width: 100% !important;
    padding: 9px 12px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    font-family: inherit !important;
}
.agentpow-root .agentpow-ticket-name::placeholder,
.agentpow-root .agentpow-ticket-email::placeholder,
.agentpow-root .agentpow-ticket-order::placeholder,
.agentpow-root .agentpow-ticket-msg::placeholder,
.agentpow-ticket-name::placeholder,
.agentpow-ticket-email::placeholder,
.agentpow-ticket-order::placeholder,
.agentpow-ticket-msg::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 1 !important;
}
.agentpow-root .agentpow-ticket-name:focus,
.agentpow-root .agentpow-ticket-email:focus,
.agentpow-root .agentpow-ticket-order:focus,
.agentpow-root .agentpow-ticket-msg:focus,
.agentpow-ticket-name:focus,
.agentpow-ticket-email:focus,
.agentpow-ticket-order:focus,
.agentpow-ticket-msg:focus {
    border-color: #ea580c !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.15) !important;
}
.agentpow-root .agentpow-ticket-submit-btn,
.agentpow-ticket-submit-btn {
    padding: 10px 16px !important;
    background: linear-gradient(135deg, #ea580c, #c2410c) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: opacity 0.2s, transform 0.15s !important;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25) !important;
}
.agentpow-root .agentpow-ticket-submit-btn:hover,
.agentpow-ticket-submit-btn:hover {
    opacity: 0.94 !important;
    transform: translateY(-1px) !important;
}
.agentpow-root .agentpow-ticket-status,
.agentpow-ticket-status {
    margin-top: 8px !important;
    padding: 8px 12px !important;
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 8px !important;
    color: #166534 !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
}

/* =========================================================================
   CALL BUTTON: HEADER ICON, DIRECT-CALL CARD & CALLBACK REQUEST CARD
   ========================================================================= */
/* Call icon — same neutral token pair as its WhatsApp sibling so the header
   reads as one family. All !important so the host theme can't restyle it. */
.agentpow-call-header-btn {
    background: var(--ap-hdr-icon-bg, rgba(15, 23, 42, 0.07)) !important;
    color: var(--ap-hdr-icon, #0f172a) !important;
    border: none !important;
    box-shadow: none !important;
    transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s !important;
}
.agentpow-call-header-btn svg {
    display: block;
    width: 17px;
    height: 17px;
    transition: transform 0.2s ease;
}
.agentpow-call-header-btn:hover {
    background: var(--ap-hdr-icon-bg-hover, rgba(15, 23, 42, 0.14)) !important;
    color: var(--ap-hdr-icon, #0f172a) !important;
    transform: scale(1.08);
}

.agentpow-call-direct-card {
    margin-top: 10px;
    background: #ffffff;
    border: 1.5px solid #c7d2fe;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
    text-align: center;
}
.agentpow-call-direct-title {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.agentpow-call-direct-number {
    font-size: 22px;
    font-weight: 800;
    color: var(--ap-primary, #4f46e5);
    margin: 6px 0 12px;
    letter-spacing: 0.5px;
}
.agentpow-call-direct-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.agentpow-call-direct-call,
.agentpow-call-copy-btn {
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: opacity 0.2s, transform 0.15s;
}
.agentpow-call-direct-call {
    background: var(--ap-primary, #4f46e5);
    color: #ffffff;
}
.agentpow-call-copy-btn {
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}
.agentpow-call-direct-call:hover,
.agentpow-call-copy-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.agentpow-callback-card {
    position: relative;
    background: var(--ap-card-bg, #f8fafc);
    border: 1px solid var(--ap-border, rgba(226, 232, 240, 0.8));
    border-radius: 16px;
    padding: 16px;
    margin-top: 10px;
    box-shadow: 0 10px 26px -12px rgba(15, 23, 42, 0.28);
    animation: agentpowCbIn 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}
.agentpow-callback-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(90deg, var(--ap-primary, #6366f1), rgba(var(--ap-primary-rgb, 99, 102, 241), 0.3));
}
@keyframes agentpowCbIn {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.agentpow-callback-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.agentpow-callback-icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ap-primary, #6366f1);
    background: rgba(var(--ap-primary-rgb, 99, 102, 241), 0.12);
}
.agentpow-callback-headtext {
    min-width: 0;
}
.agentpow-callback-header strong {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ap-text-main, #0f172a);
    display: block;
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.agentpow-callback-header p {
    margin: 2px 0 0 0;
    font-size: 11.5px;
    color: var(--ap-text-muted, #64748b);
    line-height: 1.4;
}
.agentpow-callback-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.agentpow-cb-row {
    display: flex;
    gap: 8px;
}
.agentpow-cb-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.agentpow-cb-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ap-text-muted, #64748b);
}
.agentpow-cb-field-country {
    flex: 0 0 44%;
}
.agentpow-cb-field-phone {
    flex: 1;
}
.agentpow-cb-combo {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--ap-border, rgba(226, 232, 240, 0.8));
    border-radius: 10px;
    background: var(--ap-bg, #ffffff);
    transition: border-color 0.18s, box-shadow 0.18s;
}
.agentpow-cb-combo:focus-within {
    border-color: var(--ap-primary, #6366f1);
    box-shadow: 0 0 0 3px rgba(var(--ap-primary-rgb, 99, 102, 241), 0.18);
}
.agentpow-cb-combo-flag,
.agentpow-cb-opt-flag {
    flex: 0 0 auto;
    display: inline-flex;
    width: 20px;
    height: 14px;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.agentpow-cb-combo-flag .apow-flag,
.agentpow-cb-opt-flag .apow-flag {
    width: 20px;
    height: 14px;
    display: block;
}
.agentpow-cb-country-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    color: var(--ap-text-main, #0f172a);
    -webkit-text-fill-color: var(--ap-text-main, #0f172a);
}
.agentpow-cb-country-input::placeholder {
    color: var(--ap-text-muted, #94a3b8);
    -webkit-text-fill-color: var(--ap-text-muted, #94a3b8);
    opacity: 0.85;
}
.agentpow-cb-combo-dial {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--ap-text-muted, #64748b);
}
.agentpow-cb-combo-list {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    max-height: 190px;
    overflow-y: auto;
    z-index: 30;
    margin: 0;
    padding: 4px;
    background: var(--ap-bg, #ffffff);
    border: 1px solid var(--ap-border, rgba(226, 232, 240, 0.8));
    border-radius: 10px;
    box-shadow: 0 12px 28px -10px rgba(15, 23, 42, 0.35);
}
.agentpow-cb-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 12.5px;
    color: var(--ap-text-main, #0f172a);
}
.agentpow-cb-opt:hover,
.agentpow-cb-opt.active {
    background: rgba(var(--ap-primary-rgb, 99, 102, 241), 0.12);
}
.agentpow-cb-opt-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.agentpow-cb-opt-dial {
    flex: 0 0 auto;
    font-size: 11.5px;
    color: var(--ap-text-muted, #64748b);
}
.agentpow-cb-combo-empty {
    padding: 10px 8px;
    font-size: 12px;
    color: var(--ap-text-muted, #64748b);
    text-align: center;
}
.agentpow-cb-name,
.agentpow-cb-country,
.agentpow-cb-phone {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ap-border, rgba(226, 232, 240, 0.8));
    border-radius: 10px;
    font-size: 13px;
    background: var(--ap-bg, #ffffff);
    color: var(--ap-text-main, #0f172a);
    -webkit-text-fill-color: var(--ap-text-main, #0f172a);
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.agentpow-cb-field-window {
    gap: 6px;
    margin-top: 2px;
}
.agentpow-cb-windows {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.agentpow-cb-win {
    border: 1px solid var(--ap-border, rgba(226, 232, 240, 0.8));
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.3;
    background: rgba(var(--ap-primary-rgb), 0.06);
    color: var(--ap-text-main, #0f172a);
    cursor: pointer;
    transition: background-color 0.16s, border-color 0.16s, color 0.16s;
}
.agentpow-cb-win:hover {
    border-color: var(--ap-primary, #6366f1);
}
.agentpow-cb-win.is-selected {
    background: var(--ap-primary, #6366f1);
    border-color: var(--ap-primary, #6366f1);
    color: var(--ap-primary-contrast, #ffffff);
    box-shadow: 0 4px 12px -3px rgba(var(--ap-primary-rgb), 0.45);
}
.agentpow-cb-country {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.agentpow-cb-name:focus,
.agentpow-cb-country:focus,
.agentpow-cb-phone:focus {
    border-color: var(--ap-primary, #6366f1);
    box-shadow: 0 0 0 3px rgba(var(--ap-primary-rgb, 99, 102, 241), 0.18);
}
.agentpow-cb-name::placeholder,
.agentpow-cb-phone::placeholder {
    color: var(--ap-text-muted, #94a3b8);
    -webkit-text-fill-color: var(--ap-text-muted, #94a3b8);
    opacity: 0.85;
}
.agentpow-callback-submit-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
    /* Force a single horizontal row. A host theme that forces buttons to display as
       blocks would otherwise stack the label and the arrow icon vertically (the
       "se muestra mal" regression), so every layout axis here is pinned with !important. */
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    margin-top: 2px;
    /* Refined single-tone treatment: brand primary with a soft top sheen and a deep,
       low-spreading shadow. Reads premium and stays on-brand instead of a loud two-hue
       gradient. */
    background-color: var(--ap-primary, #6366f1) !important;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 62%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.015em;
    text-align: center !important;
    white-space: nowrap !important;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s, filter 0.2s;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 10px 22px -12px rgba(var(--ap-primary-rgb, 99, 102, 241), 0.72) !important;
}
.agentpow-callback-submit-btn > span {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
}
.agentpow-callback-submit-btn > svg {
    flex: 0 0 auto !important;
    display: block !important;
}
.agentpow-callback-submit-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 14px 26px -12px rgba(var(--ap-primary-rgb, 99, 102, 241), 0.82);
}
.agentpow-callback-submit-btn:active {
    transform: translateY(0);
}
.agentpow-callback-submit-btn:disabled {
    opacity: 0.7;
    cursor: default;
    transform: none;
    box-shadow: none;
}
.agentpow-cb-consent {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    font-size: 10.5px;
    color: var(--ap-text-muted, #64748b);
    text-align: center;
    line-height: 1.3;
}
.agentpow-callback-status {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(22, 163, 74, 0.12);
    border: 1px solid rgba(22, 163, 74, 0.32);
    color: #16a34a;
}
.agentpow-callback-status.agentpow-cb-err {
    background: rgba(225, 29, 72, 0.10);
    border-color: rgba(225, 29, 72, 0.34);
    color: #e11d48;
}

/* Callback wizard: let the form card use almost the full chat width so its fields
   and action row never overflow the message bubble. Strip the generic bubble chrome
   so the card owns its own surface. */
.agentpow-msg.agentpow-msg--card {
    max-width: 96%;
}
.agentpow-msg--card > .agentpow-bubble {
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Callback / direct chips reuse the quick-chips visual language */
.agentpow-cb-chip {
    cursor: pointer;
}

/* ---- 2-step wizard: progress rail + step panels + nav buttons ---- */
.agentpow-cb-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}
.agentpow-cb-seg {
    flex: 1 1 0;
    height: 4px;
    border-radius: 999px;
    background: var(--ap-border, rgba(226, 232, 240, 0.8));
    transition: background 0.3s ease;
}
.agentpow-cb-seg.is-active {
    background: var(--ap-primary, #6366f1);
}
.agentpow-cb-stepnum {
    flex: 0 0 auto;
    margin-left: 4px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ap-text-muted, #64748b);
    white-space: nowrap;
}
.agentpow-cb-step {
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: agentpowCbStep 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes agentpowCbStep {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
}
.agentpow-cb-next {
    -webkit-appearance: none !important;
    appearance: none !important;
    /* Same single-row pinning as the submit button (see above) so a host theme that
       forces block display cannot stack the label and the arrow. */
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    margin-top: 2px;
    background-color: var(--ap-primary, #6366f1) !important;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 62%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.015em;
    text-align: center !important;
    white-space: nowrap !important;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s, filter 0.2s;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 10px 22px -12px rgba(var(--ap-primary-rgb, 99, 102, 241), 0.72) !important;
}
.agentpow-cb-next > span {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
}
.agentpow-cb-next > svg {
    flex: 0 0 auto !important;
    display: block !important;
}
.agentpow-cb-next:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 14px 26px -12px rgba(var(--ap-primary-rgb, 99, 102, 241), 0.82);
}
.agentpow-cb-next:active {
    transform: translateY(0);
}
.agentpow-cb-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.agentpow-cb-actions .agentpow-callback-submit-btn {
    flex: 1 1 auto;
    width: auto;
    margin-top: 0;
}
.agentpow-cb-back {
    -webkit-appearance: none !important;
    appearance: none !important;
    flex: 0 0 auto;
    /* Pinned so a host theme that forces block display + left alignment cannot
       misalign the label or break the actions row layout. */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    padding: 12px 16px;
    background: transparent !important;
    color: var(--ap-text-muted, #64748b) !important;
    border: 1px solid var(--ap-border, rgba(226, 232, 240, 0.8)) !important;
    box-shadow: none !important;
    border-radius: 11px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.agentpow-cb-back:hover {
    background: rgba(var(--ap-primary-rgb, 99, 102, 241), 0.10);
    color: var(--ap-primary, #6366f1);
    border-color: var(--ap-primary, #6366f1);
}
/* ---- Unified phone field: [flag +dial / country-search] | number ---- */
.agentpow-cb-phone-combo {
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--ap-border, rgba(226, 232, 240, 0.8));
    border-radius: 10px;
    background: var(--ap-bg, #ffffff);
    transition: border-color 0.18s, box-shadow 0.18s;
}
.agentpow-cb-phone-combo:focus-within {
    border-color: var(--ap-primary, #6366f1);
    box-shadow: 0 0 0 3px rgba(var(--ap-primary-rgb, 99, 102, 241), 0.18);
}
.agentpow-cb-phone-trigger {
    -webkit-appearance: none !important;
    appearance: none !important;
    flex: 0 0 auto;
    /* Pinned so a hostile host theme (button { display:block; border; background })
       cannot restyle the flag/dial trigger inside the callback form. */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px;
    padding: 5px 6px;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    color: var(--ap-text-main, #0f172a) !important;
    transition: background 0.15s;
}
.agentpow-cb-phone-trigger:hover {
    background: rgba(var(--ap-primary-rgb, 99, 102, 241), 0.10) !important;
}
.agentpow-cb-pt-flag {
    flex: 0 0 auto;
    display: inline-flex;
    width: 20px;
    height: 14px;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.agentpow-cb-pt-flag .apow-flag {
    width: 20px;
    height: 14px;
    display: block;
}
.agentpow-cb-pt-dial {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ap-text-main, #0f172a);
}
.agentpow-cb-pt-chev {
    width: 11px;
    height: 11px;
    color: var(--ap-text-muted, #64748b);
}
.agentpow-cb-pt-sep {
    flex: 0 0 auto;
    width: 1px;
    height: 20px;
    background: var(--ap-border, rgba(226, 232, 240, 0.8));
}
.agentpow-cb-phone-combo .agentpow-cb-country-input {
    flex: 0 0 auto;
    width: 120px;
    border: none;
    outline: none;
    background: transparent;
    padding: 6px 2px;
    font-family: inherit;
    font-size: 13px;
    color: var(--ap-text-main, #0f172a);
    -webkit-text-fill-color: var(--ap-text-main, #0f172a);
}
.agentpow-cb-phone-combo .agentpow-cb-country-input::placeholder {
    color: var(--ap-text-muted, #94a3b8);
    -webkit-text-fill-color: var(--ap-text-muted, #94a3b8);
    opacity: 0.85;
}
.agentpow-cb-phone-combo .agentpow-cb-phone {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 8px 2px !important;
    font-size: 13px;
    color: var(--ap-text-main, #0f172a);
    -webkit-text-fill-color: var(--ap-text-main, #0f172a);
}
.agentpow-cb-phone-combo .agentpow-cb-phone::placeholder {
    color: var(--ap-text-muted, #94a3b8);
    -webkit-text-fill-color: var(--ap-text-muted, #94a3b8);
    opacity: 0.85;
}
@media (max-width: 480px) {
    .agentpow-cb-row {
        flex-direction: column;
    }
    .agentpow-cb-field-country {
        flex: 1 1 auto;
    }
}

/* =========================================================================
   INTERACTIVE COUPON CARD & DIRECT APPLICATION (ESTHETIC VOUCHER TICKET)
   ========================================================================= */
.agentpow-coupon-card {
    margin: 12px 0 6px 0;
    background: linear-gradient(135deg, rgba(var(--ap-primary-rgb, 99, 102, 241), 0.05) 0%, #ffffff 100%);
    border: 1.5px dashed var(--ap-primary, #6366f1);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
}

.agentpow-coupon-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--ap-primary-rgb, 99, 102, 241), 0.15);
}

.agentpow-coupon-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
}

.agentpow-coupon-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(var(--ap-primary-rgb, 99, 102, 241), 0.12);
    color: var(--ap-primary, #6366f1);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap !important;
    flex-shrink: 0;
    line-height: 1.2;
}

.agentpow-coupon-expiry {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap !important;
    flex-shrink: 0;
    line-height: 1.2;
}

.agentpow-coupon-value-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.agentpow-coupon-discount {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.agentpow-coupon-free-shipping {
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
    white-space: nowrap;
}

.agentpow-coupon-terms {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 10px;
    line-height: 1.3;
}

.agentpow-coupon-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 7px 10px 7px 14px;
    margin-bottom: 12px;
    box-sizing: border-box !important;
    width: 100% !important;
}

.agentpow-coupon-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--ap-primary, #6366f1);
    user-select: all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agentpow-coupon-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
    white-space: nowrap !important;
    flex-shrink: 0;
}

.agentpow-coupon-copy-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    transform: scale(1.03);
}

.agentpow-coupon-copy-btn.copied {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.agentpow-coupon-card-footer {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.agentpow-coupon-apply-btn,
.agentpow-deal-btn {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    background: linear-gradient(135deg, var(--ap-primary, #6366f1) 0%, var(--ap-primary-hover, #4f46e5) 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 11px 16px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(var(--ap-primary-rgb, 99, 102, 241), 0.28) !important;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    line-height: 1.3 !important;
    white-space: normal !important;
}

.agentpow-coupon-apply-btn:hover,
.agentpow-deal-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(var(--ap-primary-rgb, 99, 102, 241), 0.4) !important;
    opacity: 0.96 !important;
}

.agentpow-coupon-apply-btn:active,
.agentpow-deal-btn:active {
    transform: translateY(1px) !important;
}

.agentpow-coupon-apply-btn.loading,
.agentpow-deal-btn.loading {
    opacity: 0.75 !important;
    cursor: wait !important;
    transform: none !important;
}

.agentpow-coupon-apply-btn.saved {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

/* Inline Cart Confirmation Toast */
.agentpow-cart-toast {
    margin: 8px 12px 12px 12px;
    background: #ffffff;
    border: 1.5px solid #10b981;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.15);
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
    width: calc(100% - 24px);
    max-width: 100%;
    animation: ap-fade-in 0.25s ease;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.agentpow-cart-toast.fading {
    opacity: 0;
    transform: translateY(6px);
}

.agentpow-cart-toast-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.agentpow-cart-toast-msg {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #1e293b;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.agentpow-cart-toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #d1fae5;
    color: #059669;
    font-weight: 700;
    font-size: 11px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 1px;
}

.agentpow-cart-toast-text {
    flex: 1;
    min-width: 0;
}

.agentpow-cart-toast-text strong {
    color: #0f172a;
    font-weight: 700;
    display: inline;
}

.agentpow-cart-toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color 0.2s, background 0.2s;
    outline: none;
}

.agentpow-cart-toast-close:hover {
    color: #ef4444;
    background: #fee2e2;
}

.agentpow-cart-toast-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 2px;
}

.agentpow-cart-toast-btn {
    flex: 1;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1.2;
    box-sizing: border-box;
}

.agentpow-cart-toast-btn.cart {
    background: #f1f5f9;
    color: #334155 !important;
    border: 1px solid #cbd5e1;
}

.agentpow-cart-toast-btn.cart:hover {
    background: #e2e8f0;
    color: #0f172a !important;
}

.agentpow-cart-toast-btn.checkout {
    background: #10b981;
    color: #ffffff !important;
    border: 1px solid #059669;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.agentpow-cart-toast-btn.checkout:hover {
    background: #059669;
}

/* Dark Mode for Cart Toast */
@media (prefers-color-scheme: dark) {
    .agentpow-cart-toast {
        background: #1e293b;
        border-color: #059669;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    }
    .agentpow-cart-toast-msg {
        color: #f8fafc;
    }
    .agentpow-cart-toast-icon {
        background: rgba(16, 185, 129, 0.2);
        color: #34d399;
    }
    .agentpow-cart-toast-text strong {
        color: #34d399;
    }
    .agentpow-cart-toast-btn.cart {
        background: #334155;
        color: #f1f5f9 !important;
        border-color: #475569;
    }
    .agentpow-cart-toast-btn.cart:hover {
        background: #475569;
    }
    .agentpow-cart-toast-close {
        color: #64748b;
    }
    .agentpow-cart-toast-close:hover {
        color: #f87171;
        background: rgba(239, 68, 68, 0.15);
    }
}

/* -----------------------------------------------------------------
 * PROGRESSIVE PRODUCT DISCLOSURE PRELOADER & REVEAL ANIMATIONS
 * ----------------------------------------------------------------- */
.agentpow-carousel-preloader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 4px 0;
    padding: 7px 14px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 18px;
    font-size: 12px;
    font-weight: 500;
    color: #4f46e5;
    animation: agentpowPulsePreloader 1.5s ease-in-out infinite;
    max-width: fit-content;
    box-sizing: border-box;
}

.agentpow-preloader-shimmer {
    display: flex;
    align-items: center;
    gap: 6px;
}

.agentpow-preloader-icon {
    font-size: 13px;
    display: inline-block;
    animation: agentpowWiggle 1.8s ease-in-out infinite;
}

.agentpow-preloader-dots span {
    animation: agentpowBlinkDot 1.4s infinite;
    opacity: 0;
    font-weight: 700;
}
.agentpow-preloader-dots span:nth-child(1) { animation-delay: 0.0s; }
.agentpow-preloader-dots span:nth-child(2) { animation-delay: 0.2s; }
.agentpow-preloader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes agentpowPulsePreloader {
    0%, 100% { opacity: 0.88; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

@keyframes agentpowWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}

@keyframes agentpowBlinkDot {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Smooth reveal animation for product carousel */
.agentpow-carousel-reveal {
    animation: agentpowSlideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes agentpowSlideUpFade {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Dark mode for preloader */
@media (prefers-color-scheme: dark) {
    .agentpow-carousel-preloader {
        background: rgba(99, 102, 241, 0.16);
        border-color: rgba(99, 102, 241, 0.35);
        color: #a5b4fc;
    }
}

/* -----------------------------------------------------------------
 * PRODUCT COMPARISON TABLE (RESPONSIVE IN-CHAT)
 * ----------------------------------------------------------------- */
.agentpow-table-wrap {
    width: 100%;
    margin: 8px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid var(--ap-border, #e2e8f0);
    background: #ffffff;
}

.agentpow-chat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
    line-height: 1.4;
    text-align: left;
}

.agentpow-chat-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    padding: 6px 10px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.agentpow-chat-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}

.agentpow-chat-table tr:last-child td {
    border-bottom: none;
}

.agentpow-chat-table tr:nth-child(even) td {
    background: #fafafa;
}

/* -----------------------------------------------------------------
 * FREE SHIPPING PROGRESS & CROSS-SELL TOAST EXTENSIONS
 * ----------------------------------------------------------------- */
.agentpow-toast-shipping-banner {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 4px 0;
    font-size: 11.5px;
    color: #166534;
    width: 100%;
    box-sizing: border-box;
}

.agentpow-toast-shipping-banner.qualified {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
}

.agentpow-toast-shipping-label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
    font-size: 11px;
}

.agentpow-toast-shipping-bar {
    width: 100%;
    height: 5px;
    background: #dcfce7;
    border-radius: 10px;
    overflow: hidden;
}

.agentpow-toast-shipping-fill {
    height: 100%;
    background: #16a34a;
    border-radius: 10px;
    transition: width 0.5s ease-out;
}

.agentpow-toast-cross-sell {
    margin: 4px 0;
    padding: 6px 10px;
    background: #f8fafc;
    border-left: 3px solid var(--ap-primary, #6366f1);
    border-radius: 0 6px 6px 0;
    font-size: 11.5px;
    color: #475569;
    width: 100%;
    box-sizing: border-box;
}

.agentpow-card-wa-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #25d366;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 14px;
    margin-left: 4px;
    transition: transform 0.15s, opacity 0.15s;
    vertical-align: middle;
}

.agentpow-card-wa-link:hover {
    transform: scale(1.08);
    opacity: 0.95;
}

@media (prefers-color-scheme: dark) {
    .agentpow-table-wrap {
        background: #1e293b;
        border-color: #334155;
    }
    .agentpow-chat-table th {
        background: #0f172a;
        color: #94a3b8;
        border-bottom-color: #334155;
    }
    .agentpow-chat-table td {
        border-bottom-color: #334155;
        color: #f1f5f9;
    }
    .agentpow-chat-table tr:nth-child(even) td {
        background: #1e293b;
    }
    .agentpow-toast-shipping-banner {
        background: rgba(22, 101, 52, 0.2);
        border-color: rgba(34, 197, 94, 0.4);
        color: #86efac;
    }
    .agentpow-toast-shipping-banner.qualified {
        background: rgba(6, 95, 70, 0.3);
        border-color: rgba(16, 185, 129, 0.5);
        color: #6ee7b7;
    }
    .agentpow-toast-cross-sell {
        background: #0f172a;
        color: #cbd5e1;
    }
    .agentpow-coupon-card {
        background: linear-gradient(135deg, rgba(var(--ap-primary-rgb, 99, 102, 241), 0.12) 0%, #1e293b 100%) !important;
        border-color: rgba(var(--ap-primary-rgb, 99, 102, 241), 0.6) !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
    }
    .agentpow-coupon-badge {
        background: rgba(var(--ap-primary-rgb, 99, 102, 241), 0.25) !important;
        color: #c7d2fe !important;
        border: 1px solid rgba(var(--ap-primary-rgb, 99, 102, 241), 0.4) !important;
    }
    .agentpow-coupon-discount {
        color: #f8fafc !important;
    }
    .agentpow-coupon-expiry,
    .agentpow-coupon-terms {
        color: #94a3b8 !important;
    }
    .agentpow-coupon-code-box {
        background: #0f172a !important;
        border-color: #334155 !important;
    }
    .agentpow-coupon-code {
        color: #818cf8 !important;
    }
    .agentpow-coupon-copy-btn {
        background: #1e293b !important;
        border-color: #475569 !important;
        color: #e2e8f0 !important;
    }
    .agentpow-coupon-copy-btn:hover {
        background: #334155 !important;
        border-color: #64748b !important;
        color: #ffffff !important;
    }
    .agentpow-coupon-copy-btn.copied {
        background: rgba(16, 185, 129, 0.2) !important;
        border-color: #10b981 !important;
        color: #6ee7b7 !important;
    }
}

/* ---------------------------------------------------------------------
   Accessibility: visible keyboard focus + reduced-motion respect
   --------------------------------------------------------------------- */
.agentpow-window button:focus-visible,
.agentpow-window input:focus-visible,
.agentpow-window a:focus-visible,
.agentpow-chip:focus-visible {
    outline: 3px solid var(--ap-primary, #6366f1);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .agentpow-window *,
    .agentpow-window *::before,
    .agentpow-window *::after,
    .agentpow-launcher,
    .agentpow-teaser {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------------------------------------------------------------------
   Product typeahead: suggestions dropdown above the composer
   --------------------------------------------------------------------- */
.agentpow-input-form { position: relative; }

.apow-suggest {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 8px;
    right: 8px;
    z-index: 40;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--ap-border, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
    animation: apFadeIn 0.18s ease-out;
}

.apow-suggest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 13px;
    color: #0f172a;
    cursor: pointer;
}

.apow-suggest-item:hover,
.apow-suggest-item.active { background: rgba(99, 102, 241, 0.10); }
.apow-suggest-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.apow-suggest-price { flex: 0 0 auto; font-weight: 700; color: var(--ap-primary, #6366f1); white-space: nowrap; }

/* The widget themes itself via prefers-color-scheme (there is no .agentpow-dark-mode
   class), so the dropdown surface follows the same media query. */
@media (prefers-color-scheme: dark) {
    .apow-suggest { background: #1e293b; border-color: #334155; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5); }
    .apow-suggest-item { color: #f1f5f9; }
    .apow-suggest-item:hover,
    .apow-suggest-item.active { background: rgba(99, 102, 241, 0.22); }
    .apow-suggest-price { color: #a5b4fc; }
}
