/* Ratings as seller and as buyer (redesign 2026-11-09: Ocjene-profil,
   Ocjene-mobile, Ocjene-mjesta). Tokens only. */

/* Rating form: the role's question and its quick tags (Ocjene-mjesta, 4). */
.fbq__question { margin: var(--space-3) 0 var(--space-2); font: 800 14px/1.4 var(--font-sans); color: var(--ink); }
.fbq__tags { margin: 0 0 var(--space-3); padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.fbq__legend { padding: 0; margin-bottom: var(--space-2); font: 600 13px/1.4 var(--font-sans); color: var(--muted); }
.fbq__tag { position: relative; display: inline-flex; align-items: center; min-height: var(--touch-target); cursor: pointer; }
.fbq__tag input { position: absolute; opacity: 0; pointer-events: none; }
.fbq__tag span { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); font: 700 13px/1.2 var(--font-sans); color: var(--ink-2); }
.fbq__tag input:checked + span { background: var(--blue-100); border-color: var(--blue-700); color: var(--blue-700); }
.fbq__tag input:checked + span::before { content: "✓"; }
.fbq__tag input:focus-visible + span { outline: 2px solid var(--blue-700); outline-offset: 2px; }

/* ── Profile head: both reputations (Ocjene-profil) ───────────────────── */
.pshead .psscores { grid-area: stats; margin-top: var(--space-5); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.psscore { display: flex; flex-direction: column; gap: 10px; padding: 18px var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.psscore p { margin: 0; }
.psscore__head { display: flex; align-items: center; gap: 10px; }
.psscore__icon { flex: none; color: var(--blue-700); }
.psscore__label { font: 800 15px/1.3 var(--font-sans); color: var(--ink); }
.psscore__deals { margin-left: auto; font: 600 13px/20px var(--font-sans); color: var(--muted); }
.psscore__figure { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-2); }
.psscore__pct { font: 800 36px/40px var(--font-sans); color: var(--ink); }
.psscore__sub { font: 600 14px/20px var(--font-sans); color: var(--muted); }
.psscore__none { font: 600 14px/20px var(--font-sans); color: var(--muted); }
.psmeter.psscore__bar, .ratings--sides .psmeter { height: 8px; }
.psmeter.psscore__bar::-webkit-meter-bar, .ratings--sides .psmeter::-webkit-meter-bar { height: 8px; background: #E9EDF2; }
.ratings--sides .psmeter--neg { --ps-meter: var(--red-700); }

/* The head itself, at the design's size: 64 px avatar, 28 px name. */
.pshead .avatar--xl { width: 64px; height: 64px; font-size: 20px; }
.pshead .sellerhead__top { gap: var(--space-4); }
.pshead .sellerhead__name { font-size: 28px; line-height: 34px; }
.pshead .sellerhead__meta { margin-top: var(--space-1); font-size: 14px; }

/* ── Ocjene tab: a side per block on the left, the switch over the list ── */
.ratings.ratings--sides { grid-template-columns: 300px minmax(0, 1fr); }
.ratings--sides .ratings__summary { display: flex; flex-direction: column; gap: 14px; }
.ratings--sides .ratings__summary p { margin: 0; }
.ratings--sides .ratings__row { margin: -6px 0 0; grid-template-columns: 86px 1fr 28px; gap: 10px; }
.ratings--sides .ratings__side + .ratings__row { margin-top: 0; }
.ratings--sides .ratings__row b { font-variant-numeric: tabular-nums; }
.ratings__side { font: 800 15px/1.3 var(--font-sans); color: var(--ink); }
.ratings__none, .ratings__note { font: 600 13px/20px var(--font-sans); color: var(--muted); }
.ratings__rule { width: 100%; height: 1px; margin: 0; border: 0; background: var(--border); }

.psswitch { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.psswitch__roles, .psswitch__tones { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.psswitch__rule { width: 1px; height: 28px; margin: 0 var(--space-1); background: var(--border); }
.psseg, .psseg:visited { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--space-4); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); background: var(--surface); font: 700 14px/1 var(--font-sans); color: var(--ink-2); text-decoration: none; }
.psseg:hover { border-color: var(--blue-700); color: var(--blue-700); text-decoration: none; }  /* not the site-wide a:hover underline: these are pills */
.psseg[aria-current="true"] { background: var(--blue-100); border-color: var(--blue-700); color: var(--blue-700); }
.psseg__n { font-weight: 600; color: var(--muted); }
.psseg[aria-current="true"] .psseg__n { color: var(--blue-700); }

body .ratings .fback { display: flex; flex-direction: column; gap: var(--space-2); padding: 18px var(--space-5); }
body .ratings .fback > p, body .ratings .fback__reply p { margin: 0; }
body .ratings .fback__head { gap: var(--space-2); font: 600 13px/1.3 var(--font-sans); }
body .ratings .fback__role { background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink-2); font-size: 12px; }
body .ratings .fback__body { font: 600 15px/24px var(--font-sans); }
body .ratings .fback__lot { font: 600 13px/20px var(--font-sans); }
body .ratings .fback__reply { margin: var(--space-1) 0 0; border-left: 0; display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) 14px; border-radius: var(--radius-md); background: var(--ground); }
body .ratings .fback__replyhead { font: 800 13px/1.3 var(--font-sans); color: var(--ink); }
body .ratings .fback__reply p:last-child { font: 500 14px/22px var(--font-sans); color: var(--ink-2); }

