/* ============================================================
   Spicy Reviews Manager for Google Business Profile – v1.2.3
   Pixel-perfect match to reference screenshot
   ============================================================ */

/* ══════════════════════════════════════
   HARD RESET — defeat all theme inheritance
══════════════════════════════════════ */
.sgr-outer,
.sgr-outer *,
.sgr-outer *::before,
.sgr-outer *::after {
    box-sizing:     border-box !important;
    margin:         0 !important;
    padding:        0 !important;
    font-size:      unset !important;
    line-height:    unset !important;
    font-weight:    unset !important;
    letter-spacing: unset !important;
    text-transform: unset !important;
    word-spacing:   unset !important;
    font-style:     normal !important;
    border:         none !important;
    background:     none !important;
    list-style:     none !important;
    text-decoration:none !important;
}

/* ══════════════════════════════════════
   ROOT
══════════════════════════════════════ */
.sgr-outer {
    --sgr-ff-display:   'Syne', sans-serif;
    --sgr-ff-body:      'DM Sans', sans-serif;
    --sgr-gold:         #E8A000;
    --sgr-gold-dim:     #3d3000;   /* empty star on dark */
    --sgr-ease:         0.2s ease;

    font-family:    var(--sgr-ff-body) !important;
    font-size:      15px !important;
    line-height:    1.5 !important;
    font-weight:    400 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    width:          100% !important;
    max-width:      540px !important;
}

/* ══════════════════════════════════════
   BANNER
   Line 1: "170 Reviews | 100% Good Reviews"
   Line 2: "CUSTOMERS SAY..."
   Line 3 (optional): description
══════════════════════════════════════ */
.sgr-outer .sgr-banner {
    text-align:  center !important;
    padding:     0 8px 26px !important;
}

.sgr-outer .sgr-banner-meta {
    display:         flex !important;
    align-items:     center !important;
    justify-content: center !important;
    gap:             10px !important;
    margin-bottom:   4px !important;
    flex-wrap:       wrap !important;
}

.sgr-outer .sgr-banner-count,
.sgr-outer .sgr-banner-badge {
    font-family:    var(--sgr-ff-display) !important;
    font-size:      20px !important;
    font-weight:    700 !important;
    line-height:    1.3 !important;
    color:          #ffffff !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.sgr-outer .sgr-banner-pipe {
    font-family:    var(--sgr-ff-display) !important;
    font-size:      20px !important;
    font-weight:    300 !important;
    line-height:    1 !important;
    color:          rgba(255,255,255,.4) !important;
}

.sgr-outer .sgr-banner-title {
    font-family:    var(--sgr-ff-display) !important;
    font-size:      44px !important;
    font-weight:    800 !important;
    line-height:    1.05 !important;
    letter-spacing: -0.01em !important;
    color:          #ffffff !important;
    text-transform: uppercase !important;
    display:        block !important;
    margin-bottom:  0 !important;
}

.sgr-outer .sgr-banner-desc {
    font-family: var(--sgr-ff-body) !important;
    font-size:   15px !important;
    font-weight: 400 !important;
    line-height: 1.65 !important;
    color:       rgba(255,255,255,.65) !important;
    max-width:   420px !important;
    margin:      12px auto 0 !important;
    display:     block !important;
}

