/*
 * Catalog style "demo2" — rating + comments add-on (loaded instead of _rate.css when
 * index.php?style=demo2 is shown). Mirrors /demo2/ like demo2.css.
 */
/* rating + comments */
/* Card: the score in gold Lazurski beside a green-underlined comment count. */
.post__stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin: -4px 0 14px; color: var(--grey); font-size: 14px; }
.post__rating { display: inline-flex; align-items: baseline; gap: 3px; }
.post__rating::before { content: "★"; align-self: center; margin-right: 4px; color: var(--green); font-size: 13px; }
.post__rating-avg { font: 700 20px/1 var(--serif); color: var(--gold); letter-spacing: 0.02em; }
.post__rating-max { color: var(--grey); font-size: 13px; }
.post__comments { color: #fff; text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.post__comments:hover { color: var(--gold); text-decoration-color: var(--gold); }

/* Post: the "speed of your vision" panels — gold serif capitals, green accents, surface cards. */
.post__flash { max-width: 780px; margin: 40px auto 0; text-align: left; }
.notice--ok { border-left: 3px solid var(--green); background: rgb(70 154 88 / 0.14); color: #d5ecd9; }

.rating, .comments { max-width: 780px; margin: clamp(56px, 7vw, 88px) auto 0; }
.rating {
    position: relative; overflow: hidden; padding: clamp(24px, 4vw, 44px); border-radius: 14px; text-align: center;
    background: radial-gradient(ellipse 70% 90% at 50% 0%, rgb(70 154 88 / 0.22), transparent 70%), var(--surface);
    box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.8);
}
.rating__title, .comments__title { margin: 0 0 8px; font: 700 clamp(24px, 2.8vw, 36px)/1.15 var(--serif); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.rating__title::before, .rating__title::after { content: "—"; margin: 0 0.4em; color: var(--green); }
.rating__score { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 10px; margin: 0 0 clamp(20px, 3vw, 30px); }
.rating__avg { font: 700 clamp(72px, 9vw, 116px)/1 var(--serif); color: var(--gold); text-shadow: 0 0 40px rgb(255 181 0 / 0.25); }
.rating__max { font: 700 20px/1 var(--serif); color: var(--grey); letter-spacing: 0.08em; }
.rating__count { flex-basis: 100%; color: var(--grey); font-size: 14px; letter-spacing: 0.04em; }
.rating__form { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.rating__scale { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.rating__legend { width: 100%; margin-bottom: 14px; padding: 0; color: #fff; font: 700 12px/1.2 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; text-align: center; }
.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); border-radius: 50%; background: var(--bg);
    color: #fff; font: 700 20px/1 var(--serif); cursor: pointer; user-select: none; transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
}
.rating__opt:hover .rating__num { border-color: var(--green); color: var(--gold); }
.rating__opt.is-mine .rating__num { border-color: var(--green); }
.rating__input:checked + .rating__num { background: var(--gold); border-color: var(--gold); color: #18171a; box-shadow: 0 0 24px rgb(255 181 0 / 0.35); }
.rating__input:focus-visible + .rating__num { outline: 2px solid var(--gold); outline-offset: 3px; }
.rating__submit { padding: 0 30px; border: 0; border-radius: 999px; background: var(--green-deep); color: #fff; text-decoration: none; cursor: pointer; transition: background 200ms ease; }
.rating__submit:hover { background: #255d31; color: #fff; }

.comments__title { margin-bottom: 24px; text-align: center; }
.comments__count { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; margin-left: 6px; padding: 0 0.3em; border-radius: 999px; background: var(--green-deep); color: #fff; font: 700 0.6em/1 var(--sans); letter-spacing: 0; vertical-align: 0.3em; }
.comments__list { display: grid; gap: 14px; margin: 0 0 32px; padding: 0; list-style: none; }
.comment { padding: 18px 22px; border-radius: 10px; border-left: 3px solid var(--green); background: var(--surface); }
.comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 6px; }
.comment__author { font: 700 19px/1.2 var(--serif); color: var(--gold); letter-spacing: 0.02em; }
.comment__date { color: var(--grey); font-size: 13px; }
.comment__body { color: #d9d9dd; font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.comments__empty { margin: 0 0 32px; padding: 22px; border-radius: 10px; border: 1px dashed var(--line); color: var(--grey); text-align: center; }
.comment-form { display: grid; gap: 18px; padding: clamp(20px, 3vw, 32px); border-radius: 14px; background: rgb(34 33 37 / 0.92); border: 1px solid var(--line); }
.comment-form__field { display: grid; gap: 8px; margin: 0; }
.comment-form__label { font: 700 13px/1 var(--serif); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.comment-form__input, .comment-form__text {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: #fff;
    font: 400 16px/1.5 var(--sans); transition: border-color 200ms ease, box-shadow 200ms ease;
}
.comment-form__input { max-width: 380px; min-height: 48px; }
.comment-form__text { min-height: 130px; resize: vertical; }
.comment-form__input:focus, .comment-form__text:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgb(255 181 0 / 0.25); }
.comment-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 4px 0 0; }
.comment-form__submit { border: 0; cursor: pointer; }
.comment-form__note { color: var(--grey); font-size: 13px; }
@media (max-width: 520px) {
    .rating__title::before, .rating__title::after { display: none; }
    .rating__scale { gap: 8px 6px; max-width: 290px; }
    .rating__num { width: 48px; height: 48px; }
}

/* the visitor's own (final) vote, shown instead of the scale */
.rating__mine { margin: 0; line-height: 1.5; }
.rating__mine-score { font-size: 1.6em; font-weight: 700; }
