/* ============================================================
   Review Aggregator — Public Stylesheet
   ============================================================ */

.ra-feed {
    --ra-font:         inherit;
    --ra-radius:       12px;
    --ra-shadow:       0 2px 12px rgba(0,0,0,.08);
    --ra-shadow-hover: 0 6px 24px rgba(0,0,0,.13);
    --ra-transition:   0.22s ease;
    --ra-bg-card:      #ffffff;
    --ra-bg-badge:     #f8f9fa;
    --ra-border:       #e8eaed;
    --ra-text:         #1a1a1a;
    --ra-text-muted:   #6c757d;
    --ra-star-filled:  #f4b400;
    --ra-star-empty:   #dadce0;
    --ra-avatar-bg:    #4285f4;
    --ra-avatar-text:  #ffffff;
    --ra-arrow-bg:     #ffffff;
    --ra-arrow-border: #dadce0;
    --ra-arrow-text:   #5f6368;
    --ra-dot-bg:       #dadce0;
    --ra-dot-active:   #4285f4;
}

.ra-feed.ra-theme-dark {
    --ra-bg-card:    #16213e;
    --ra-bg-badge:   #0f3460;
    --ra-border:     #2d3561;
    --ra-text:       #e0e0e0;
    --ra-text-muted: #9e9e9e;
    --ra-star-empty: #3d4f6b;
    --ra-arrow-bg:   #16213e;
    --ra-arrow-border:#2d3561;
    --ra-arrow-text: #9e9e9e;
    --ra-dot-bg:     #2d3561;
}

.ra-feed *, .ra-feed *::before, .ra-feed *::after { box-sizing: border-box; }
.ra-feed { font-family: var(--ra-font); color: var(--ra-text); width: 100%; }

/* Badge */
.ra-badge {
    display: inline-flex; align-items: center; gap: 16px;
    background: var(--ra-bg-badge); border: 1px solid var(--ra-border);
    border-radius: var(--ra-radius); padding: 12px 20px; margin-bottom: 24px;
}
.ra-badge--large { padding: 20px 28px; gap: 20px; }
.ra-badge__logo  { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ra-badge__g     { width: 32px; height: 32px; }
.ra-badge--large .ra-badge__g { width: 48px; height: 48px; }
.ra-badge__service-name { font-size: 11px; color: var(--ra-text-muted); white-space: nowrap; }
.ra-badge__score { display: flex; flex-direction: column; gap: 2px; }
.ra-badge__number{ font-size: 28px; font-weight: 700; line-height: 1; color: var(--ra-text); }
.ra-badge--large .ra-badge__number { font-size: 40px; }
.ra-badge__count { font-size: 12px; color: var(--ra-text-muted); }

/* Stars */
.ra-stars { display: inline-flex; gap: 1px; line-height: 1; }
.ra-star   { font-size: 18px; line-height: 1; }
.ra-star--filled { color: var(--ra-star-filled); }
.ra-star--empty  { color: var(--ra-star-empty);  }

/* Review card */
.ra-card {
    background: var(--ra-bg-card); border: 1px solid var(--ra-border);
    border-radius: var(--ra-radius); box-shadow: var(--ra-shadow); padding: 20px;
    transition: box-shadow var(--ra-transition), transform var(--ra-transition);
}
.ra-review-card { display: flex; flex-direction: column; gap: 12px; }
.ra-review-card__header { display: flex; align-items: center; gap: 12px; }
.ra-avatar {
    width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    background: var(--ra-avatar-bg);
}
.ra-avatar__img       { width: 100%; height: 100%; object-fit: cover; }
.ra-avatar__initials  { color: var(--ra-avatar-text); font-size: 18px; font-weight: 600; line-height: 1; }
.ra-review-card__name { font-weight: 600; font-size: 14px; color: var(--ra-text); }
.ra-review-card__location { font-size: 12px; color: var(--ra-text-muted); margin-top: 1px; }
.ra-review-card__rating { display: flex; align-items: center; gap: 8px; }
.ra-review-card__date   { font-size: 12px; color: var(--ra-text-muted); }
.ra-review-card__text   { font-size: 14px; line-height: 1.6; color: var(--ra-text); flex-grow: 1; }
.ra-review-card__text--empty { color: var(--ra-text-muted); }
.ra-review-card__footer { margin-top: auto; padding-top: 8px; }
.ra-google-icon { width: 20px; height: 20px; }

/* Carousel */
.ra-feed--carousel .ra-carousel { position: relative; width: 100%; user-select: none; }
.ra-carousel__track-container   { overflow: hidden; width: 100%; }
.ra-carousel__track { display: flex; gap: 16px; transition: transform 0.45s cubic-bezier(.4,0,.2,1); will-change: transform; }
.ra-carousel__arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
    background: var(--ra-arrow-bg); border: 1px solid var(--ra-arrow-border);
    border-radius: 50%; color: var(--ra-arrow-text); width: 40px; height: 40px;
    font-size: 22px; cursor: pointer; box-shadow: var(--ra-shadow);
    display: flex; align-items: center; justify-content: center;
    transition: box-shadow var(--ra-transition);
}
.ra-carousel__arrow:hover    { box-shadow: var(--ra-shadow-hover); }
.ra-carousel__arrow:disabled { opacity: 0.35; cursor: default; }
.ra-carousel__arrow--prev { left:  -20px; }
.ra-carousel__arrow--next { right: -20px; }
.ra-carousel__dots { display: flex; justify-content: center; gap: 6px; margin-top: 20px; }
.ra-carousel__dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--ra-dot-bg);
    cursor: pointer; border: none; padding: 0;
    transition: background var(--ra-transition), transform var(--ra-transition);
}
.ra-carousel__dot--active { background: var(--ra-dot-active); transform: scale(1.3); }