/* Light banner overrides */
.sgr-outer.sgr-light-outer .sgr-banner-count,
.sgr-outer.sgr-light-outer .sgr-banner-badge,
.sgr-outer.sgr-light-outer .sgr-banner-title { color: #111 !important; }
.sgr-outer.sgr-light-outer .sgr-banner-pipe  { color: rgba(0,0,0,.3) !important; }
.sgr-outer.sgr-light-outer .sgr-banner-desc  { color: rgba(0,0,0,.5) !important; }

/* ══════════════════════════════════════
   CARD SHELL
══════════════════════════════════════ */
.sgr-outer .sgr-widget {
    border-radius: 20px !important;
    overflow:      hidden !important;
    padding:       28px 24px 24px !important;
    width:         100% !important;
}

/* — DARK THEME — */
.sgr-outer .sgr-theme-dark {
    background: #242424 !important;
    border:     1px solid #303030 !important;
    box-shadow: 0 16px 56px rgba(0,0,0,.65) !important;
    color:      #f2f2f2 !important;

    --sgr-text:          #f2f2f2;
    --sgr-text-sub:      #b4b4b4;
    --sgr-text-muted:    #888;
    --sgr-divider:       rgba(255,255,255,.09);
    --sgr-action-col:    #888;
    --sgr-action-sep:    #444;
    --sgr-hover-bg:      rgba(255,255,255,.05);
    --sgr-exp-bg:        #2d2d2d;
    --sgr-exp-shadow:    0 4px 20px rgba(0,0,0,.4);
    --sgr-avatar-outline:rgba(255,255,255,.2);
    --sgr-gold-empty:    #3a3a3a;
}

/* — LIGHT THEME — */
.sgr-outer .sgr-theme-light {
    background: #fff !important;
    border:     1px solid #e4e4e4 !important;
    box-shadow: 0 6px 28px rgba(0,0,0,.1) !important;
    color:      #1a1a1a !important;

    --sgr-text:          #1a1a1a;
    --sgr-text-sub:      #666;
    --sgr-text-muted:    #aaa;
    --sgr-divider:       rgba(0,0,0,.07);
    --sgr-action-col:    #999;
    --sgr-action-sep:    #ddd;
    --sgr-hover-bg:      rgba(0,0,0,.03);
    --sgr-exp-bg:        #f2f2f2;
    --sgr-exp-shadow:    0 2px 12px rgba(0,0,0,.08);
    --sgr-avatar-outline:rgba(0,0,0,.12);
    --sgr-gold-empty:    #e4e4e4;
}

/* ══════════════════════════════════════
   SCORE ROW  —  4.5  ★★★★½
══════════════════════════════════════ */
.sgr-outer .sgr-score-row {
    display:       flex !important;
    align-items:   center !important;
    gap:           14px !important;
    margin-bottom: 12px !important;
}

.sgr-outer .sgr-big-score {
    font-family:    var(--sgr-ff-display) !important;
    font-size:      56px !important;
    font-weight:    700 !important;
    line-height:    1 !important;
    letter-spacing: -0.04em !important;
    color:          var(--sgr-text) !important;
}

.sgr-outer .sgr-stars-overall {
    display:     flex !important;
    gap:         4px !important;
    align-items: center !important;
    line-height: 1 !important;
}

.sgr-outer .sgr-stars-overall .sgr-star {
    font-size:   34px !important;
    line-height: 1 !important;
    /* Prevent star emoji from getting theme font applied */
    font-family: 'Segoe UI Emoji','Apple Color Emoji','Noto Color Emoji',sans-serif !important;
}

/* ══════════════════════════════════════
   GOOGLE BRAND ROW  —  G  Google Reviews
══════════════════════════════════════ */
.sgr-outer .sgr-brand-row {
    display:       flex !important;
    align-items:   center !important;
    gap:           9px !important;
    margin-bottom: 12px !important;
}

/* The SVG logo itself */
.sgr-outer .sgr-google-logo {
    flex-shrink: 0 !important;
    display:     block !important;
    width:       24px !important;
    height:      24px !important;
}

.sgr-outer .sgr-brand-label {
    font-family:    var(--sgr-ff-display) !important;
    font-size:      16px !important;
    font-weight:    700 !important;
    line-height:    1.2 !important;
    letter-spacing: 0 !important;
    color:          var(--sgr-text) !important;
}

/* ══════════════════════════════════════
   ACTION BAR  — 170 reviews | Submit | View
══════════════════════════════════════ */
.sgr-outer .sgr-action-bar {
    display:       flex !important;
    align-items:   center !important;
    gap:           0 !important;           /* gap handled by padding on items */
    margin-bottom: 22px !important;
    flex-wrap:     nowrap !important;
    padding-bottom:16px !important;
    border-bottom: 1px solid var(--sgr-divider) !important;
    overflow:      hidden !important;
    line-height:   1 !important;           /* uniform baseline for the row */
}

.sgr-outer .sgr-action-item {
    display:         inline-flex !important;
    align-items:     center !important;
    font-family:     var(--sgr-ff-body) !important;
    font-size:       13px !important;
    font-weight:     400 !important;
    line-height:     1 !important;
    color:           var(--sgr-action-col) !important;
    text-decoration: none !important;
    white-space:     nowrap !important;
    padding:         0 10px !important;
    transition:      color var(--sgr-ease) !important;
}
/* Remove left padding from first item so it aligns with card edge */
.sgr-outer .sgr-action-bar .sgr-action-item:first-child {
    padding-left: 0 !important;
}
.sgr-outer .sgr-action-item:hover {
    color:           var(--sgr-text) !important;
    text-decoration: underline !important;
}

.sgr-outer .sgr-action-sep {
    display:     inline-flex !important;
    align-items: center !important;
    font-size:   12px !important;
    line-height: 1 !important;
    color:       var(--sgr-action-sep) !important;
    flex-shrink: 0 !important;
    font-weight: 200 !important;
    opacity:     0.5 !important;
    user-select: none !important;
}

/* ══════════════════════════════════════
   REVIEW TRACKS
══════════════════════════════════════ */
.sgr-outer .sgr-reviews-wrap { overflow: hidden !important; }

.sgr-layout-list  .sgr-reviews-track,
.sgr-layout-slider .sgr-reviews-track {
    display:        flex !important;
    flex-direction: column !important;
    gap:            0 !important;
}

.sgr-layout-grid .sgr-reviews-track {
    display:               grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px,1fr)) !important;
    gap:                   10px !important;
}

