/* --- Component: review summary header (src/templates/components/product_review_header.php) ---
   Promoted out of product.css — this partial is now shared between the product detail page
   and the /recenze listing page (see reviews_page.php), so it belongs in the shared layer,
   not a single page's own stylesheet. Content/behavior unchanged, only the file moved. */
.prs-header-stats {
    display: grid;
    grid-template-columns: max-content max-content;
    align-items: stretch;
    column-gap: 48px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.prs-header-top {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.prs-header-avg {
    text-align: center;
    min-width: 140px;
}

.prs-header-avg-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1.1;
}

.prs-header-avg-stars { font-size: 1.2rem; margin: 4px 0; }

.prs-header-avg-label {
    font-size: .85rem;
    color: #888;
}

.prs-header-breakdown {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
}

.prs-breakdown-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
}

.prs-breakdown-star { width: 28px; color: #555; flex-shrink: 0; }

.prs-breakdown-bar {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    min-width: 80px;
}

.prs-breakdown-bar-fill {
    height: 100%;
    background: #f5c518;
    border-radius: 4px;
}

.prs-breakdown-count { width: 36px; text-align: right; color: #888; flex-shrink: 0; }

.prs-header-metrics {
    display: grid;
    grid-template-columns: max-content max-content;
    gap: 16px 28px;
    align-content: space-between;
}

.prs-metric {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 100px;
}

.prs-metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--clr-beige);
    color: var(--clr-apricot, #f4a261);
    flex-shrink: 0;
}

.prs-metric-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.prs-metric-label {
    font-size: .8rem;
    color: #888;
    line-height: 1.3;
}

/* Metric without a big number: reserve the number's line height above the label so the label
   sits on the same line as the labels of the metrics that do have one. */
.prs-metric--label-only .prs-metric-label {
    padding-top: calc(1.4rem * 1.2);
}

/* The tooltip box itself is the global .sk-tooltip component (styles.css); the page sets its
   --tt-offset / --tt-max-width per element so it stays inside the viewport. */
.prs-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ddd;
    color: #fff;
    font-size: .65rem;
    line-height: 1;
    font-weight: 700;
    vertical-align: middle;
    padding-bottom: 1px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .prs-header-stats { grid-template-columns: 1fr; row-gap: 20px; }
    /* Side by side (average number+stars, then the per-star bars), not stacked — the row
       just gets a smaller gap and both halves shrink to fit instead of each reserving
       their full desktop min-width. */
    .prs-header-top { flex-direction: row; align-items: center; gap: 16px; width: 100%; }
    .prs-header-avg { min-width: 0; flex-shrink: 0; }
    .prs-header-breakdown { min-width: 0; flex: 1; }
    .prs-header-metrics { grid-template-columns: 1fr 1fr; width: 100%; justify-content: center; }
}
