/* Merchant numbers and rating of pay.snapex.pro (owner 20.10): /merchants, /m/{slug}/reviews and the home page block. */

.pm-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 28px 0 0;
    max-width: 860px;
}
.pm-stat {
    background: var(--pl-bg);
    border: 1px solid var(--pl-line);
    border-radius: var(--pl-radius);
    padding: 18px 20px;
    box-shadow: var(--pl-shadow);
}
.pm-stat dt {
    margin: 0;
    /* Up to 10 characters ($1,000,000) fit a third of the 860px row; narrower screens shrink it. */
    font-size: clamp(22px, 3vw, 36px);
    white-space: nowrap;
    font-weight: 800;
    line-height: 1.1;
    color: var(--pl-ink);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.pm-stat dd {
    margin: 6px 0 0;
    color: var(--pl-muted);
    font-size: 14px;
    line-height: 1.4;
}
.pm-note {
    margin: 16px 0 0;
    max-width: 760px;
    color: var(--pl-muted);
    font-size: 14px;
    line-height: 1.55;
}
.pm-empty { color: var(--pl-muted); }

.pm-star { color: #b45309; }

/* Avatars: round, the same 40px everywhere in lists. */
.pm-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--pl-bg-alt);
    box-shadow: 0 0 0 1px var(--pl-line);
}
.pm-avatar--mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pl-ink);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}
.pm-avatar--lg { width: 72px; height: 72px; flex-basis: 72px; font-size: 28px; }

