/* Catalog style "demo20" — rating + comments add-on (loaded instead of _rate.css): glass tiles, green pills, yellow score. Mirrors /demo20/. */
/*
 * Cards: the score as a small yellow pill, comments as a menu-grey link. Post: the rating is a
 * glass tile with a big Poppins score and the 1–10 scale as round tappable buttons (picked =
 * yellow, like the site's accent); comments are tiles with a green initial ring; the form uses
 * dark inputs with a green focus glow and the solid "Join DEPO" pill as the submit.
 */

/* card counters */
.post__stats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: -2px 0 12px; color: var(--mute); font-size: 14px; }
.post__rating { display: inline-flex; align-items: baseline; gap: 2px; padding: 2px 10px; border: 1px solid rgb(255 181 0 / 0.45); border-radius: 50px; color: var(--yellow); font-weight: 700; }
.post__rating-avg { font-size: 15px; }
.post__rating-max { color: rgb(255 181 0 / 0.8); font-size: 12px; font-weight: 400; }
.post__comments { color: var(--menu); text-decoration: none; }
.post__comments::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--green-text); vertical-align: middle; }
.post__comments:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

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

/* rating */
.rating, .comments { margin-top: 44px; }
.rating {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 6px 36px; padding: 26px 28px;
    background: var(--tile); border: 1px solid var(--line); border-radius: var(--radius); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.rating__title, .comments__title { margin: 0 0 14px; font: 600 26px/1.2 var(--head); color: var(--ink); }
.rating__title { grid-column: 1 / -1; }
.rating__score { display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: start; gap: 0 6px; margin: 0; }
.rating__avg { font: 600 64px/1 var(--head); color: var(--yellow); letter-spacing: -0.02em; }
.rating__max { color: var(--mute); font-size: 18px; font-weight: 700; }
.rating__count { grid-column: 1 / -1; margin-top: 8px; color: var(--mute); font-size: 14px; }
.rating__form, .rating__mine { align-self: center; }
.rating__form { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; min-width: 0; }
.rating__scale { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.rating__legend { width: 100%; margin-bottom: 10px; padding: 0; color: var(--menu); font-size: 14px; }
.rating__opt { position: relative; }
.rating__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.rating__num {
    display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; background: rgb(0 0 0 / 0.25);
    color: var(--ink); font: 600 16px/1 var(--head); cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rating__opt:hover .rating__num { border-color: var(--green-text); color: var(--green-text); }
.rating__input:checked + .rating__num { background: var(--yellow); border-color: var(--yellow); color: #18171a; box-shadow: 0 0 22px rgb(255 181 0 / 0.35); }
.rating__input:focus-visible + .rating__num { outline: 2px solid var(--yellow); outline-offset: 3px; }
.rating__submit { min-height: 44px; cursor: pointer; }
.rating__mine { margin: 0; padding: 16px 20px; border-radius: 16px; background: rgb(70 154 88 / 0.14); color: rgb(255 255 255 / 0.86); line-height: 1.5; }
.rating__mine-score { display: inline-grid; place-items: center; min-width: 40px; height: 40px; margin: 0 4px; padding: 0 8px; border-radius: 50%; background: var(--yellow); color: #18171a; font: 600 18px/1 var(--head); vertical-align: middle; }

/* comments */
.comments__title { display: flex; align-items: center; gap: 12px; }
.comments__count { display: inline-grid; place-items: center; min-width: 34px; height: 28px; padding: 0 10px; border-radius: 50px; background: var(--green-fill); color: #fff; font: 700 14px/1 var(--text); }
.comments__list { display: grid; gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; }
.comment { position: relative; padding: 18px 22px 18px 74px; background: var(--tile); border: 1px solid var(--line); border-radius: var(--radius); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.comment::before { content: ""; position: absolute; left: 22px; top: 20px; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--green-text); background: radial-gradient(circle, rgb(83 245 126 / 0.35), rgb(83 245 126 / 0) 70%); }
.comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 6px; color: var(--mute); font-size: 13px; }
.comment__author { color: var(--ink); font: 600 16px/1.3 var(--head); }
.comment__body { color: rgb(255 255 255 / 0.84); overflow-wrap: anywhere; }
.comments__empty { margin: 0 0 22px; color: var(--mute); }
.comment-form { display: grid; gap: 16px; padding: 24px 28px; background: var(--tile); border: 1px solid var(--line); border-radius: var(--radius); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.comment-form__field { display: grid; gap: 6px; margin: 0; }
.comment-form__label { color: var(--menu); font-size: 14px; font-weight: 700; }
.comment-form__input, .comment-form__text { width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: rgb(0 0 0 / 0.32); color: var(--ink); font: inherit; }
.comment-form__input { max-width: 380px; }
.comment-form__text { min-height: 120px; resize: vertical; }
.comment-form__input:focus, .comment-form__text:focus { border-color: var(--green-text); outline: none; box-shadow: 0 0 0 3px rgb(83 245 126 / 0.22); }
.comment-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; }
.comment-form__submit { min-height: 42px; cursor: pointer; }
.comment-form__note { color: var(--mute); font-size: 13px; }

@media (max-width: 760px) {
    .rating { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; }
    .comment-form { padding: 20px 18px; }
    .comment { padding: 16px 16px 16px 62px; }
    .comment::before { left: 16px; top: 18px; width: 30px; height: 30px; }
}
@media (max-width: 400px) {
    .rating__num { width: 40px; height: 40px; }
}
