/*
 * Google Reviews – Frontend Styles
 * Personalizza con variabili CSS nel tuo tema
 */

:root {
    --gwr-gold:       #f59e0b;
    --gwr-gold-hover: #d97706;
    --gwr-bg:         #ffffff;
    --gwr-bg-reply:   #f9fafb;
    --gwr-border:     #e5e7eb;
    --gwr-text:       #111827;
    --gwr-muted:      #6b7280;
    --gwr-radius:     13px;
    --gwr-shadow:     0 2px 18px rgba(0, 0, 0, .07);
    --gwr-gap:        18px;
}

/* ── Wrapper ───────────────────────────────────────── */
.gwr-wrap {
    font-family: inherit;
    max-width: 100%;
}

.gwr-section-title {
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.2em;
}

/* ── Summary bar ───────────────────────────────────── */
.gwr-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--gwr-bg);
    border: 1px solid var(--gwr-border);
    border-radius: var(--gwr-radius);
    padding: 18px 22px;
    margin-bottom: 24px;
    box-shadow: var(--gwr-shadow);
}

.gwr-score {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--gwr-text);
    line-height: 1;
    min-width: 58px;
}

.gwr-summary-info {
    flex: 1;
    min-width: 130px;
}

.gwr-total {
    font-size: .82rem;
    color: var(--gwr-muted);
    margin-top: 3px;
}

.gwr-place-name {
    font-size: .87rem;
    font-weight: 600;
    color: var(--gwr-text);
    margin-top: 3px;
}

.gwr-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--gwr-gold);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 9px;
    font-size: .84rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background .2s;
    margin-left: auto;
}
.gwr-cta-btn:hover { background: var(--gwr-gold-hover); }

/* ── Stars ─────────────────────────────────────────── */
.gwr-stars { display: flex; gap: 2px; margin: 5px 0; }
.gwr-star-full,
.gwr-star-half { color: var(--gwr-gold); }

/* ── Cards (shared) ────────────────────────────────── */
.gwr-card {
    background: var(--gwr-bg);
    border: 1px solid var(--gwr-border);
    border-radius: var(--gwr-radius);
    padding: 18px 20px;
    box-shadow: var(--gwr-shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}
.gwr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,.11);
}

.gwr-card-header {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 7px;
}

.gwr-avatar,
.gwr-avatar-letter {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
}
.gwr-avatar { object-fit: cover; display: block; }
.gwr-avatar-letter {
    background: linear-gradient(135deg, var(--gwr-gold), #fde68a);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gwr-author-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.gwr-author-name {
    font-weight: 600;
    font-size: .88rem;
    color: var(--gwr-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gwr-review-date {
    font-size: .75rem;
    color: var(--gwr-muted);
}
.gwr-google-badge { margin-left: auto; flex-shrink: 0; }

/* ── Review body ───────────────────────────────────── */
.gwr-review-body {
    font-size: .86rem;
    line-height: 1.66;
    color: #374151;
    margin-top: 8px;
}
.gwr-read-more,
.gwr-read-less {
    background: none;
    border: none;
    color: var(--gwr-gold);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    text-decoration: underline;
}

/* ── Reply ─────────────────────────────────────────── */
.gwr-reply {
    background: var(--gwr-bg-reply);
    border-left: 3px solid var(--gwr-gold);
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    margin-top: 12px;
}
.gwr-reply-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .74rem;
    font-weight: 700;
    color: var(--gwr-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 5px;
}
.gwr-reply-text {
    margin: 0;
    font-size: .82rem;
    color: var(--gwr-muted);
    line-height: 1.55;
}

/* ── Grid layout ───────────────────────────────────── */
.gwr-layout-grid .gwr-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: var(--gwr-gap);
}

/* ── List layout ───────────────────────────────────── */
.gwr-layout-list .gwr-cards {
    display: flex;
    flex-direction: column;
    gap: var(--gwr-gap);
}

/* ── Slider layout ─────────────────────────────────── */
.gwr-layout-slider .gwr-cards {
    display: flex;
    gap: var(--gwr-gap);
    overflow: hidden;
    transition: transform .35s ease;
}
.gwr-layout-slider .gwr-card {
    min-width: 290px;
    flex: 0 0 290px;
}
.gwr-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}
.gwr-btn-prev,
.gwr-btn-next {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--gwr-border);
    background: var(--gwr-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gwr-text);
    transition: background .18s, border-color .18s, color .18s;
    padding: 0;
}
.gwr-btn-prev:hover,
.gwr-btn-next:hover {
    background: var(--gwr-gold);
    border-color: var(--gwr-gold);
    color: #fff;
}
.gwr-slider-dots { display: flex; gap: 6px; }
.gwr-dot-btn {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gwr-border);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.gwr-dot-btn.active {
    background: var(--gwr-gold);
    transform: scale(1.35);
}

/* ── Footer link ───────────────────────────────────── */
.gwr-footer-link {
    text-align: center;
    margin-top: 14px;
    font-size: .78rem;
    color: var(--gwr-muted);
}
.gwr-footer-link a { color: var(--gwr-muted); text-decoration: underline; }

/* ── Misc ──────────────────────────────────────────── */
.gwr-no-reviews { color: var(--gwr-muted); font-style: italic; }
.gwr-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .88rem;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 600px) {
    .gwr-summary       { flex-direction: column; text-align: center; }
    .gwr-cta-btn       { margin: 4px auto 0; }
    .gwr-layout-grid .gwr-cards { grid-template-columns: 1fr; }
    .gwr-layout-slider .gwr-card { min-width: 250px; flex-basis: 250px; }
}