/* Rating list */
.pm-list {
    border: 1px solid var(--pl-line);
    border-radius: var(--pl-radius);
    overflow: hidden;
    background: var(--pl-bg);
}
.pm-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 2.6fr) minmax(70px, 0.8fr) minmax(80px, 0.8fr) minmax(110px, 1fr) minmax(110px, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid var(--pl-line);
}
.pm-row--head {
    border-top: 0;
    background: var(--pl-bg-alt);
    color: var(--pl-muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 10px;
    padding-bottom: 10px;
}
.pm-col-rank { color: var(--pl-muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.pm-merchant { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pm-merchant__text { display: flex; flex-direction: column; min-width: 0; }
.pm-merchant__name {
    color: var(--pl-ink);
    font-weight: 700;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pm-merchant__name:hover { color: var(--pl-accent-2); }
.pm-merchant__site {
    color: var(--pl-muted);
    font-size: 13px;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pm-merchant__site:hover { text-decoration: underline; }
.pm-rating b, .pm-num b { color: var(--pl-ink); font-variant-numeric: tabular-nums; }
.pm-label { display: none; }
.pm-more { text-align: end; }
.pm-more a { color: #047857; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pm-more a:hover { text-decoration: underline; }

@media (max-width: 760px) {
    /* Turnover on a row of its own on top, payments and merchants side by side under it. */
    .pm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .pm-stat { padding: 12px 14px; border-radius: 12px; min-width: 0; }
    .pm-stat--wide { grid-column: 1 / -1; order: -1; }
    .pm-stat dt { font-size: clamp(22px, 7vw, 28px); }
    .pm-stat--wide dt { font-size: clamp(26px, 8.5vw, 34px); }
    .pm-stat dd { font-size: 12.5px; }
    .pm-merchant__name { white-space: normal; overflow-wrap: anywhere; }
    .pm-row--head { display: none; }
    .pm-row {
        grid-template-columns: 28px minmax(0, 1fr) auto;
        grid-template-areas: "rank merchant rating" ". sales turnover" ". more more";
        row-gap: 8px;
        padding: 14px 16px;
    }
    .pm-row:nth-child(2) { border-top: 0; }
    .pm-row > .pm-col-rank { grid-area: rank; }
    .pm-row > .pm-merchant { grid-area: merchant; }
    .pm-row > .pm-rating { grid-area: rating; }
    .pm-row > .pm-num:nth-of-type(4) { grid-area: sales; }
    .pm-row > .pm-num:nth-of-type(5) { grid-area: turnover; text-align: end; }
    .pm-row > .pm-more { grid-area: more; text-align: start; }
    .pm-label { display: inline; color: var(--pl-muted); font-size: 13px; }
}

/* Home page block */
.pm-home__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.pm-home__copy h2 { margin: 12px 0 10px; }
.pm-home__copy > p { color: var(--pl-muted); max-width: 560px; margin: 0; }
.pm-home .pm-stats { margin: 22px 0 24px; }
.pm-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pm-top__item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    grid-template-areas: "logo name meta" "logo sales meta";
    column-gap: 12px;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid var(--pl-line);
    border-radius: 14px;
    background: var(--pl-bg);
    text-decoration: none;
    box-shadow: var(--pl-shadow);
    transition: border-color .15s ease;
}
.pm-top__item:hover { border-color: var(--pl-accent); }
.pm-top__item .pm-avatar { grid-area: logo; }
.pm-top__name { grid-area: name; color: var(--pl-ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-top__sales { grid-area: sales; color: var(--pl-muted); font-size: 13px; }
.pm-top__meta { grid-area: meta; color: var(--pl-ink); font-weight: 700; }
@media (max-width: 860px) {
    .pm-home__grid { grid-template-columns: 1fr; gap: 28px; }
}

/* One merchant */
.pm-head { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
.pm-head h1 { margin: 0 0 6px; }
.pm-head__meta { margin: 0; color: var(--pl-muted); }
.pm-head__meta a { color: #047857; font-weight: 600; }
.pm-score {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 28px;
    margin-top: 28px;
    max-width: 860px;
    padding: 22px 24px;
    background: var(--pl-bg);
    border: 1px solid var(--pl-line);
    border-radius: var(--pl-radius);
    box-shadow: var(--pl-shadow);
}
.pm-score__main { display: flex; flex-direction: column; gap: 6px; }
.pm-score__value { font-size: 44px; font-weight: 800; line-height: 1; color: var(--pl-ink); }
.pm-score__label { color: var(--pl-muted); font-size: 14px; }
.pm-score__label b { color: var(--pl-ink); }
.pm-bars { display: grid; gap: 6px; align-content: center; }
.pm-bar { display: grid; grid-template-columns: 34px minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 14px; color: var(--pl-muted); }
.pm-bar__track { height: 8px; border-radius: 999px; background: var(--pl-bg-alt); box-shadow: inset 0 0 0 1px var(--pl-line); overflow: hidden; }
.pm-bar__fill { display: block; height: 100%; background: var(--pl-accent); border-radius: 999px; }
.pm-bar__n { text-align: end; font-variant-numeric: tabular-nums; }
.pm-reviews-wrap { max-width: 860px; }
.pm-reviews-wrap h2 { margin-bottom: 18px; }
.pm-review { padding: 16px 0; border-bottom: 1px solid var(--pl-line); }
.pm-review__head { display: flex; justify-content: space-between; gap: 12px; color: var(--pl-muted); font-size: 14px; }
.pm-review__stars { color: #b45309; letter-spacing: 2px; }
.pm-review__off { color: #cbd5e1; }
.pm-review__text { margin: 8px 0 0; color: var(--pl-text); white-space: pre-line; overflow-wrap: anywhere; }
.pm-how { margin-top: 32px; padding: 20px 22px; background: var(--pl-bg-alt); border: 1px solid var(--pl-line); border-radius: var(--pl-radius); color: var(--pl-text); }
.pm-how h3 { margin: 0 0 8px; font-size: 17px; color: var(--pl-ink); }
.pm-how p { margin: 6px 0 0; line-height: 1.55; }
.pm-how a { color: #047857; font-weight: 600; }
@media (max-width: 640px) {
    .pm-score { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
    .pm-head { align-items: flex-start; }
    .pm-avatar--lg { width: 56px; height: 56px; flex-basis: 56px; }
}

/* Home page: the stats sit in the left column; turnover gets a row of its own at every width. */
.pm-home .pm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pm-home .pm-stat--wide { grid-column: 1 / -1; order: -1; }
/* The numbers are dir="ltr" (Latin digits, $ first); in RTL pages they still line up with their labels on the right. */
[dir="rtl"] .pm-stat dt { text-align: right; }
