/* WP WhatsApp Tracker - Frontend Styles v2.1 */
.wwt-floating-btn {
    position: fixed; bottom: 30px; border: none; cursor: pointer;
    color: #ffffff; padding: 12px 20px; border-radius: 50px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); z-index: 999999;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none; transform: translateZ(0); -webkit-transform: translateZ(0);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px; font-weight: 600; letter-spacing: 0.3px;
}
.wwt-floating-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); color: #ffffff;
}
.wwt-floating-btn svg { width: 24px; height: 24px; fill: #ffffff; flex-shrink: 0; }

.wwt-floating-btn.wwt-hidden { opacity: 0; visibility: hidden; transform: translateY(20px); }
.wwt-floating-btn.wwt-visible {
    opacity: 1; visibility: visible; transform: translateY(0);
    animation: wwt-fadeInUp 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
@keyframes wwt-fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@keyframes wwt-wiggle {
    0%,100% { transform: rotate(0deg); } 10% { transform: rotate(-3deg); }
    20% { transform: rotate(3deg); } 30% { transform: rotate(-3deg); }
    40% { transform: rotate(2deg); } 50% { transform: rotate(0deg); }
}
.wwt-floating-btn.wwt-wiggle { animation: wwt-wiggle 0.8s ease-in-out 3; animation-delay: var(--wwt-wiggle-delay, 5s); }

@keyframes wwt-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }
.wwt-floating-btn.wwt-pulse { animation: wwt-pulse 0.6s ease-in-out 2; }

.wwt-badge-bubble {
    position: absolute; top: -6px; right: -6px;
    background: #ff3b30; color: #fff; font-size: 11px; font-weight: 700;
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #ffffff; box-shadow: 0 2px 8px rgba(255,59,48,0.4);
    animation: wwt-badgePop 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55); z-index: 10;
}
@keyframes wwt-badgePop { 0% { transform: scale(0); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
.wwt-badge-fadeout { animation: wwt-badgeFadeOut 0.4s ease forwards; }
@keyframes wwt-badgeFadeOut { to { transform: scale(0); opacity: 0; } }

.wwt-welcome-bubble {
    position: fixed; z-index: 999998; background: #ffffff; color: #1d1d1f;
    padding: 12px 18px; border-radius: 16px; font-size: 13px; font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12); max-width: 250px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: wwt-bubbleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wwt-welcome-bubble::after {
    content: ''; position: absolute; width: 12px; height: 12px;
    background: #ffffff; transform: rotate(45deg); box-shadow: 3px 3px 6px rgba(0,0,0,0.06);
}
.wwt-bubble-right::after { bottom: -5px; right: 30px; }
.wwt-bubble-left::after { bottom: -5px; left: 30px; }
.wwt-welcome-bubble.wwt-hiding { opacity: 0; transform: translateY(10px); pointer-events: none; transition: all 0.3s ease; }
@keyframes wwt-bubbleIn { from { opacity: 0; transform: translateY(15px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (prefers-color-scheme: dark) {
    .wwt-welcome-bubble { background: #1c1c1e; color: #f5f5f7; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
    .wwt-welcome-bubble::after { background: #1c1c1e; }
}

/* Old popup styles (keep for compatibility) */
.wwt-agents-overlay { position: fixed; top:0; left:0; right:0; bottom:0; background: rgba(0,0,0,0.5); z-index: 9999990; display: flex; align-items: center; justify-content: center; animation: wwt-fadeIn 0.2s ease; }
@keyframes wwt-fadeIn { from { opacity: 0; } to { opacity: 1; } }
.wwt-agents-popup { background: #ffffff; border-radius: 20px; padding: 24px; max-width: 380px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.2); animation: wwt-popupIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
@keyframes wwt-popupIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.wwt-agents-popup h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: #1d1d1f; }
.wwt-popup-subtitle { font-size: 13px; color: #8e8e93; margin-bottom: 16px; }

@media (max-width: 768px) { .wwt-floating-btn { padding: 10px 16px; font-size: 13px; bottom: 20px; } .wwt-floating-btn svg { width: 20px; height: 20px; } .wwt-welcome-bubble { max-width: 200px; font-size: 12px; padding: 10px 14px; } }


/* ============================================================
   BUTTON STYLE TEMPLATES (10)
   ============================================================ */
.wwt-floating-btn.wwt-style-gradient { background: linear-gradient(135deg, #25D366, #0a84ff) !important; box-shadow: 0 6px 20px rgba(37,211,102,0.3); }
.wwt-floating-btn.wwt-style-gradient:hover { box-shadow: 0 10px 28px rgba(10,132,255,0.4); }
.wwt-floating-btn.wwt-style-minimal { width: 56px; height: 56px; padding: 0 !important; border-radius: 50% !important; min-width: 56px; justify-content: center; }
.wwt-floating-btn.wwt-style-minimal span { display: none; }
.wwt-floating-btn.wwt-style-minimal svg { width: 28px; height: 28px; }
.wwt-floating-btn.wwt-style-neon { box-shadow: 0 0 15px rgba(37,211,102,0.6), 0 0 40px rgba(37,211,102,0.3), 0 0 80px rgba(37,211,102,0.15); animation: wwt-neonPulse 2s ease-in-out infinite; }
@keyframes wwt-neonPulse { 0%,100%{box-shadow:0 0 15px rgba(37,211,102,0.6),0 0 40px rgba(37,211,102,0.3);} 50%{box-shadow:0 0 25px rgba(37,211,102,0.8),0 0 60px rgba(37,211,102,0.4),0 0 100px rgba(37,211,102,0.2);} }
.wwt-floating-btn.wwt-style-outline { background: transparent !important; border: 2px solid currentColor; color: inherit; }
.wwt-floating-btn.wwt-style-outline svg { fill: currentColor; }
.wwt-floating-btn.wwt-style-outline:hover { background: rgba(37,211,102,0.1) !important; }
.wwt-floating-btn.wwt-style-pill { border-radius: 100px !important; padding: 14px 28px !important; font-size: 15px; }
.wwt-floating-btn.wwt-style-shadow3d { border-radius: 16px !important; box-shadow: 0 6px 0 #1a9647, 0 10px 20px rgba(0,0,0,0.18); transform: translateY(0); }
.wwt-floating-btn.wwt-style-shadow3d:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #1a9647, 0 14px 28px rgba(0,0,0,0.22); }
.wwt-floating-btn.wwt-style-glass { background: rgba(37,211,102,0.25) !important; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.2); color: #fff; }
.wwt-floating-btn.wwt-style-glass:hover { background: rgba(37,211,102,0.4) !important; }
.wwt-floating-btn.wwt-style-dark { background: #1c1c1e !important; color: #25D366; border: 1px solid #3a3a3c; }
.wwt-floating-btn.wwt-style-dark svg { fill: #25D366; }
.wwt-floating-btn.wwt-style-dark:hover { background: #2c2c2e !important; border-color: #25D366; box-shadow: 0 8px 24px rgba(37,211,102,0.2); }
.wwt-floating-btn.wwt-style-bounce { animation: wwt-bounceAnim 1.5s ease-in-out infinite; }
@keyframes wwt-bounceAnim { 0%,100%{transform:translateY(0);} 15%{transform:translateY(-8px);} 30%{transform:translateY(0);} 45%{transform:translateY(-5px);} 60%{transform:translateY(0);} }
.wwt-floating-btn.wwt-style-bounce:hover { animation: none; transform: translateY(-4px) scale(1.02); }


/* ============================================================
   PREMIUM AGENT POPUP
   ============================================================ */
.wwt-popup-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55); z-index: 9999998;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; animation: wwt-overlayIn 0.25s ease;
}
@keyframes wwt-overlayIn { from { opacity: 0; } to { opacity: 1; } }

.wwt-popup-card {
    background: #ffffff; border-radius: 20px;
    width: 100%; max-width: 400px; max-height: 85vh;
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    animation: wwt-cardIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
@keyframes wwt-cardIn { from { opacity: 0; transform: scale(0.92) translateY(30px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.wwt-popup-header {
    background: linear-gradient(135deg, #075e54, #128C7E);
    padding: 24px 24px 20px; text-align: center; color: #fff;
    position: relative;
}
.wwt-popup-header-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(255,255,255,0.18); margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.wwt-popup-header h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.2px; }
.wwt-popup-header p { margin: 4px 0 0; font-size: 12px; opacity: 0.75; font-weight: 400; }
.wwt-popup-close {
    position: absolute; top: 12px; right: 16px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.15); border: none; color: #fff;
    font-size: 18px; cursor: pointer; display: flex; align-items: center;
    justify-content: center; transition: all 0.2s ease;
}
.wwt-popup-close:hover { background: rgba(255,255,255,0.3); transform: rotate(90deg); }

.wwt-popup-body {
    padding: 16px; overflow-y: auto; flex: 1; background: #f9fafb;
}
.wwt-popup-body::-webkit-scrollbar { width: 4px; }
.wwt-popup-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }

.wwt-agent-card-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; margin-bottom: 8px;
    background: #fff; border-radius: 14px;
    text-decoration: none; color: #1d1d1f;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease; cursor: pointer;
}
.wwt-agent-card-item:hover {
    border-color: #25D366; box-shadow: 0 4px 16px rgba(37,211,102,0.1);
    transform: translateY(-1px);
}
.wwt-agent-card-avatar {
    width: 48px; height: 48px; border-radius: 14px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff; display: flex; align-items: center;
    justify-content: center; font-weight: 700; font-size: 18px;
    flex-shrink: 0; box-shadow: 0 4px 12px rgba(37,211,102,0.2);
}
.wwt-agent-card-info { flex: 1; min-width: 0; }
.wwt-agent-card-name { font-weight: 600; font-size: 15px; letter-spacing: -0.2px; }
.wwt-agent-card-dept { font-size: 12px; color: #8e8e93; margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.wwt-agent-card-dept::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #34c759; }
.wwt-agent-card-arrow { color: #c7c7cc; font-size: 18px; transition: all 0.2s ease; }
.wwt-agent-card-item:hover .wwt-agent-card-arrow { color: #25D366; transform: translateX(3px); }

.wwt-popup-footer {
    padding: 12px 16px; text-align: center; font-size: 11px;
    color: #aeaeb2; border-top: 1px solid #f0f0f0; background: #fff;
}

@media (prefers-color-scheme: dark) {
    .wwt-popup-card { background: #1c1c1e; }
    .wwt-popup-body { background: #121214; }
    .wwt-agent-card-item { background: #2c2c2e; border-color: #3a3a3c; color: #f5f5f7; }
    .wwt-agent-card-item:hover { border-color: #25D366; background: #3a3a3c; }
    .wwt-popup-footer { background: #1c1c1e; border-color: #2c2c2e; color: #636366; }
}

@media (max-width: 768px) {
    .wwt-popup-card { max-width: 100%; border-radius: 16px 16px 0 0; margin-top: auto; max-height: 90vh; }
    .wwt-popup-overlay { align-items: flex-end; }
}


/* Section titles */
.wwt-section-title { font-size: 12px; font-weight: 700; color: #6e6e73; text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 0 4px; }
/* Selected agent card */
.wwt-selectable { cursor: pointer; transition: all 0.15s ease; }
.wwt-selectable.selected { border-color: #25D366 !important; background: #f0fdf4 !important; box-shadow: 0 0 0 2px rgba(37,211,102,0.2) !important; }
.wwt-selectable.selected .wwt-agent-card-arrow { color: #25D366; }
/* Continue button */
.wwt-continue-btn { width: 100%; padding: 12px; margin-top: 16px; background: #25D366; color: #fff; border: none; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.wwt-continue-btn:hover:not(:disabled) { background: #1da851; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,211,102,0.3); }
.wwt-continue-btn:disabled { background: #d1d5db; color: #9ca3af; cursor: not-allowed; }
/* Error message */
.wwt-error-msg { color: #ff3b30; font-size: 11px; text-align: center; padding: 6px 0 0; font-weight: 500; }
/* Quick reply - more visible */
.wwt-quick-reply { padding: 8px 16px; font-size: 12px; }
.wwt-quick-reply.active { background: #25D366; color: #fff; border-color: #25D366; box-shadow: 0 2px 8px rgba(37,211,102,0.3); }
/* Off hours fix */
.wwt-offhours { text-align: center; padding: 10px; color: #ff9500; font-size: 12px; font-weight: 500; background: rgba(255,149,0,0.06); border-radius: 10px; margin: 4px 0; }


.wwt-quick-reply.active { background: #25D366; color: #fff; box-shadow: 0 2px 8px rgba(37,211,102,0.3); }
.wwt-step-title { font-size: 13px; font-weight: 600; color: #1d1d1f; margin-bottom: 8px; }
.wwt-preview-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 12px; font-size: 12px; color: #166534; margin: 8px 0; line-height: 1.5; }
.wwt-back-btn { background: none; border: none; color: #25D366; font-size: 12px; cursor: pointer; padding: 4px 0; font-weight: 600; font-family: inherit; }
.wwt-back-btn:hover { text-decoration: underline; }


/* Quick Reply Buttons */
.wwt-quick-replies { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0; }
.wwt-quick-reply { padding: 10px 18px; font-size: 13px; font-weight: 600; background: #f0fdf4; color: #166534; border: 2px solid #bbf7d0; border-radius: 10px; cursor: pointer; transition: all 0.2s ease; font-family: inherit; white-space: nowrap; }
.wwt-quick-reply:hover { background: #25D366; color: #fff; border-color: #25D366; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,211,102,0.25); }
.wwt-quick-reply.active { background: #25D366; color: #fff; border-color: #25D366; box-shadow: 0 2px 8px rgba(37,211,102,0.3); }

/* Callback Form */
.wwt-callback-row { display: flex; gap: 6px; padding: 10px 0; }
.wwt-callback-row input { flex: 1; padding: 8px 12px; border: 1px solid #e5e5ea; border-radius: 8px; font-size: 13px; outline: none; font-family: inherit; }
.wwt-callback-row input:focus { border-color: #25D366; }
.wwt-callback-row button { padding: 8px 16px; background: #25D366; color: #fff; border: none; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit; }
.wwt-callback-msg { font-size: 12px; color: #34c759; padding: 4px 0; display: none; }

/* Off-hours message */
.wwt-offhours { text-align: center; padding: 16px; color: #ff9500; font-size: 12px; font-weight: 500; background: rgba(255,149,0,0.06); border-radius: 10px; margin: 4px 0; display: none; }


/* Notification Bubble */
.wwt-notification-bubble {
    position: absolute; top: -8px; right: -8px;
    background: #ff3b30; color: #fff;
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 10px; font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(255,59,48,0.4);
    animation: wwt-bubblePulse 2s ease-in-out infinite; z-index: 10;
}
@keyframes wwt-bubblePulse { 0%,100%{transform:scale(1);} 50%{transform:scale(1.15);} }