.sgr-layout-slider .sgr-reviews-track {
    flex-direction: row !important;
    transition:     transform 0.4s cubic-bezier(0.4,0,0.2,1) !important;
}
.sgr-layout-slider .sgr-card {
    min-width:  100% !important;
    flex-shrink:0 !important;
}

/* ══════════════════════════════════════
   INDIVIDUAL CARD
   — flat/borderless when collapsed
   — rounded darker box when expanded
══════════════════════════════════════ */
.sgr-outer .sgr-card {
    background:    transparent !important;
    border-top:    1px solid var(--sgr-divider) !important;
    border-left:   none !important;
    border-right:  none !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    padding:       16px 4px !important;
    transition:
        background     var(--sgr-ease),
        border-radius  var(--sgr-ease),
        padding        var(--sgr-ease),
        box-shadow     var(--sgr-ease) !important;
}

.sgr-outer .sgr-card:first-child {
    border-top: none !important;
    padding-top: 4px !important;
}

/* Hover on expandable (not yet expanded) */
.sgr-outer .sgr-card-expandable {
    cursor: pointer !important;
}
.sgr-outer .sgr-card-expandable:hover:not(.sgr-expanded) {
    background:    var(--sgr-hover-bg) !important;
    border-radius: 12px !important;
    border-color:  transparent !important;
    padding:       16px 12px !important;
}

/* Expanded — visible rounded box, no hard border */
.sgr-outer .sgr-card.sgr-expanded {
    background:    var(--sgr-exp-bg) !important;
    border:        none !important;
    border-radius: 14px !important;
    padding:       18px 16px !important;
    margin:        6px 0 !important;
    box-shadow:    var(--sgr-exp-shadow) !important;
}
.sgr-outer .sgr-card.sgr-expanded + .sgr-card {
    border-top: none !important;
    padding-top: 16px !important;
}

/* Card row */
.sgr-outer .sgr-card-row {
    display:     flex !important;
    align-items: flex-start !important;
    gap:         16px !important;
}

/* ══════════════════════════════════════
   AVATAR  — perfect circle, 62px
   photo: cover + face-biased crop
   fallback: coloured circle + initial
══════════════════════════════════════ */
.sgr-outer .sgr-avatar-wrap {
    /* Fixed square container that becomes a circle */
    width:        62px !important;
    height:       62px !important;
    min-width:    62px !important;
    max-width:    62px !important;
    flex-shrink:  0 !important;
    align-self:   flex-start !important;

    /* Circle clip */
    border-radius: 50% !important;
    overflow:      hidden !important;

    /* Stack children absolutely */
    position:     relative !important;
    display:      block !important;

    /* Subtle ring outside the clip via outline */
    outline:        2px solid var(--sgr-avatar-outline) !important;
    outline-offset: 2px !important;

    /* Drop shadow */
    box-shadow:   0 2px 10px rgba(0,0,0,.35) !important;
}

/* Photo image */
.sgr-outer .sgr-avatar {
    position:        absolute !important;
    top:             0 !important;
    left:            0 !important;
    width:           100% !important;
    height:          100% !important;
    object-fit:      cover !important;
    object-position: center top !important;  /* bias crop toward face */
    display:         block !important;
    border-radius:   50% !important;         /* double-insure circle */
    font-size:       0 !important;           /* hide broken-img alt text */
}

/* Initial letter fallback */
.sgr-outer .sgr-avatar-initial {
    position:        absolute !important;
    top:             0 !important;
    left:            0 !important;
    width:           100% !important;
    height:          100% !important;
    display:         flex !important;
    align-items:     center !important;
    justify-content: center !important;
    font-family:     var(--sgr-ff-display) !important;
    font-size:       24px !important;
    font-weight:     700 !important;
    line-height:     1 !important;
    color:           #fff !important;
    text-transform:  uppercase !important;
    letter-spacing:  0 !important;
    text-shadow:     0 1px 6px rgba(0,0,0,.4) !important;
}

/* ══════════════════════════════════════
   CARD BODY
══════════════════════════════════════ */
.sgr-outer .sgr-card-body {
    flex:      1 !important;
    min-width: 0 !important;
}