/* The rated member's own answer, on their own profile. */
.fback__answer summary { display: inline-flex; align-items: center; min-height: var(--touch-target); font: 800 14px/1 var(--font-sans); color: var(--blue-700); cursor: pointer; }
.fback__answer form { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.fback__answerlabel { font: 700 13px/1.3 var(--font-sans); color: var(--ink); }
.fback__answertext { width: 100%; box-sizing: border-box; padding: var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-md); font: 500 15px/1.5 var(--font-sans); color: var(--ink); }
.fback__answerhint { margin: 0; font: 500 13px/1.4 var(--font-sans); color: var(--muted); }

/* ── Phone (Ocjene-mobile) ─────────────────────────────────────────────── */
@media (max-width: 700px) {
    .pshead .psscores { margin-top: var(--space-3); gap: var(--space-2); }
    .pshead .psscore { gap: 2px; padding: var(--space-3); background: var(--navy-800); border: 0; border-radius: 12px; }
    .pshead .psscore__icon { display: none; }
    .pshead .psscore__label { font: 700 12px/1.3 var(--font-sans); color: var(--border-strong); }
    .pshead .psscore__pct { font-size: 24px; line-height: 30px; color: var(--surface); }
    .pshead .psscore__sub, .pshead .psscore__none { font: 600 12px/1.4 var(--font-sans); color: var(--border-strong); }
    .pshead .psscore__none { padding-top: var(--space-1); }

    /* "O članu" is a tab on the phone too. */
    body .sellertabs .sellertabs__about { display: inline-flex; }
    body .sellertabs a, body .sellertabs a:visited { font-size: 15px; min-height: 48px; }

    .ratings.ratings--sides { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
    .psswitch { margin-bottom: var(--space-3); }
    .psswitch__roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-1); width: 100%; padding: var(--space-1); background: #E9EDF2; border-radius: 12px; }
    .psswitch__roles .psseg, .psswitch__roles .psseg:visited { justify-content: center; min-height: 40px; padding: 0 var(--space-1); border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); }
    .psswitch__roles .psseg__n { color: inherit; font-weight: inherit; }
    .psswitch__roles .psseg[aria-current="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(11, 37, 64, .2); color: var(--ink); font-weight: 800; }
    .psdist { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-1); margin: 0 0 var(--space-3); padding: var(--space-1) 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; font: 700 13px/1 var(--font-sans); color: var(--ink-2); }
    .psdist a, .psdist a:visited, .psdist a:hover { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink-2); text-decoration: none; }
    .psdist .psdist__pos, .psdist .psdist__pos:visited, .psdist .psdist__pos:hover { color: var(--green-700); }
    .psdist .psdist__neg, .psdist .psdist__neg:visited, .psdist .psdist__neg:hover { color: var(--red-700); }
    .psdist a[aria-current="true"] { text-decoration: underline; text-underline-offset: 3px; }

    body .ratings .fback { padding: 14px var(--space-4); }
    body .ratings .fback__head { font-size: 12px; }
    body .ratings .fback__body { line-height: 22px; }
    /* The answer hangs under the card as its own strip. */
    body .ratings .fback--replied { padding-bottom: 0; }
    body .ratings .fback__reply { flex-direction: row; flex-wrap: wrap; gap: 0 var(--space-1); margin: var(--space-1) calc(-1 * var(--space-4)) 0; padding: 10px 14px; background: var(--surface); border-top: 1px solid var(--border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
    body .ratings .fback__replyhead { font-size: 13px; }
    body .ratings .fback__replyhead::after { content: ":"; }
    body .ratings .fback__replydate { display: none; }
    body .ratings .fback__reply p:last-child { font-size: 13px; line-height: 20px; color: var(--ink-2); }
}

/* Listing page seller box: the buyer figure, small (Ocjene-mjesta, 2). */
.sellercard__buyer { margin: var(--space-2) 0 0; font: 600 13px/20px var(--font-sans); color: var(--muted); }
.sellercard__buyer b { color: var(--ink); }

/* A buyer's score where a seller looks at them (Ocjene-mjesta, 3). */
.buyerscore { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-2); }
.buyerscore__tag { background: var(--green-100); color: var(--green-700); font-size: 12px; }
.buyerscore__count { font: 600 13px/20px var(--font-sans); color: var(--muted); }
