/**
 * AB Whatsapp - Stylesheet v1.4.3 (Strict SVG Lock & Status Badges)
 */

/* Universal SVG Size Lock */
#ab-wa-wrapper svg.ab-wa-svg,
.ab-wa-inline-btn svg.ab-wa-svg,
svg.ab-wa-svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    fill: currentColor !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

#ab-wa-wrapper *,
.ab-wa-inline-btn * {
    box-sizing: border-box !important;
}

/* Floating Bar Positions */
.ab-wa-bottom-bar {
    position: fixed;
    bottom: 25px;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.ab-wa-bottom-bar.ab-pos-right { right: 25px; left: auto; flex-direction: row; }
.ab-wa-bottom-bar.ab-pos-left { left: 25px; right: auto; flex-direction: row-reverse; }
.ab-wa-bottom-bar.ab-pos-center { left: 50%; transform: translateX(-50%); right: auto; flex-direction: row; }

/* Floating Button UI */
.ab-wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 50px;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
}

.ab-wa-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    color: #ffffff !important;
}

.ab-btn-wa { background: linear-gradient(135deg, #25D366 0%, #128C7E 100%); }
.ab-btn-phone { background: linear-gradient(135deg, #0078FF 0%, #0044B3 100%); }

.ab-pulse { animation: abWaPulse 2s infinite; }

@keyframes abWaPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Shortcode & HTML Button */
.ab-wa-inline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    margin: 6px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.25s ease;
    cursor: pointer;
}

.ab-wa-inline-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    color: #ffffff !important;
}

/* Modal Popup Multi-Agent UI */
.ab-wa-modal {
    position: fixed;
    bottom: 90px;
    width: 330px;
    max-width: calc(100vw - 40px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    z-index: 1000000;
    animation: abWaSlideUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ab-pos-right .ab-wa-modal { right: 25px; left: auto; }
.ab-pos-left .ab-wa-modal { left: 25px; right: auto; }
.ab-pos-center .ab-wa-modal { left: 50%; transform: translateX(-50%); }

@keyframes abWaSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ab-wa-modal-header {
    background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
    color: #ffffff;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ab-wa-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ab-wa-header-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ab-wa-modal-header h4 { margin: 0; font-size: 15px; font-weight: 700; color: #ffffff; }
.ab-wa-modal-header p { margin: 2px 0 0 0; font-size: 11px; color: rgba(255, 255, 255, 0.85); }
.ab-wa-close { font-size: 24px; cursor: pointer; color: #ffffff; opacity: 0.8; }
.ab-wa-close:hover { opacity: 1; }

.ab-wa-agent-list {
    padding: 12px;
    max-height: 300px;
    overflow-y: auto;
    background: #f8f9fa;
}

.ab-wa-agent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 8px;
    text-decoration: none !important;
    color: #333333 !important;
    border: 1px solid #eaeaea;
    transition: all 0.2s ease;
}

.ab-wa-agent-item:hover {
    border-color: #25D366;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
    transform: translateX(3px);
}

.ab-wa-agent-avatar-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.ab-wa-agent-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ab-wa-svg-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
}

/* Status Online / Offline Badge UI */
.ab-wa-status-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.ab-wa-status-badge.ab-wa-online { background-color: #4CAF50; }
.ab-wa-status-badge.ab-wa-offline { background-color: #9E9E9E; }

.ab-wa-agent-item.is-offline {
    opacity: 0.75;
    background: #fdfdfd;
}

.ab-wa-agent-item.is-offline:hover {
    border-color: #ccc;
    box-shadow: none;
    transform: none;
}

.ab-wa-agent-info { flex: 1; min-width: 0; }
.ab-wa-agent-info strong { display: block; font-size: 13px; color: #222222; }
.ab-wa-agent-info span { display: block; font-size: 11px; color: #777777; }
.ab-wa-agent-icon-right { color: #25D366; display: flex; align-items: center; justify-content: center; }

.ab-wa-modal-footer { padding: 8px 16px; background: #eeeeee; text-align: center; font-size: 10px; color: #666666; }

@media screen and (max-width: 576px) {
    .ab-wa-bottom-bar { bottom: 15px; }
    .ab-wa-btn { padding: 10px 18px; font-size: 13px; }
    .ab-wa-modal { bottom: 75px; width: calc(100vw - 30px); }
}