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

#grwp2 {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 310px;
    background: #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;
}

#grwp2.grwp2-on {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: all !important;
}

#grwp2-bar {
    background: var(--tb, #c41e3a);
    padding: 7px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}

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

#grwp2-x {
    background: rgba(255,255,255,.2);
    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;
}

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

#grwp2-av {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
}

#grwp2-av img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--st, #c8a431);
    display: block;
}

#grwp2-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);
}

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

#grwp2-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 3px;
    width: 100%;
}

#grwp2-name {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

#grwp2-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

#grwp2-stars { line-height: 1; white-space: nowrap; }

#grwp2-glink {
    font-size: 11px;
    font-weight: 600;
    color: #4285F4;
    text-decoration: none;
    white-space: nowrap;
}

#grwp2-glink:hover { text-decoration: underline; }

#grwp2-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;
}

#grwp2-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f0ebe0;
    padding-top: 5px;
}

#grwp2-ago { font-size: 10px; color: #999; }

#grwp2-logo {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: #555;
    font-weight: 500;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    #grwp2 {
        border-radius: 12px;
        max-height: 150px;
        overflow: hidden;
    }

    #grwp2-bar {
        padding: 5px 10px;
    }

    #grwp2-badge { font-size: 10px; }

    #grwp2-body {
        padding: 7px 10px;
        gap: 8px;
        align-items: center;
        overflow: hidden;
    }

    #grwp2-av,
    #grwp2-av img,
    #grwp2-av span {
        width: 34px;
        height: 34px;
        font-size: 14px;
        flex-shrink: 0;
    }

    #grwp2-name  { font-size: 11px; }
    #grwp2-text  { font-size: 11px; -webkit-line-clamp: 1; margin-bottom: 0; }
    #grwp2-foot  { display: none; }
    #grwp2-stars span { font-size: 11px !important; }
}
