/* Google Review Badge */

.grb-wrap {
    position: fixed;
    z-index: 99999;
    display: flex;
    flex-direction: column;
}

/* Hide on mobile: portrait OR landscape phones (touch + max 1024px) */
@media (max-width: 1024px) and (pointer: coarse) {
    .grb-hide-mobile { display: none !important; }
}

/* ── BADGE ── */
.grb-badge-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.09);
    border-radius: 14px;
    padding: 10px 14px 10px 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.13), 0 1px 4px rgba(0,0,0,.07);
    cursor: pointer;
    min-width: 168px;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: grb-in .45s cubic-bezier(.34,1.56,.64,1) both;
    transition: transform .2s, box-shadow .2s;
}
.grb-badge-btn:hover,
.grb-badge-btn.grb-active {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,.16);
}
@keyframes grb-in {
    from { opacity:0; transform:scale(.88); }
    to   { opacity:1; transform:scale(1); }
}

.grb-logo { flex-shrink:0; display:flex; align-items:center; }

.grb-badge-content { display:flex; flex-direction:column; gap:1px; line-height:1; }

.grb-badge-label {
    font-size: 10px; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase;
    color: #5f6368;
}
.grb-badge-row { display:flex; align-items:center; gap:5px; margin-top:2px; }
.grb-badge-score { font-size:18px; font-weight:700; color:#202124; line-height:1; }
.grb-badge-count { font-size:10px; color:#80868b; margin-top:2px; }

/* ── STARS ── */
.grb-stars { display:flex; align-items:center; line-height:1; }
.grb-stars-sm { font-size:13px; }

.grb-star        { color:#e0e0e0; }
.grb-star-full   { color:#fbbc04; }
.grb-star-partial {
    position:relative; color:#e0e0e0;
}
.grb-star-partial::after {
    content:'★'; position:absolute; left:0; top:0;
    color:#fbbc04; width:var(--f,50%); overflow:hidden; display:inline-block; white-space:nowrap;
}

/* ── PANEL ── */
.grb-panel {
    display: none;
    position: absolute;
    width: 300px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.10);
    border: 1px solid rgba(0,0,0,.08);
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px) scale(.97);
    transition: opacity .22s ease, transform .22s cubic-bezier(.34,1.3,.64,1);
    z-index: 1;
}
.grb-panel.grb-open {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* position relative to badge */
.grb-panel-up   { bottom: calc(100% + 8px); }
.grb-panel-down { top:    calc(100% + 8px); }
.grb-panel-left  { left: 0; }
.grb-panel-right { right: 0; }

/* panel header */
.grb-panel-head {
    display:flex; align-items:center; justify-content:space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
}
.grb-panel-head-left { display:flex; align-items:center; gap:10px; }
.grb-panel-title { font-size:13px; font-weight:700; color:#202124; line-height:1; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; }
.grb-panel-meta {
    display:flex; align-items:center; gap:4px; margin-top:3px;
    font-size:13px; color:#202124; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
}
.grb-panel-total { color:#80868b; font-size:12px; }
.grb-panel-close {
    background:none; border:none; cursor:pointer;
    font-size:14px; color:#80868b; padding:4px 6px; border-radius:6px;
    transition:background .15s;
}
.grb-panel-close:hover { background:#f1f3f4; color:#202124; }

/* reviews scroll */
.grb-panel-reviews {
    max-height: 320px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.grb-panel-reviews::-webkit-scrollbar { width:4px; }
.grb-panel-reviews::-webkit-scrollbar-thumb { background:#ddd; border-radius:4px; }

.grb-review {
    padding: 12px 14px;
    border-bottom: 1px solid #f5f5f5;
    font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
}
.grb-review:last-child { border-bottom:none; }

.grb-review-top { display:flex; align-items:center; gap:10px; margin-bottom:6px; }

.grb-avatar {
    width:36px; height:36px; border-radius:50%; object-fit:cover; flex-shrink:0;
}
.grb-avatar-fb {
    width:36px; height:36px; border-radius:50%; background:#4285f4; color:#fff;
    display:flex; align-items:center; justify-content:center;
    font-size:15px; font-weight:700; flex-shrink:0;
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
}
.grb-review-meta { display:flex; flex-direction:column; gap:2px; }
.grb-rname {
    font-size:13px; font-weight:600; color:#202124 !important;
    text-decoration:none !important; line-height:1;
}
.grb-rname:hover { text-decoration:underline !important; }
.grb-rtime { font-size:11px; color:#80868b; }
.grb-review-stars { margin-bottom:5px; }
.grb-review-text {
    font-size:12px; color:#3c4043; line-height:1.55; margin:0;
    display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden;
}

/* CTA */
.grb-panel-footer { padding:12px 14px; border-top:1px solid #f0f0f0; }
.grb-cta-btn {
    display:block; width:100%; text-align:center;
    background:#4285f4; color:#fff !important;
    font-size:13px; font-weight:600; text-decoration:none !important;
    padding:10px; border-radius:8px; box-sizing:border-box;
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    transition:background .15s;
}
.grb-cta-btn:hover { background:#1a5fc8; }

@media (max-width:400px) {
    .grb-panel { width: calc(100vw - 30px); }
}
