/* ==========================================================
   Widżet opinii Google - wspólny komponent (js/google_reviews.js)
   ========================================================== */

/* Kontenery są ukryte, dopóki JS nie wczyta danych */
.gr-slot,
.gr-section {
    display: none;
}

.gr-slot.show,
.gr-section.show {
    display: block;
}

/* --- Gwiazdki --- */
.gr-stars {
    display: inline-flex;
    gap: 2px;
    line-height: 0;
}

.gr-star {
    width: 16px;
    height: 16px;
    fill: #FBBC04;
}

.gr-star-empty {
    fill: #D6D6D6;
}

/* --- Badge: gwiazdki + ocena + liczba opinii --- */
.gr-badge {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 14px;
    background-color: #FFFFFF;
    border: 1px solid rgb(225, 225, 225);
    border-radius: 5px;
    color: #373C50;
    font-size: 0.9rem;
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.gr-badge:hover {
    border-color: #252830;
}

.gr-badge-rating {
    font-weight: 700;
}

.gr-badge-count {
    color: rgba(0, 0, 0, 0.7);
}

.gr-badge:hover .gr-badge-count {
    text-decoration: underline;
}

/* Przy formularzu kontaktowym - wyśrodkowany pod nagłówkiem */
.gr-slot-form.show {
    margin: -24px 0 32px;
    text-align: center;
}

/* W stopce - nad ikonami social media (Google, pod nim Allegro) */
.gr-slot-footer.show {
    margin-bottom: 20px;
}

.gr-slot-footer.show:has(+ .gr-slot-footer.show) {
    margin-bottom: 10px;
}

/* --- Inline: jedna linia w karcie hero --- */
.gr-slot-hero.show {
    margin-top: 10px;
}

.gr-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #373C50;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.gr-inline:hover {
    color: #252830;
    text-decoration: underline;
}

/* --- Sekcja z kartami opinii --- */
.gr-section {
    width: 100%;
    margin-bottom: 100px;
}

.gr-cards {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    text-align: left;
}

.gr-summary {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.gr-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.gr-card {
    flex: 1 1 300px;
    max-width: 420px;
    box-sizing: border-box;
    background-color: rgb(247, 247, 247);
    border: 5px solid rgb(238, 238, 238);
    border-radius: 15px;
    padding: 30px 25px;
    text-align: left;
}

.gr-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.gr-avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #373C50;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gr-card-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gr-author {
    color: #000000;
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.gr-author:hover {
    color: #252830;
    text-decoration: underline;
}

.gr-time {
    color: rgba(0, 0, 0, 0.6);
    font-size: 0.85rem;
}

.gr-text {
    margin: 12px 0 0;
    color: rgba(0, 0, 0, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gr-attribution {
    margin: 25px 0 0;
    text-align: center;
    color: rgba(0, 0, 0, 0.6);
    font-size: 0.85rem;
}

.gr-more {
    color: #373C50;
    font-weight: 600;
}

.gr-more:hover {
    color: #252830;
}

/* Karty w istniejącej sekcji "Oceń nas" (contact, about) */
.review-section .gr-slot-cards.show {
    margin: 10px 0 0;
}

@media screen and (max-width: 1023px) {
    .gr-section {
        margin-bottom: 60px;
    }

    .gr-card {
        max-width: 100%;
        padding: 25px 20px;
    }

    /* Nagłówek formularza ma na mobile mniejszy margines (30px) */
    .gr-slot-form.show {
        margin: -14px 0 24px;
    }
}
