/* King Magic — Reviews Popup */
*, *::before, *::after { box-sizing: border-box; }

#kmp-popup {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 310px;
    background-color: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.16);
    overflow: hidden;
    z-index: 99999;
    direction: rtl;
    display: none;
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    transition: opacity .4s cubic-bezier(.34,1.56,.64,1), transform .4s cubic-bezier(.34,1.56,.64,1);
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#kmp-popup.kmp-on {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

#kmp-bar {
    background: var(--tb, #1a1a1a);
    padding: 7px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

#kmp-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--tt, #c8a431);
    letter-spacing: .4px;
    flex: 1;
    text-align: right;
}

#kmp-x {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    margin-right: 8px;
    line-height: 1;
}

#kmp-x:hover { background: rgba(255,255,255,.3); }

#kmp-body {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    width: 100%;
    overflow: hidden;
}

#kmp-av { flex-shrink: 0; width: 42px; height: 42px; }
#kmp-av img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--st, #c8a431); display: block; }
#kmp-av span { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600; color: #fff; border: 2px solid var(--st, #c8a431); }

#kmp-cnt { flex: 1; min-width: 0; overflow: hidden; }

#kmp-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 3px; }
#kmp-name { font-size: 13px; font-weight: 700; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
#kmp-rating { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
#kmp-stars { line-height: 1; white-space: nowrap; }
#kmp-glink { font-size: 11px; font-weight: 600; color: #c8a431; text-decoration: none; white-space: nowrap; }
#kmp-glink:hover { text-decoration: underline; }

#kmp-text {
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.5;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

#kmp-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #f0ebe0; padding-top: 5px; }
#kmp-ago { font-size: 10px; color: #999; }

@media (max-width: 768px) {
    #kmp-popup {
        border-radius: 12px;
        max-height: 110px;
        overflow: hidden;
    }
    #kmp-bar { padding: 5px 10px; }
    #kmp-badge { font-size: 10px; }
    #kmp-body { padding: 7px 10px; gap: 8px; align-items: center; max-height: 75px; overflow: hidden; }
    #kmp-av, #kmp-av img, #kmp-av span { width: 34px; height: 34px; font-size: 14px; }
    #kmp-text { -webkit-line-clamp: 1; margin-bottom: 0; }
    #kmp-foot { display: none; }
}