/* Grid */
.ra-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 20px; }
.ra-grid .ra-review-card:hover { box-shadow: var(--ra-shadow-hover); transform: translateY(-2px); }

/* List */
.ra-list { display: flex; flex-direction: column; gap: 12px; }
.ra-review-card--list { flex-direction: row; gap: 16px; align-items: flex-start; }
.ra-review-card--list .ra-review-card__right { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ra-review-card--list .ra-review-card__footer-icon { flex-shrink: 0; }

/* Utility */
.ra-no-reviews { color: var(--ra-text-muted); font-style: italic; text-align: center; padding: 40px 0; }

@media (max-width: 768px) {
    .ra-carousel__arrow--prev { left:  -12px; }
    .ra-carousel__arrow--next { right: -12px; }
    .ra-badge { flex-wrap: wrap; }
    .ra-review-card--list { flex-direction: column; }
}

/* Platform icons (replaces old .ra-google-icon) */
.ra-platform-icon { width: 20px; height: 20px; display: inline-block; }
.ra-platform-icon--trustpilot { width: 18px; height: 18px; }
.ra-platform-icon--facebook   { width: 18px; height: 18px; }

/* ── Badge position wrappers ─────────────────────────────────────────────── */
.ra-badge-wrap {
    display:         flex;
    justify-content: center;
    width:           100%;
}
.ra-badge-wrap--above { margin-bottom: 24px; }
.ra-badge-wrap--below { margin-top:    24px; }

/* ── Badge text style ────────────────────────────────────────────────────── */
.ra-badge--text {
    display:     flex;
    align-items: center;
    gap:         10px;
    background:  transparent;
    border:      none;
    box-shadow:  none;
    padding:     0;
    font-size:   16px;
    flex-wrap:   wrap;
    justify-content: center;
}
.ra-badge--text .ra-badge__number {
    font-size:   28px;
    font-weight: 700;
    color:       var(--ra-text);
    line-height: 1;
}
.ra-badge--text .ra-badge__count {
    font-size: 14px;
    color:     var(--ra-text-muted);
}
.ra-badge--text .ra-star { font-size: 22px; }
