/* public/css/whatsapp-widget.css */

/* ── Container ── */
.wa-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Floating button ── */
.wa-fab {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.wa-fab-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.wa-fab-circle svg {
    width: 28px;
    height: 28px;
}

.wa-fab:hover .wa-fab-circle {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.5);
}

.wa-bubble-label {
    background: #fff;
    color: #333;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    white-space: nowrap;
    animation: wa-bubble-in 0.4s ease both;
}

.wa-bubble-label strong {
    color: #25D366;
}

/* ── Popup ── */
.wa-popup {
    width: 320px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    animation: wa-popup-in 0.25s ease both;
    transform-origin: bottom right;
}

.wa-popup[hidden] {
    display: none;
}

.wa-popup-header {
    background: #25D366;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    position: relative;
}

.wa-popup-header svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.wa-popup-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.3;
}

.wa-popup-subtitle {
    color: rgba(255,255,255,0.88);
    font-size: 11px;
    margin: 0;
    line-height: 1.4;
}

.wa-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.wa-close:hover {
    color: #fff;
}

.wa-reply-time {
    font-size: 11px;
    color: #888;
    padding: 10px 16px;
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
}

/* ── Agents list ── */
.wa-agents {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wa-agent {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}

.wa-agent:last-child {
    border-bottom: none;
}

.wa-agent:hover {
    background: #f7f7f7;
}

.wa-agent-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wa-agent-avatar svg {
    width: 22px;
    height: 22px;
}

.wa-agent-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wa-agent-name {
    font-size: 14px;
    color: #222;
    font-weight: 500;
}

.wa-agent-lang {
    font-size: 12px;
    color: #888;
}

.wa-agent-arrow {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* ── Animations ── */
@keyframes wa-popup-in {
    from { opacity: 0; transform: scale(0.9) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes wa-bubble-in {
    from { opacity: 0; transform: translateX(8px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Mobile ── */
@media (max-width: 539px) {
    .wa-widget {
        bottom: 132px;
        right: 16px;
    }
    .wa-popup {
        width: calc(100vw - 32px);
    }
    .wa-bubble-label {
        display: none;
    }
}

@media (min-width: 540px) {
        .wa-widget {
            bottom: 150px;
            right: 16px;
        }

}

@media (min-width: 768px) {
    .wa-widget {
        bottom: 171px;
    }
}

@media (min-width: 1024px) {
    .wa-widget {
        bottom: 132px;
    }
}

@media (min-width: 1280px) {
    .wa-widget {

    }
}
