/*
 * Catalog style "demo34" — rating + comments add-on (loaded instead of _rate.css when
 * index.php?style=demo34 is shown). Mirrors /demo34/ like demo34.css: the rating is a form step
 * with ten white rounded keys (the chosen one deep green), the comment form is the sign-up form —
 * numbered lime labels, white 14px inputs with a lime focus halo, a full-width deep green button.
 */

/* cards: the counters as a hint line inside the field */
.post__stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.post__rating { display: inline-flex; align-items: baseline; gap: 2px; color: var(--ink); }
.post__rating-avg { font: 900 22px/1 var(--font); letter-spacing: -0.04em; }
.post__rating-max { color: var(--muted); font-weight: 500; }
.post__comments { color: var(--green); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.post__comments:hover { text-decoration-color: var(--lime-2); }

.post__flash { margin: 40px 0 0; }
.notice--ok { border-color: var(--green); box-shadow: inset 4px 0 0 var(--lime); color: var(--green); font-weight: 500; }

/* the rating: a step of the form */
.rating, .comments { margin-top: 56px; padding-top: 30px; border-top: 2px solid var(--green); }
.rating__title, .comments__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0 0 18px; font: 900 clamp(34px, 3.2vw, 52px)/0.95 var(--font); letter-spacing: -0.05em; }
.rating__title::before, .comments__title::before {
    content: "Step"; align-self: center; padding: 6px 9px; background: var(--lime); color: var(--green);
    font: 700 12px/1 var(--font); letter-spacing: 0.12em; text-transform: uppercase;
}
.rating__score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 24px; }
.rating__avg { font: 900 clamp(72px, 8vw, 120px)/0.82 var(--font); letter-spacing: -0.06em; color: var(--green); }
.rating__max { font: 700 22px/1 var(--font); color: var(--muted); }
.rating__count { margin-left: 6px; padding: 5px 10px; border-radius: 12px; background: var(--white); color: var(--ink); font-size: 14px; font-weight: 500; }
.rating__form { display: grid; gap: 16px; }
.rating__scale { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.rating__legend { margin-bottom: 10px; padding: 0; font: 700 13px/1.3 var(--font); letter-spacing: 0.04em; text-transform: uppercase; }
.rating__opt { position: relative; min-width: 0; }
.rating__input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.rating__num {
    display: grid; place-items: center; height: 54px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--white);
    color: var(--ink); font: 900 20px/1 var(--font); letter-spacing: -0.02em; cursor: pointer; user-select: none;
    transition: background 200ms ease, border-color 200ms ease, color 200ms ease, transform 150ms ease;
}
.rating__opt:hover .rating__num { border-color: var(--green); }
.rating__opt:active .rating__num { transform: scale(0.95); }
.rating__input:checked + .rating__num { background: var(--green); border-color: var(--green); color: var(--lime); }
.rating__input:focus-visible + .rating__num { border-color: var(--green); outline: 2px solid var(--green); outline-offset: 3px; box-shadow: 0 0 0 4px var(--lime); }
.rating__submit {
    justify-content: center; width: 100%; min-height: 60px; border: 0; border-radius: var(--r-big); background: var(--green); color: #fff;
    font: 700 18px/1 var(--font); text-decoration: none; cursor: pointer; transition: transform 200ms ease, box-shadow 200ms ease;
}
.rating__submit:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -16px rgb(23 56 43 / 0.8); }
.rating__mine { margin: 0; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--white); line-height: 1.5; }
.rating__mine-score { padding: 2px 8px; background: var(--lime); color: var(--green); font-size: 1.3em; font-weight: 900; }

/* comments: answers on white cards, then the sign-up-like form */
.comments__title::before { content: "Say it"; }
.comments__count { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 12px; background: var(--white); color: var(--green); font-size: 18px; letter-spacing: 0; }
.comments__list { display: grid; gap: 10px; margin: 0 0 32px; padding: 0; list-style: none; }
.comment { padding: 18px 20px; border: 1.5px solid var(--line); border-radius: var(--r-big); background: var(--white); }
.comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0 0 6px; }
.comment__author { font: 900 20px/1.1 var(--font); letter-spacing: -0.03em; }
.comment__author::before { content: "@"; color: var(--muted); font-weight: 700; }
.comment__date { color: var(--muted); font-size: 14px; }
.comment__body { font-size: 16.5px; line-height: 1.55; overflow-wrap: anywhere; }
.comments__empty { margin: 0 0 28px; color: var(--muted); font-size: 18px; }

.comment-form { display: grid; gap: 20px; margin: 0; counter-reset: d34-field; }
.comment-form__field { display: grid; gap: 8px; margin: 0; counter-increment: d34-field; }
.comment-form__label { font: 700 13px/1.2 var(--font); letter-spacing: 0.04em; text-transform: uppercase; }
.comment-form__label::before { content: counter(d34-field, decimal-leading-zero); margin-right: 8px; padding: 2px 5px; background: var(--lime); color: var(--green); font-size: 11px; }
.comment-form__input, .comment-form__text {
    width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--white); color: var(--ink);
    font: 500 17px/1.4 var(--font); transition: border-color 200ms ease, box-shadow 200ms ease;
}
.comment-form__input { height: 54px; }
.comment-form__text { min-height: 140px; resize: vertical; }
.comment-form__input:focus, .comment-form__text:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgb(200 240 106 / 0.85); }
.comment-form__actions { display: grid; gap: 10px; margin: 4px 0 0; }
.comment-form__submit { justify-content: center; width: 100%; min-height: 60px; border: 0; font-size: 18px; cursor: pointer; }
.comment-form__note { color: var(--muted); font-size: 14px; }

@media (max-width: 600px) {
    .rating__scale { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .rating__num { height: 52px; }
}
