.wcp-global-wrapper { position: relative; z-index: 999999; }
@media (max-width: 768px) { .wcp-global-wrapper.wcp-hide-mobile { display: none !important; } }
@media (min-width: 769px) { .wcp-global-wrapper.wcp-hide-desktop { display: none !important; } }

.wcp-float { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background-color: var(--wa-green); border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 15px rgba(0,0,0,0.15); cursor: pointer; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.wcp-float:hover { transform: scale(1.1); }
.wcp-float svg { width: 35px; height: 35px; fill: #fff; }
.wcp-global-wrapper.wcp-pos-left .wcp-float { left: 30px; right: auto; }

/* TOOLTIP DE INVITACIÓN (GATILLO) */
.wcp-tooltip-bubble { position: absolute; right: 75px; top: 50%; transform: translateY(-50%) translateX(20px); background: #ffffff; color: #1f2937; padding: 10px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 4px 15px rgba(0,0,0,0.1); opacity: 0; pointer-events: none; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); font-family: -apple-system, sans-serif; border: 1px solid #e5e7eb;}
.wcp-tooltip-bubble::after { content: ''; position: absolute; top: 50%; right: -6px; transform: translateY(-50%); border-width: 6px 0 6px 6px; border-style: solid; border-color: transparent transparent transparent #ffffff; }
.wcp-tooltip-bubble.wcp-show-tooltip { opacity: 1; transform: translateY(-50%) translateX(0); }
.wcp-global-wrapper.wcp-pos-left .wcp-tooltip-bubble { right: auto; left: 75px; transform: translateY(-50%) translateX(-20px); }
.wcp-global-wrapper.wcp-pos-left .wcp-tooltip-bubble::after { right: auto; left: -6px; border-width: 6px 6px 6px 0; border-color: transparent #ffffff transparent transparent; }
.wcp-global-wrapper.wcp-dark-auto .wcp-tooltip-bubble { background: #1f2937; color: #f3f4f6; border-color: #374151; }
.wcp-global-wrapper.wcp-dark-auto .wcp-tooltip-bubble::after { border-color: transparent transparent transparent #1f2937; }
.wcp-global-wrapper.wcp-dark-auto.wcp-pos-left .wcp-tooltip-bubble::after { border-color: transparent #1f2937 transparent transparent; }

.wcp-badge-red { position: absolute; top: -5px; right: -5px; background: #ef4444; color: #fff; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.2); z-index: 2; }
.wcp-global-wrapper.wcp-pos-left .wcp-badge-red { right: auto; left: -5px; }

/* ANIMACIONES */
@keyframes wcpPulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
.wcp-anim-pulse { animation: wcpPulse 2s infinite; }
@keyframes wcpBounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-20px);} 60% {transform: translateY(-10px);} }
.wcp-anim-bounce { animation: wcpBounce 2s infinite; }
@keyframes wcpShake { 0%, 80%, 100% {transform: translateX(0);} 82%, 86%, 90%, 94%, 98% {transform: translateX(-5px);} 84%, 88%, 92%, 96% {transform: translateX(5px);} }
.wcp-anim-shake { animation: wcpShake 4s infinite ease-in-out; }
@keyframes wcpTada { 0%, 70%, 100% { transform: scale(1); } 73%, 76% { transform: scale(0.9) rotate(-3deg); } 79%, 85%, 91%, 97% { transform: scale(1.1) rotate(3deg); } 82%, 88%, 94% { transform: scale(1.1) rotate(-3deg); } }
.wcp-anim-tada { animation: wcpTada 4s infinite ease-in-out; }
@keyframes wcpSwing { 0%, 70%, 100% { transform: rotate(0deg); } 75% { transform: rotate(15deg); } 80% { transform: rotate(-10deg); } 85% { transform: rotate(5deg); } 90% { transform: rotate(-5deg); } 95% { transform: rotate(0deg); } }
.wcp-anim-swing { animation: wcpSwing 4s infinite ease-in-out; transform-origin: top center; }

.wcp-global-wrapper.wcp-chat-open .wcp-float { animation: none !important; transform: scale(1) !important; }

/* VENTANA COLA IMESSAGE */
.wcp-window { position: fixed; bottom: 100px; right: 30px; width: 350px; max-width: calc(100vw - 40px); background-color: #ffffff; border-radius: 16px; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1)); display: flex; flex-direction: column; opacity: 0; pointer-events: none; transform: translateY(20px); transition: all 0.3s ease; font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
.wcp-window.wcp-show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.wcp-global-wrapper.wcp-pos-left .wcp-window { left: 30px; right: auto; }

.wcp-window::after { content: ""; position: absolute; bottom: -10px; right: 25px; border-width: 12px 12px 0 0; border-style: solid; border-color: #ffffff transparent transparent transparent; display: block; width: 0; height: 0; }
.wcp-global-wrapper.wcp-pos-left .wcp-window::after { left: 25px; right: auto; border-width: 12px 0 0 12px; }

.wcp-w-header { background-color: var(--wcp-header-bg); padding: 24px 50px 24px 20px; position: relative; border-radius: 16px 16px 0 0; }
.wcp-header-content { display: flex; align-items: center; gap: 12px; }
.wcp-avatar-wrap { position: relative; width: 48px; height: 48px; flex-shrink: 0;}
.wcp-avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.2); }
.wcp-status-dot { position: absolute; bottom: 0; right: 0; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--wcp-header-bg); }

.wcp-w-header h4 { color: var(--wcp-title-color) !important; margin: 0 0 4px 0; font-size: 16px; font-weight: 600; }
.wcp-w-header p { color: var(--wcp-subtitle-color) !important; margin: 0; font-size: 13px; opacity: 0.9; }

.wcp-global-wrapper.wcp-header-center-align .wcp-w-header { display: flex; flex-direction: column; align-items: center; text-align: center; }
.wcp-global-wrapper.wcp-header-center-align .wcp-header-content { flex-direction: column; gap: 8px; }

.wcp-close { position: absolute; top: 15px; right: 15px; background: var(--wcp-close-bg) !important; border: var(--wcp-close-style-border) !important; color: var(--wcp-close-color) !important; width: var(--wcp-close-size) !important; height: var(--wcp-close-size) !important; border-radius: var(--wcp-close-radius); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: var(--wcp-close-font-size) !important; padding: 0; z-index: 10; }

/* TYPING */
.wcp-typing-view { padding: 30px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; }
.wcp-typing-bubble { background: #f3f4f6; padding: 12px 16px; border-radius: 16px; display: inline-flex; gap: 4px; align-items: center; height: 38px; }
.wcp-dot { width: 6px; height: 6px; background: #9ca3af; border-radius: 50%; animation: wcpTyping 1.4s infinite ease-in-out both; }
.wcp-dot:nth-child(1) { animation-delay: -0.32s; }
.wcp-dot:nth-child(2) { animation-delay: -0.16s; }
.wcp-typing-text { font-size: 13px; color: #9ca3af; margin-top: 12px; }
@keyframes wcpTyping { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

/* BODY */
.wcp-w-body { padding: 25px 20px 20px 20px; background: #fff; }
.wcp-w-group { margin-bottom: 18px; }
.wcp-w-group label { display: block; font-size: 13px; color: #374151; margin-bottom: 8px; font-weight: 600; }
.wcp-w-input { width: 100% !important; padding: 12px 18px !important; border: 1px solid var(--wcp-input-border) !important; border-radius: 50px !important; font-size: 14px !important; background: #fff !important; color: #1f2937 !important; }
.wcp-w-textarea { width: 100% !important; padding: 14px 18px !important; border: 1px solid var(--wcp-input-border) !important; border-radius: 16px !important; font-size: 14px !important; background: #fff !important; color: #1f2937 !important; resize: none !important; height: 80px !important; }
.wcp-error { border-color: #ef4444 !important; background-color: #fef2f2 !important; }

.wcp-w-btn { width: 100% !important; background-color: var(--wcp-btn-bg) !important; color: #fff !important; border: none !important; padding: 14px !important; border-radius: 50px !important; font-size: 15px !important; font-weight: 600; cursor: pointer !important; }
.wcp-footer-text { text-align: center; font-size: 12px; background: #fff; padding: 0 20px 20px 20px; border-radius: 0 0 16px 16px; margin:0;}
.wcp-footer-text a { color: #6b7280; text-decoration: none; }

/* AUTO DARK MODE */
@media (prefers-color-scheme: dark) {
    .wcp-global-wrapper.wcp-dark-auto .wcp-window { background-color: #1f2937; }
    .wcp-global-wrapper.wcp-dark-auto .wcp-window::after { border-top-color: #1f2937; }
    .wcp-global-wrapper.wcp-dark-auto .wcp-w-body, .wcp-global-wrapper.wcp-dark-auto .wcp-typing-view, .wcp-global-wrapper.wcp-dark-auto .wcp-footer-text { background: #1f2937; }
    .wcp-global-wrapper.wcp-dark-auto .wcp-w-body label { color: #d1d5db; }
    .wcp-global-wrapper.wcp-dark-auto .wcp-w-input, .wcp-global-wrapper.wcp-dark-auto .wcp-w-textarea { background: #374151 !important; color: #f3f4f6 !important; border-color: #4b5563 !important; }
}
