/* Catalog style "demo33" — rating + comments add-on (loaded instead of _rate.css): the rating and the comment box as steps of the sign-up form. Mirrors /demo33/. */
/*
 * Cards: the score in a small dark disc-pill with a yellow number, comments as a quiet link.
 * Post: the rating is a form card — a step disc and Lazurski title, the score in big yellow
 * Lazurski, the 1–10 scale as round number chips (dark discs with yellow numbers like the step
 * badges; picked = green fill), "Rate" as the big full-width green button. Comments are dark
 * cards with a yellow quote disc; the form is the sign-up card: Poppins labels, 50 px dark
 * fields with a green focus ring, the big green button.
 */

/* card counters */
.post__stats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: -4px 0 14px; color: var(--muted); font-size: 14px; }
.post__rating { display: inline-flex; align-items: baseline; gap: 2px; padding: 4px 12px; border-radius: 50px; background: var(--surface-2); color: var(--yellow); font: 600 14px/1.2 var(--label); }
.post__rating::before { content: "Score"; margin-right: 8px; color: var(--muted); font: 400 12px/1 var(--text); letter-spacing: 0.04em; }
.post__rating-avg { font-size: 14px; }
.post__rating-max { color: var(--muted); font-size: 12px; font-weight: 500; }
.post__comments { color: rgb(255 255 255 / 0.8); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.post__comments:hover { color: #fff; text-decoration-color: currentColor; }

/* the flash after posting / voting */
.post__flash { margin: 48px 0 0; }

/* rating = a form step */
.rating, .comments { margin-top: 56px; }
.rating {
    position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 28px; padding: 30px 32px 28px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-r); box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.8);
}
.rating__title, .comments__title { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; color: var(--ink); font: 700 32px/1.12 var(--serif); }
.rating__title::before, .comments__title::before {
    flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2);
    color: var(--yellow); font: 600 14px/1 var(--label);
}
.rating__title::before { content: "★"; font-size: 15px; }
.comments__title::before { content: "“"; font: 700 24px/1 var(--serif); padding-top: 8px; }
.rating__title { grid-column: 1 / -1; }
.rating__title::after { content: ""; flex: 1; height: 0; }
.rating__score { display: flex; flex-direction: column; align-items: flex-start; margin: 0; padding: 4px 28px 0 0; border-right: 1px dashed var(--line-strong); }
.rating__avg { color: var(--yellow); font: 700 76px/0.9 var(--serif); }
.rating__max { margin-top: 6px; color: var(--muted); font: 600 14px/1 var(--label); letter-spacing: 0.06em; }
.rating__count { margin-top: 14px; color: var(--muted); font-size: 14px; }
.rating__form { display: grid; gap: 18px; min-width: 0; }
.rating__scale { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.rating__legend { width: 100%; margin-bottom: 12px; padding: 0; color: rgb(255 255 255 / 0.88); font: 600 13px/1.4 var(--label); }
.rating__opt { position: relative; }
.rating__input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.rating__num {
    display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--field);
    color: var(--yellow); font: 600 16px/1 var(--label); cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rating__opt:hover .rating__num { border-color: rgb(255 255 255 / 0.45); color: #fff; }
.rating__input:checked + .rating__num { background: var(--green-fill); border-color: var(--green-fill); color: #fff; box-shadow: 0 0 0 3px rgb(70 154 88 / 0.5); }
.rating__input:focus-visible + .rating__num { outline: 2px solid var(--yellow); outline-offset: 3px; }
.rating__submit {
    width: 100%; min-height: 56px; border-radius: 14px; background: var(--green-fill); color: #fff; font: 600 16px/1 var(--label);
    letter-spacing: 0.02em; text-decoration: none; transition: background 0.2s;
}
.rating__submit:hover { background: var(--green-deep); color: #fff; }
.rating__mine { align-self: center; margin: 0; color: var(--soft); line-height: 1.6; }
.rating__mine-score {
    display: inline-grid; place-items: center; min-width: 46px; height: 46px; margin: 0 6px; padding: 0 8px; border-radius: 50%;
    background: var(--green-fill); color: #fff; font: 600 18px/1 var(--label); vertical-align: middle;
}

/* comments */
.comments__count { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 10px; border-radius: 16px; background: var(--surface-2); color: var(--yellow); font: 600 14px/1 var(--label); }
.comments__list { display: grid; gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; }
.comment { padding: 20px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.comment__author { color: var(--ink); font: 600 15px/1.3 var(--label); }
.comment__author::before { content: "@"; color: var(--yellow); }
.comment__body { color: rgb(255 255 255 / 0.84); overflow-wrap: anywhere; }
.comments__empty { margin: 0 0 22px; color: var(--muted); }
.comment-form {
    display: grid; gap: 20px; padding: 30px 32px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-r);
    box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.8);
}
.comment-form__field { display: grid; gap: 8px; margin: 0; }
.comment-form__label { color: rgb(255 255 255 / 0.88); font: 600 13px/1.2 var(--label); letter-spacing: 0.02em; }
.comment-form__input, .comment-form__text {
    width: 100%; min-width: 0; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--field-r); background: var(--field); color: #fff;
    font: 400 16px/1.5 var(--text); transition: border-color 0.2s, box-shadow 0.2s;
}
.comment-form__input { height: 50px; max-width: 420px; }
.comment-form__text { min-height: 130px; padding: 13px 16px; resize: vertical; }
.comment-form__input:focus, .comment-form__text:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgb(70 154 88 / 0.5); }
.comment-form__actions { display: grid; gap: 12px; margin: 0; }
.comment-form__submit { width: 100%; min-height: 56px; font-size: 16px; }
.comment-form__note { color: var(--muted); font-size: 13.5px; line-height: 1.5; }

@media (max-width: 600px) {
    .rating { grid-template-columns: minmax(0, 1fr); padding: 22px 16px; border-radius: 18px; }
    .rating__score { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 20px; padding: 0 0 18px; border-right: 0; border-bottom: 1px dashed var(--line-strong); }
    .rating__avg { font-size: 60px; }
    .rating__count { flex-basis: 100%; margin-top: 4px; }
    .rating__title, .comments__title { font-size: 26px; }
    .rating__scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
    .rating__num { width: 100%; height: auto; aspect-ratio: 1; max-width: 58px; justify-self: center; }
    .rating__opt { display: grid; }
    .comment-form { padding: 22px 16px; border-radius: 18px; }
    .comment { padding: 16px 18px; }
}
