/* ========================================
   GOOGLE REVIEWS PROZON
   Scoped to .lx-google-reviews-prozon and powered by site-editor theme variables.

   Color approach:
   1. Map editor CSS variables to local prozon variables once.
   2. Use only local --gr-* variables throughout this file.
   3. To change the prozon's color behavior later, edit only the mapping section.
======================================== */

.lx-google-reviews-prozon,
.lx-google-reviews-prozon * {
    box-sizing: border-box;
}

.lx-google-reviews-prozon {
    /* Layout / shape */
    --gr-radius: var(--pz-radius, 12px);
    --gr-container: var(--pz-container, 1200px);
    --gr-shadow: var(--pz-shadow, none);

    /* Typography */
    --gr-font-body: var(--pz-font-body, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    --gr-font-meta: var(--pz-font-footer, var(--gr-font-body));
    --gr-font-button: var(--pz-font-buttons, var(--gr-font-body));
    --gr-size-body: var(--pz-size-body, 1rem);
    --gr-size-meta: var(--pz-size-footer, 0.9rem);

    /* Editor color mapping */
    --gr-heading: var(--pz-heading, var(--pz-color-h1, #000000));
    --gr-body: var(--pz-body, var(--pz-color-body-text, #1F2937));
    --gr-muted: var(--pz-muted, var(--gr-body));
    --gr-card-bg: var(--pz-card-bg, var(--pz-bg-card, #FFFFFF));
    --gr-border: var(--pz-border, var(--pz-color-border-medium, #CBD5E1));
    --gr-link-hover: var(--pz-link-hover, var(--pz-link, var(--gr-heading)));
    --gr-focus: var(--pz-focus, var(--pz-input-focus, #2D6CDF));

    /* Prozon-specific color roles */
    --gr-prozon-text: var(--gr-body);
    --gr-card-text: var(--gr-body);
    --gr-source-text: var(--gr-body);
    --gr-stars: var(--gr-heading);
    --gr-reviewer-name: var(--gr-heading);
    --gr-arrow-bg: var(--gr-card-bg);
    --gr-arrow-text: var(--gr-body);
    --gr-dot: var(--gr-body);

    width: 100%;
    overflow: hidden;
    padding: clamp(1.75rem, 5vw, 3.5rem) 0;
    border-radius: var(--gr-radius);
    background: transparent;
    color: var(--gr-prozon-text);
    font-family: var(--gr-font-body);
    font-size: var(--gr-size-body);
}

.lx-google-reviews__inner {
    position: relative;
    width: min(var(--gr-container), calc(100% - 2rem));
    margin: 0 auto;
}

.lx-google-reviews__viewport {
    overflow: hidden;
    padding: 0.15rem;
    border-radius: var(--gr-radius);
}

.lx-google-reviews__track {
    display: flex;
    gap: clamp(1.125rem, 3vw, 2.375rem);
    transition: transform 0.35s ease;
    will-change: transform;
}

.lx-google-review-card {
    flex: 0 0 calc((100% - (clamp(1.125rem, 3vw, 2.375rem) * 2)) / 3);
    min-height: 255px;
    padding: clamp(1.375rem, 2.6vw, 2rem);
    overflow: hidden;
    border: 1px solid var(--gr-border);
    border-radius: var(--gr-radius);
    background: var(--gr-card-bg);
    color: var(--gr-card-text);
    box-shadow: var(--gr-shadow);
}

.lx-google-review-card__top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--gr-muted);
    font-family: var(--gr-font-meta);
    font-size: var(--gr-size-meta);
    line-height: 1.25;
}

.lx-google-review-card__source {
    font-weight: 700;
    color: var(--gr-source-text);
}

.lx-google-review-card__stars {
    color: var(--gr-stars);
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.lx-google-review-card__quote {
    margin: 0;
    color: var(--gr-card-text);
    font-family: var(--gr-font-body);
    font-size: var(--gr-size-body);
    line-height: 1.55;
}

.lx-google-review-card__name {
    margin: 1.125rem 0 0;
    color: var(--gr-reviewer-name);
    font-family: var(--gr-font-meta);
    font-size: var(--gr-size-meta);
    line-height: 1.5;
}

.lx-google-reviews__arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 46px;
    height: 46px;
    padding: 0;
    transform: translateY(-50%);
    border: 1px solid var(--gr-border);
    border-radius: 999px;
    background: var(--gr-arrow-bg);
    color: var(--gr-arrow-text);
    box-shadow: var(--pz-shadow, 0 8px 24px rgba(0, 0, 0, 0.15));
    font-family: var(--gr-font-button);
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
}

.lx-google-reviews__arrow:hover,
.lx-google-reviews__arrow:focus-visible {
    border-color: var(--gr-border);
    color: var(--gr-link-hover);
}

.lx-google-reviews__arrow:focus-visible,
.lx-google-reviews__dot:focus-visible {
    outline: 3px solid var(--gr-focus);
    outline-offset: 3px;
}

.lx-google-reviews__arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.lx-google-reviews__arrow--prev {
    left: -23px;
}

.lx-google-reviews__arrow--next {
    right: -23px;
}

.lx-google-reviews__dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.125rem;
}

.lx-google-reviews__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 1px solid var(--gr-dot);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.lx-google-reviews__dot.is-active {
    border-color: var(--gr-dot);
    background: var(--gr-dot);
}

@media (max-width: 950px) {
    .lx-google-review-card {
        flex-basis: calc((100% - clamp(1.125rem, 3vw, 2.375rem)) / 2);
    }
}

@media (max-width: 640px) {
    .lx-google-reviews__inner {
        width: min(calc(100% - 1.5rem), 520px);
    }

    .lx-google-review-card {
        flex-basis: 100%;
        min-height: 235px;
    }

    .lx-google-reviews__arrow--prev {
        left: -10px;
    }

    .lx-google-reviews__arrow--next {
        right: -10px;
    }
}
