/**
 * BRUBECK Google Értékelések – frontend stílus
 * Sötét, footerbe illő, glassmorphism kártyás megjelenés.
 */

/* -------------------------------------------------------------------------
 * Wrapper
 * ------------------------------------------------------------------------- */
.bgr-wrapper {
        display: flex;
        gap: 24px;
        align-items: stretch;
        max-width: 1200px;
        margin: 0 auto;
        padding: 8px 0;
        box-sizing: border-box;
        background: transparent;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
        color: #ffffff;
}

.bgr-wrapper *,
.bgr-wrapper *::before,
.bgr-wrapper *::after {
        box-sizing: border-box;
}

/* -------------------------------------------------------------------------
 * Profil kártya
 * ------------------------------------------------------------------------- */
.bgr-profile-card {
        flex: 0 0 260px;
        width: 260px;
        padding: 28px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 16px;
        text-align: center;
        color: #ffffff;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
}

.bgr-company-logo {
        width: 80px;
        height: 80px;
        margin: 0 auto 14px;
        border-radius: 50%;
        object-fit: cover;
        background: #ffffff;
        display: block;
}

.bgr-company-name {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.3;
        margin-bottom: 12px;
        color: #ffffff;
}

.bgr-avg-rating {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        margin-bottom: 8px;
}

.bgr-avg-number {
        font-size: 44px;
        font-weight: 800;
        line-height: 1;
        color: #ffffff;
}

.bgr-total-reviews {
        font-size: 13px;
        color: #bbbbbb;
        margin-bottom: 14px;
}

.bgr-google-logo {
        max-width: 120px;
        height: auto;
        margin: 0 auto 14px;
        display: block;
}

/* -------------------------------------------------------------------------
 * Csillagok (átlag – töredékkel, és kártya – egész)
 * ------------------------------------------------------------------------- */
.bgr-stars-wrap {
        display: inline-flex;
        align-items: center;
        line-height: 1;
}

.bgr-star {
        color: #cccccc;
        font-size: 22px;
        line-height: 1;
        display: inline-block;
}

.bgr-star-full {
        color: #f4b942;
}

.bgr-star-empty {
        color: rgba(255, 255, 255, 0.28);
}

/* Töredékcsillag: alap üres/halvány, felül a részlegesen töltött arany. */
.bgr-star-partial {
        position: relative;
        display: inline-block;
        color: rgba(255, 255, 255, 0.28);
}

.bgr-star-partial .bgr-star-inner {
        position: absolute;
        left: 0;
        top: 0;
        color: #f4b942;
        overflow: hidden;
        width: var(--fill, 50%);
        white-space: nowrap;
}

/* -------------------------------------------------------------------------
 * CTA gomb
 * ------------------------------------------------------------------------- */
.bgr-write-review-btn {
        display: inline-block;
        margin-top: 6px;
        padding: 10px 20px;
        background: #F47920;
        color: #ffffff;
        border-radius: 24px;
        text-decoration: none;
        font-size: 14px;
        font-weight: 600;
        transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
        box-shadow: 0 4px 12px rgba(244, 121, 32, 0.35);
}

.bgr-write-review-btn:hover {
        background: #e06810;
        transform: translateY(-2px);
        color: #ffffff;
        box-shadow: 0 6px 16px rgba(244, 121, 32, 0.45);
}

.bgr-btn-icon {
        margin-right: 4px;
}

/* -------------------------------------------------------------------------
 * Értékelések terület + slider (flex row: prev | viewport | next)
 * ------------------------------------------------------------------------- */
.bgr-reviews-area {
        position: relative;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
}

.bgr-reviews-viewport {
        flex: 1;
        overflow: hidden;
        min-width: 0;
}

.bgr-reviews-track {
        display: flex;
        gap: 16px;
        transition: transform 0.4s ease;
        will-change: transform;
}

/* -------------------------------------------------------------------------
 * Navigációs gombok – FLEX ITEM, nem absolute!
 * ------------------------------------------------------------------------- */
.bgr-nav-btn {
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.15);
        color: #ffffff;
        border: none;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        transition: background 0.25s ease;
}

.bgr-nav-btn:hover {
        background: rgba(255, 255, 255, 0.3);
}

.bgr-nav-btn:disabled {
        opacity: 0.35;
        cursor: default;
}

/* -------------------------------------------------------------------------
 * Értékelés kártya
 * ------------------------------------------------------------------------- */
.bgr-review-card {
        min-width: calc(33.333% - 11px);
        flex: 0 0 calc(33.333% - 11px);
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 12px;
        padding: 20px;
        color: #ffffff;
        display: flex;
        flex-direction: column;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
        transition: transform 0.25s ease, border-color 0.25s ease;
}

