/* WP WhatsApp Tracker - Popup Styles (WhatsApp-style, Apple-polished) */

.wwt-popup-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999998;
    display: flex; align-items: flex-end; justify-content: flex-end;
    padding: 20px;
    animation: wwt-fade-in 0.2s ease;
}
.wwt-popup-overlay.wwt-popup-left { justify-content: flex-start; }
@keyframes wwt-fade-in { from { opacity: 0; } to { opacity: 1; } }

.wwt-popup-card {
    background: #ffffff; color: #1d1d1f;
    width: 100%; max-width: 360px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: wwt-popup-in 0.28s cubic-bezier(0.34, 1.3, 0.64, 1);
    transform-origin: bottom right;
}
.wwt-popup-left .wwt-popup-card { transform-origin: bottom left; }
@keyframes wwt-popup-in {
    from { opacity: 0; transform: translateY(24px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.wwt-popup-header {
    background: #25D366; color: #ffffff;
    padding: 16px 20px;
    display: flex; align-items: center; gap: 12px;
}
.wwt-popup-header-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: #ffffff; color: #25D366;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; flex-shrink: 0;
}
.wwt-popup-header-text { flex: 1; min-width: 0; }
.wwt-popup-header-title { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wwt-popup-header-status { font-size: 12px; opacity: 0.92; display: flex; align-items: center; gap: 4px; margin-top: 1px; }
.wwt-popup-close {
    background: none; border: none; color: #ffffff; cursor: pointer;
    font-size: 20px; line-height: 1; padding: 4px; opacity: 0.85;
    flex-shrink: 0;
}
.wwt-popup-close:hover { opacity: 1; }

.wwt-popup-body { padding: 20px; }
.wwt-popup-greeting {
    background: #f0f0f2; color: #1d1d1f;
    padding: 12px 16px; border-radius: 12px;
    font-size: 14px; line-height: 1.5;
    margin-bottom: 16px;
}

.wwt-popup-footer { padding: 0 20px 20px; }
.wwt-popup-cta {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px;
    background: #25D366; color: #ffffff;
    border: none; border-radius: 12px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}
.wwt-popup-cta:hover { background: #1da851; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35); }
.wwt-popup-cta svg { width: 20px; height: 20px; fill: #ffffff; flex-shrink: 0; }

.wwt-popup-section-title { font-size: 13px; font-weight: 700; color: #1d1d1f; margin: 16px 0 8px; }
.wwt-popup-agents { display: flex; flex-direction: column; gap: 8px; }
.wwt-popup-agent { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #f5f5f7; border: 2px solid transparent; border-radius: 12px; cursor: pointer; transition: all 0.15s ease; }
.wwt-popup-agent:hover { background: #f0f0f2; }
.wwt-popup-agent.selected { border-color: #25D366; background: #f0fdf4; }
.wwt-popup-agent-avatar { width: 36px; height: 36px; border-radius: 50%; background: #d2d2d7; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #1d1d1f; flex-shrink: 0; overflow: hidden; }
.wwt-popup-agent-info { flex: 1; min-width: 0; }
.wwt-popup-agent-name { font-size: 14px; font-weight: 700; color: #1d1d1f; }
.wwt-popup-agent-dept { font-size: 12px; color: #6e6e73; }
.wwt-popup-agent-arrow { color: #25D366; font-size: 16px; flex-shrink: 0; }

.wwt-popup-quick-replies { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.wwt-popup-quick-reply { padding: 8px 16px; 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-popup-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-popup-quick-reply.active { background: #25D366; color: #fff; border-color: #25D366; box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3); }
