/**
 * BD Google Bewertungen - Frontend
 */
.bgr-widget {
    --bgr-star: #fbbc04;
    --bgr-text: #1a1d21;
    --bgr-card: transparent;
    --bgr-gap: 24px;
    display: flex;
    align-items: center;
    gap: 32px;
    color: var(--bgr-text);
    font-size: 15px;
    line-height: 1.5;
}

.bgr-widget p {
    margin: 0;
}

/* Stars: grey base row, coloured row clipped to the rating on top */
.bgr-stars {
    position: relative;
    display: inline-flex;
    line-height: 0;
}

.bgr-stars svg {
    flex: none;
    width: 1.2em;
    height: 1.2em;
}

.bgr-stars__base,
.bgr-stars__fill {
    display: inline-flex;
    white-space: nowrap;
}

.bgr-stars__base {
    fill: rgba(0, 0, 0, 0.15);
}

.bgr-stars__fill {
    position: absolute;
    inset: 0 auto 0 0;
    overflow: hidden;
    fill: var(--bgr-star);
}

/* Summary */
.bgr-summary {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.bgr-summary__label {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.bgr-summary .bgr-stars {
    font-size: 30px;
}

.bgr-summary__count {
    font-size: 15px;
}

.bgr-summary__logo {
    margin-top: 4px;
    text-decoration: none;
}

.bgr-wordmark {
    font-family: "Product Sans", "Google Sans", Arial, sans-serif;
    font-size: 36px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1;
}

.bgr-wordmark span:nth-child(1),
.bgr-wordmark span:nth-child(4) { color: #4285f4; }
.bgr-wordmark span:nth-child(2),
.bgr-wordmark span:nth-child(6) { color: #ea4335; }
.bgr-wordmark span:nth-child(3) { color: #fbbc05; }
.bgr-wordmark span:nth-child(5) { color: #34a853; }

/* Slider */
.bgr-slider {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.bgr-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 2 * var(--bgr-gap)) / 3);
    gap: var(--bgr-gap);
    margin: 0;
    padding: 0 0 4px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.bgr-track::-webkit-scrollbar {
    display: none;
}

.bgr-card {
    scroll-snap-align: start;
    margin: 0;
    padding: 16px;
    border-radius: 10px;
    background: var(--bgr-card);
}

.bgr-card__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.bgr-avatar {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    color: #fff;
    font-size: 20px;
}

.bgr-card__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.bgr-card__author {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bgr-card__date {
    font-size: 13px;
    opacity: 0.65;
}

.bgr-g {
    flex: none;
}

.bgr-card__rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 8px;
}

.bgr-card__rating .bgr-stars {
    font-size: 17px;
}

.bgr-card__text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.bgr-card.is-open .bgr-card__text {
    display: block;
}

.bgr-card__more {
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 13px;
    opacity: 0.65;
    cursor: pointer;
    text-decoration: underline;
}

.bgr-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-top: -16px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #1a1d21;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.bgr-nav[hidden] {
    display: none;
}

.bgr-nav--prev { left: -16px; }
.bgr-nav--next { right: -16px; }

.bgr-nav:focus-visible,
.bgr-card__more:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.bgr-admin-hint {
    padding: 12px 16px;
    border: 1px dashed #d63638;
    color: #d63638;
}

@media (max-width: 900px) {
    .bgr-widget {
        flex-direction: column;
        align-items: stretch;
    }

    .bgr-track {
        grid-auto-columns: calc((100% - var(--bgr-gap)) / 2);
    }
}

@media (max-width: 600px) {
    .bgr-track {
        grid-auto-columns: 85%;
    }

    .bgr-nav--prev { left: 0; }
    .bgr-nav--next { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .bgr-track {
        scroll-behavior: auto;
    }
}