/* Headline: name LEFT · stars RIGHT */
.sgr-outer .sgr-card-headline {
    display:         flex !important;
    align-items:     center !important;
    justify-content: space-between !important;
    flex-wrap:       nowrap !important;
    gap:             8px !important;
    margin-bottom:   5px !important;
}

.sgr-outer .sgr-reviewer-name {
    font-family:     var(--sgr-ff-body) !important;
    font-size:       15px !important;
    font-weight:     700 !important;
    line-height:     1.2 !important;
    letter-spacing:  0 !important;
    color:           var(--sgr-text) !important;
    text-decoration: none !important;
    white-space:     nowrap !important;
    overflow:        hidden !important;
    text-overflow:   ellipsis !important;
    flex-shrink:     1 !important;
    min-width:       0 !important;
    text-transform:  none !important;
}
.sgr-outer .sgr-reviewer-name:hover { text-decoration: underline !important; }

/* Card-level stars (right side of headline) */
.sgr-outer .sgr-card-stars {
    display:     flex !important;
    gap:         2px !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    margin-left: auto !important;
}
.sgr-outer .sgr-card-stars .sgr-star {
    font-size:   16px !important;
    line-height: 1 !important;
    font-family: 'Segoe UI Emoji','Apple Color Emoji','Noto Color Emoji',sans-serif !important;
}

/* ══════════════════════════════════════
   REVIEW TEXT
   — 2-line clamp when collapsed
   — full text when expanded
══════════════════════════════════════ */
.sgr-outer .sgr-text-wrap { position: relative !important; }

.sgr-outer .sgr-text {
    font-family:    var(--sgr-ff-body) !important;
    font-size:      13.5px !important;
    font-weight:    400 !important;
    line-height:    1.6 !important;
    letter-spacing: 0 !important;
    color:          var(--sgr-text-sub) !important;
    text-transform: none !important;
    word-break:     break-word !important;
    white-space:    normal !important;
    text-decoration:none !important;
}

/* 2-line preview */
.sgr-outer .sgr-text-preview {
    display:            -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow:           hidden !important;
}

/* Full text hidden by default */
.sgr-outer .sgr-text-full { display: none !important; }

/* Swap on expand */
.sgr-outer .sgr-card.sgr-expanded .sgr-text-preview { display: none !important; }
.sgr-outer .sgr-card.sgr-expanded .sgr-text-full    { display: block !important; }

/* ══════════════════════════════════════
   STAR COLOURS (shared)
══════════════════════════════════════ */
.sgr-outer .sgr-star-full  { color: var(--sgr-gold) !important; }
.sgr-outer .sgr-star-half  { color: var(--sgr-gold) !important; opacity: 0.55 !important; }
.sgr-outer .sgr-star-empty { color: var(--sgr-gold-empty) !important; }

/* ══════════════════════════════════════
   SLIDER CONTROLS
══════════════════════════════════════ */
.sgr-outer .sgr-controls {
    display:         flex !important;
    align-items:     center !important;
    justify-content: center !important;
    gap:             10px !important;
    margin-top:      18px !important;
}

.sgr-outer .sgr-btn {
    width:           32px !important;
    height:          32px !important;
    border-radius:   50% !important;
    border:          none !important;
    background:      rgba(255,255,255,.1) !important;
    color:           var(--sgr-text) !important;
    font-size:       16px !important;
    line-height:     1 !important;
    cursor:          pointer !important;
    display:         flex !important;
    align-items:     center !important;
    justify-content: center !important;
    transition:      opacity var(--sgr-ease) !important;
}
.sgr-outer .sgr-btn:hover { opacity: 0.65 !important; }

.sgr-outer .sgr-dots { display: flex !important; gap: 6px !important; }

.sgr-outer .sgr-dot {
    width:         8px !important;
    height:        8px !important;
    border-radius: 50% !important;
    border:        none !important;
    background:    rgba(255,255,255,.25) !important;
    cursor:        pointer !important;
    padding:       0 !important;
    transition:    background var(--sgr-ease), transform 0.2s !important;
}
.sgr-outer .sgr-dot.active {
    background: var(--sgr-gold) !important;
    transform:  scale(1.4) !important;
}

/* ══════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════ */
.sgr-outer .sgr-empty {
    text-align:  center !important;
    padding:     20px 0 8px !important;
    color:       var(--sgr-text-sub) !important;
    font-size:   13px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}
.sgr-outer .sgr-empty .sgr-empty-icon {
    display:       block !important;
    font-size:     28px !important;
    margin-bottom: 8px !important;
}

