/* ── Webxcell WhatsApp Widget ──────────────────────────────────────────────── */

#wxcl-wa-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9990;
    font-family: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Floating button ──────────────────────────────────────────────────────── */
.wxcl-wa-float {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
    color: #fff;
}
.wxcl-wa-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.65);
}
.wxcl-wa-icon { width: 28px; height: 28px; }

/* Pulse ring */
.wxcl-wa-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.5);
    animation: wa-pulse 2s ease-out infinite;
}
@keyframes wa-pulse {
    0%   { transform: scale(1);    opacity: 0.8; }
    100% { transform: scale(1.55); opacity: 0; }
}

/* ── Pre-chat panel ──────────────────────────────────────────────────────── */
.wxcl-wa-panel {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 48px);
    background: #0C0F1E;
    border: 1px solid #1E2A3A;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(37,211,102,0.12);
    overflow: hidden;
    transform-origin: bottom right;
    transform: scale(0.92) translateY(10px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.2s ease;
    pointer-events: none;
}
.wxcl-wa-panel--open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}
.wxcl-wa-panel[hidden] { display: none; }

/* Header */
.wxcl-wa-header {
    background: #25D366;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.wxcl-wa-header-info { display: flex; align-items: center; gap: 12px; }

.wxcl-wa-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.wxcl-wa-team-name { color: #fff; font-weight: 700; font-size: 0.95rem; }
.wxcl-wa-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.85);
    font-size: 0.78rem;
}
.wxcl-wa-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    animation: wa-blink 2s infinite;
}
@keyframes wa-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.wxcl-wa-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.85);
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}
.wxcl-wa-close:hover { color: #fff; }

/* Body */
.wxcl-wa-body { padding: 20px; }
.wxcl-wa-intro {
    color: #B0C4DE;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0 0 16px;
}

.wxcl-wa-form { display: flex; flex-direction: column; gap: 10px; }
.wxcl-wa-field { display: flex; flex-direction: column; }

.wxcl-wa-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid #1E2A3A;
    border-radius: 8px;
    padding: 12px 14px;
    color: #fff;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.wxcl-wa-input::placeholder { color: #4A6180; }
.wxcl-wa-input:focus {
    outline: none;
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}
.wxcl-wa-select { -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234A6180' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    cursor: pointer;
}
.wxcl-wa-textarea { resize: vertical; min-height: 72px; }

.wxcl-wa-message {
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 6px;
}
.wxcl-wa-message--success { background: rgba(37,211,102,0.1); color: #25D366; border: 1px solid rgba(37,211,102,0.3); }
.wxcl-wa-message--error   { background: rgba(255,80,80,0.1);  color: #FF8080; border: 1px solid rgba(255,80,80,0.3); }

.wxcl-wa-submit {
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, transform 0.15s;
    margin-top: 4px;
}
.wxcl-wa-submit:hover   { background: #20ba58; transform: translateY(-1px); }
.wxcl-wa-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Footer */
.wxcl-wa-footer {
    padding: 10px 20px;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid #1E2A3A;
    font-size: 0.72rem;
    color: #4A6180;
    text-align: center;
}

/* Responsive */
@media (max-width: 420px) {
    #wxcl-wa-widget { bottom: 16px; right: 16px; }
    .wxcl-wa-panel { right: -4px; width: calc(100vw - 24px); }
}
