/* Auto Glass World - Reviews (modules/global/global_reviews.php) */
.agw-rvw {
    position: relative;
    z-index: 2;
    margin-top: calc(-1 * var(--agw-overlap));
    padding: var(--agw-space-section) 0;
    border-radius: var(--agw-overlap) var(--agw-overlap) 0 0;
    background: var(--agw-color-white);
}

/* Title | intro text | arrows. */
.agw-rvw-head {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
    gap: 24px 32px;
    align-items: end;
    margin-bottom: var(--agw-space-head);
}

.agw-rvw-head .eyebrow {
    margin-bottom: var(--agw-label-gap);
}

/* "All reviews": right side, centred on the eyebrow line (taken out of the grid, so the eyebrow keeps
   the same gap to the title as in every section). */
.agw-rvw-head {
    position: relative;
}

.agw-rvw-all {
    position: absolute;
    top: 0;
    right: 0;
    transform: translateY(calc(-50% + 9px)); /* 9px = half the eyebrow line (18px) */
}

.agw-rvw .agw-rvw-text {
    max-width: 38ch;
    margin: 0;
    font-size: var(--agw-fs-lead);
    line-height: 1.53;
}

.agw-rvw-ctrl {
    display: flex;
    gap: 10px;
}

.agw-rvw-ctrl button {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1.5px solid var(--agw-color-navy);
    border-radius: 50%;
    background: var(--agw-color-white);
    color: var(--agw-color-navy);
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.agw-rvw-ctrl button:hover {
    border-color: var(--agw-color-primary);
    background: var(--agw-color-primary);
    color: var(--agw-color-white);
}

.agw-rvw-track {
    display: grid;
    grid-auto-columns: min(440px, 86%);
    grid-auto-flow: column;
    gap: 20px;
    align-items: stretch; /* every card as tall as the tallest, also when a review is opened */
    padding-bottom: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.agw-rvw-card {
    display: flex;
    flex-direction: column;
    gap: 26px;
    margin: 0;
    padding: clamp(20px, 2.6vw, 32px);
    border: 1px solid var(--agw-color-cool-line);
    border-radius: 14px;
    background: var(--agw-color-cool);
    scroll-snap-align: start;
}

.agw-rvw-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.agw-rvw-label {
    padding: 4px 8px;
    border-radius: 6px;
    background: #fbefd9;
    color: #7a4b00;
    font-family: var(--agw-font-mono);
    font-size: var(--agw-fs-label);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Gold stars (3:1 on the card, as a graphic needs); empty stars in the card line colour. */
.agw-rvw-stars {
    display: flex;
    gap: 3px;
}

.agw-rvw-stars svg {
    display: block;
    fill: #b7791f;
}

.agw-rvw-stars svg.is-off {
    fill: var(--agw-color-cool-line);
}

/* Three lines; "Read more" (global_reviews.js) shows only when the text is longer. */
.agw-rvw-card blockquote {
    display: -webkit-box;
    min-height: 3lh;
    margin: 0;
    overflow: hidden;
    color: var(--agw-color-navy);
    font-size: var(--agw-fs-quote);
    font-weight: 500;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.agw-rvw-card blockquote.is-open {
    display: block;
}

.agw-rvw-more {
    align-self: flex-start;
    margin-top: -14px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--agw-color-primary);
    font: inherit;
    font-size: var(--agw-fs-text);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.agw-rvw-more:hover {
    color: var(--agw-color-primary-dark);
}

/* No "Read more": keep its space so every card in the row is the same height. */
.agw-rvw-more[hidden] {
    display: block;
    visibility: hidden;
}

.agw-rvw-person {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--agw-color-cool-line);
}

.agw-rvw-avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #dbe6f8;
    color: var(--agw-color-primary-dark);
    font-size: 15px;
    font-weight: 600;
}

.agw-rvw-person strong {
    display: block;
    color: var(--agw-color-navy);
    font-size: var(--agw-fs-text);
}

.agw-rvw-person small {
    color: var(--agw-color-muted);
    font-size: var(--agw-fs-note);
}

.agw-rvw-card.is-empty {
    justify-content: center;
    border-style: dashed;
    background: var(--agw-color-white);
}

@media (max-width: 991px) {
    .agw-rvw-head {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Phones: the button moves to the arrows row (right side). */
@media (max-width: 575px) {
    .agw-rvw-head {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .agw-rvw-head > div:not(.agw-rvw-ctrl),
    .agw-rvw-text {
        grid-column: 1 / -1;
    }

    .agw-rvw-all {
        position: static;
        order: 5;
        grid-column: 2;
        justify-self: end;
        transform: none;
    }

    .agw-rvw-ctrl {
        order: 4;
    }
}