/* ══════════════════════════════════════
   ERROR
══════════════════════════════════════ */
.sgr-error {
    padding:       14px 18px !important;
    background:    #fff0f0 !important;
    border:        1px solid #f5c6c6 !important;
    border-radius: 12px !important;
    color:         #b00020 !important;
    font-size:     13px !important;
    font-family:   sans-serif !important;
    line-height:   1.5 !important;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 440px) {
    .sgr-outer .sgr-banner-title              { font-size: 30px !important; }
    .sgr-outer .sgr-banner-count,
    .sgr-outer .sgr-banner-badge              { font-size: 16px !important; }
    .sgr-outer .sgr-widget                    { padding: 20px 16px 18px !important; }
    .sgr-outer .sgr-big-score                 { font-size: 44px !important; }
    .sgr-outer .sgr-stars-overall .sgr-star   { font-size: 26px !important; }
    .sgr-outer .sgr-avatar-wrap               {
        width:     50px !important;
        height:    50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
    }
    .sgr-outer .sgr-avatar-initial            { font-size: 20px !important; }
    .sgr-layout-grid .sgr-reviews-track       { grid-template-columns: 1fr !important; }
}

/* ═══════════════════════════════════════════════════
   PHASE 1 — Review date + Owner reply
   ═══════════════════════════════════════════════════ */

/* ── Review date ── */
.sgr-card-date {
    font-size: 11px !important;
    color: var(--sgr-subtext, #888) !important;
    margin: 2px 0 6px !important;
    line-height: 1 !important;
    font-style: normal !important;
}

.sgr-theme-dark  .sgr-card-date { color: #666 !important; }
.sgr-theme-light .sgr-card-date { color: #aaa !important; }

/* ── Owner reply block ── */
.sgr-reply {
    margin: 10px 0 0 !important;
    padding: 10px 14px !important;
    border-left: 3px solid rgba(255,255,255,0.15) !important;
    border-radius: 0 6px 6px 0 !important;
    background: rgba(255,255,255,0.05) !important;
}

.sgr-theme-light .sgr-reply {
    border-left-color: rgba(0,0,0,0.12) !important;
    background: rgba(0,0,0,0.03) !important;
}

.sgr-reply-header {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
}

.sgr-reply-icon {
    font-size: 14px !important;
    opacity: 0.5 !important;
    font-style: normal !important;
    line-height: 1 !important;
}

.sgr-reply-label {
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: .05em !important;
    opacity: 0.6 !important;
    line-height: 1 !important;
}

.sgr-reply-date {
    font-size: 11px !important;
    opacity: 0.4 !important;
    margin-left: auto !important;
    line-height: 1 !important;
}

.sgr-reply-text {
    font-size: 13px !important;
    line-height: 1.55 !important;
    opacity: 0.8 !important;
    margin: 0 !important;
}

/* ═══════════════════════════════════════════════════
   PHASE 2 — Masonry layout + Review Request CTA
   ═══════════════════════════════════════════════════ */

/* ── Masonry layout ── */
.sgr-layout-masonry .sgr-reviews-track {
    display: block !important;
    column-count: 2 !important;
    column-gap: 16px !important;
}
.sgr-layout-masonry .sgr-card {
    break-inside: avoid !important;
    display: inline-block !important;
    width: 100% !important;
    margin-bottom: 16px !important;
}
@media (max-width: 540px) {
    .sgr-layout-masonry .sgr-reviews-track { column-count: 1 !important; }
}

/* ── Review Request CTA ── */
.sgr-cta-wrap {
    border-radius: 16px;
    padding: 36px 32px;
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}
.sgr-cta-dark {
    background: #1e1e1e;
    color: #f0f0f0;
}
.sgr-cta-light {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    color: #1a1a1a;
}
.sgr-cta-stars {
    font-size: 28px;
    color: #f4a311;
    letter-spacing: 4px;
    margin-bottom: 14px;
    display: block;
}
.sgr-cta-heading {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin: 0 0 10px !important;
    line-height: 1.3 !important;
}
.sgr-cta-dark  .sgr-cta-heading { color: #fff !important; }
.sgr-cta-light .sgr-cta-heading { color: #111 !important; }

.sgr-cta-subtext {
    font-size: 14px !important;
    opacity: 0.65 !important;
    margin: 0 0 24px !important;
    line-height: 1.6 !important;
}
.sgr-cta-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    color: #222 !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 13px 28px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: transform .15s, box-shadow .15s !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.18) !important;
}
.sgr-cta-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,.22) !important;
}
.sgr-cta-light .sgr-cta-btn {
    background: #1a1a1a !important;
    color: #fff !important;
}