.bgr-review-card:hover {
        transform: translateY(-4px);
        border-color: rgba(255, 255, 255, 0.25);
}

.bgr-reviewer-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
}

.bgr-avatar-wrap {
        position: relative;
        width: 44px;
        height: 44px;
        flex-shrink: 0;
}

.bgr-avatar-img {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        object-fit: cover;
        display: block;
}

.bgr-avatar-initials {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        color: #ffffff;
        font-size: 16px;
}

.bgr-reviewer-meta {
        flex: 1;
        min-width: 0;
}

/* Teljes név – NINCS levágás! */
.bgr-reviewer-name {
        font-weight: 600;
        font-size: 14px;
        color: #ffffff;
        white-space: nowrap;
        overflow: visible;
        text-overflow: unset;
        max-width: none;
}

.bgr-review-date {
        font-size: 12px;
        color: #999999;
}

.bgr-google-logo-small {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: #ffffff;
        color: #4285F4;
        font-weight: 700;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
}

.bgr-review-stars {
        margin-bottom: 10px;
}

.bgr-review-stars .bgr-star {
        font-size: 18px;
}

.bgr-review-text {
        font-size: 13px;
        color: #cccccc;
        line-height: 1.6;
        margin: 0;
        /* Nincs line-clamp: a szöveg 150 karakternél PHP-ben van levágva,
           a teljes szöveg a "tovább" gombra popupban jelenik meg. */
        white-space: pre-line;
        word-wrap: break-word;
        overflow-wrap: break-word;
}

/* "tovább" gomb a kártyán */
.bgr-read-more {
        background: none;
        border: none;
        padding: 0;
        margin: 0;
        color: #F47920;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        text-decoration: underline;
}

.bgr-read-more:hover {
        color: #ffb066;
}

/* -------------------------------------------------------------------------
 * Popup (teljes értékelés)
 * ------------------------------------------------------------------------- */
.bgr-popup-overlay {
        position: fixed;
        inset: 0;
        z-index: 999999;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
}

.bgr-popup-box {
        position: relative;
        width: 100%;
        max-width: 520px;
        max-height: 85vh;
        overflow-y: auto;
        background: #1f2430;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 16px;
        padding: 28px;
        color: #ffffff;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.bgr-popup-close {
        position: absolute;
        top: 14px;
        right: 14px;
        width: 32px;
        height: 32px;
        border: none;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
        font-size: 16px;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s ease;
}

.bgr-popup-close:hover {
        background: rgba(255, 255, 255, 0.28);
}

.bgr-popup-header {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-bottom: 16px;
        padding-right: 40px;
}

.bgr-popup-avatar {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        flex-shrink: 0;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 20px;
        color: #ffffff;
}

.bgr-popup-name {
        font-size: 17px;
        font-weight: 700;
        color: #ffffff;
}

.bgr-popup-date {
        font-size: 13px;
        color: #999999;
        margin-top: 2px;
}

.bgr-popup-stars {
        margin-bottom: 14px;
}

.bgr-popup-stars .bgr-star {
        font-size: 20px;
}

.bgr-popup-stars .bgr-star-full {
        color: #f4b942;
}

.bgr-popup-stars .bgr-star-empty {
        color: rgba(255, 255, 255, 0.28);
}

.bgr-popup-text {
        font-size: 15px;
        line-height: 1.7;
        color: #dddddd;
        margin: 0;
        white-space: pre-line;
        word-wrap: break-word;
        overflow-wrap: break-word;
}

.bgr-no-reviews {
        color: #bbbbbb;
        font-size: 14px;
        padding: 24px;
        text-align: center;
        width: 100%;
}

/* -------------------------------------------------------------------------
 * Reszponzív – mobil
 * ------------------------------------------------------------------------- */
@media (max-width: 768px) {
        .bgr-wrapper {
                flex-direction: column;
        }

        .bgr-profile-card {
                flex: 0 0 auto;
                width: 100%;
                margin-bottom: 24px;
        }

        /* A gombok a viewport JOBB és BAL oldalán maradnak (flex row). */
        .bgr-reviews-area {
                display: flex;
                flex-direction: row;
                align-items: center;
                gap: 8px;
        }

        .bgr-reviews-viewport {
                flex: 1;
                overflow: hidden;
        }

        .bgr-nav-btn {
                flex-shrink: 0;
        }

        .bgr-review-card {
                min-width: 100%;
                flex: 0 0 100%;
        }
}
