﻿/* Redi Multi Admin â€” Frontend WA Button */

/* Wrapper â€” Fixed positioning */
.redi-ma-wrapper {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Positions */
.redi-ma-bottom-right { bottom: 24px; right: 24px; }
.redi-ma-bottom-left  { bottom: 24px; left: 24px;  }
.redi-ma-right        { top: 50%; right: 0; transform: translateY(-50%); }
.redi-ma-left         { top: 50%; left: 0;  transform: translateY(-50%); }

/* Button â€” ramping & modern */
.redi-ma-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 50px;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    cursor: pointer;
    white-space: nowrap;
    border: 1.5px solid rgba(255,255,255,0.25);
    line-height: 1.3;
    position: relative;
}
.redi-ma-btn::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    background: #ff3b30;
    border: 2px solid #fff;
    border-radius: 50%;
    animation: redi-badge-pulse 2s infinite;
}
@keyframes redi-badge-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.3); }
}
.redi-ma-btn:hover,
.redi-ma-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(37, 211, 102, 0.4);
    color: #fff !important;
    text-decoration: none !important;
}

/* Bounce-in entrance animation */
.redi-ma-bounce-in {
    animation: redi-bounce-in 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
@keyframes redi-bounce-in {
    0%   { transform: scale(0) translateY(40px); opacity: 0; }
    60%  { transform: scale(1.08) translateY(-3px); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Icon */
.redi-ma-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.redi-ma-icon img {
    display: block;
    width: 20px;
    height: 20px;
}

/* Text */
.redi-ma-text {
    line-height: 1;
}

/* Pulse animation â€” dimmed, for background attention */
.redi-ma-pulse {
    animation: redi-pulse 3s infinite;
}
@keyframes redi-pulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35); }
    50%      { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35), 0 0 0 12px rgba(37, 211, 102, 0.08), 0 0 0 24px rgba(37, 211, 102, 0.04); }
}

/* Multi-admin popup â€” Modern card design */
.redi-ma-popup {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: redi-popup-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}
.redi-ma-left .redi-ma-popup,
.redi-ma-bottom-left .redi-ma-popup {
    right: auto;
    left: 0;
}
@keyframes redi-popup-in {
    from { opacity: 0; transform: translateY(16px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.redi-ma-popup-header {
    background: #075e54;
    color: #fff;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}
/* WhatsApp-style background */
.redi-ma-popup-list {
    flex: 1;
    max-height: 340px;
    overflow-y: auto;
    padding: 6px 0;
    scroll-behavior: smooth;
    background-color: #eae6df;
    background-image: url('../../assets/img/background-wa.jpg');
    background-repeat: repeat;
    background-size: auto;
}
.redi-ma-popup-list::-webkit-scrollbar { width: 4px; }
.redi-ma-popup-list::-webkit-scrollbar-thumb { background: #bbb; border-radius: 4px; }

.redi-ma-popup-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 8px;
    padding: 12px 18px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.redi-ma-popup-item:hover {
    background: rgba(255,255,255,0.7);
}
.redi-ma-popup-item:active {
    background: rgba(255,255,255,0.9);
}
.redi-ma-popup-item:last-child { border-bottom: none; }

/* Photo admin di popup */
.redi-ma-popup-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}
.redi-ma-popup-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Online dot â€” sejajar dengan nama */
.redi-ma-online-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #25D366;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 4px;
    box-shadow: 0 0 0 2px rgba(37,211,102,0.2);
}

/* Info */
.redi-ma-popup-info {
    flex: 1;
    min-width: 0;
}
.popup-name {
    font-weight: 600;
    font-size: 14px;
    color: #303030;
    line-height: 1.4;
}
.popup-jobdesk {
    font-size: 11px;
    color: #667781;
    margin-top: 1px;
    margin-left: 0;
}

/* Footer â€” fixed di bawah, tidak ikut scroll */
.redi-ma-popup-footer {
    padding: 6px 18px;
    background: #f0f2f5;
    border-top: 1px solid #e9edef;
    font-size: 10px;
    color: #8696a0;
    text-align: left;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .redi-ma-btn {
        padding: 9px 16px;
        font-size: 12px;
        gap: 6px;
    }
    .redi-ma-btn::after {
        width: 9px;
        height: 9px;
        top: -2px;
        right: -2px;
    }
    .redi-ma-bottom-right { bottom: 14px; right: 14px; }
    .redi-ma-bottom-left  { bottom: 14px; left: 14px; }
    .redi-ma-icon img { width: 18px; height: 18px; }

    .redi-ma-popup {
        width: 290px;
        bottom: 70px;
        border-radius: 14px;
    }
    .redi-ma-popup-header { padding: 12px 14px; font-size: 13px; }
    .redi-ma-popup-item { padding: 10px 14px; }
    .popup-name { font-size: 13px; }
    .redi-ma-popup-footer { padding: 5px 14px; font-size: 9px; }
}


/* Popup description */
.redi-ma-popup-desc {
    padding: 8px 18px;
    background: #f0f2f5;
    color: #667781;
    font-size: 12px;
    border-bottom: 1px solid #e9edef;
}

/* Status online â€” inline kecil di samping nama */
.popup-status {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 4px;
    font-size: 10px;
    color: #667781;
    font-weight: 400;
    vertical-align: middle;
}
.popup-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #25D366;
    flex-shrink: 0;
}

/* Status online — dot hijau, teks abu-abu */
.popup-status {
    font-size: 10px;
    color: #8696a0;
    font-weight: 400;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.popup-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #25D366;
    flex-shrink: 0;
}

/* Compact spacing */
.popup-name {
    font-weight: 600;
    font-size: 13px;
    color: #303030;
    line-height: 1.2;
}
.popup-jobdesk {
    font-size: 11px;
    color: #667781;
    margin-top: 1px;
    margin-left: 0;
    line-height: 1.2;
}
.redi-ma-popup-item {
    padding: 8px 16px;
}
.redi-ma-popup-info {
    line-height: 1.2;
}




.popup-status-dot.offline {
    background: #e74c3c;
}
