/*
 * Catalog style "demo23" — rating + comments add-on (loaded instead of _rate.css when
 * index.php?style=demo23 is shown). Mirrors /demo23/ like demo23.css: the score is the month's
 * "today" tile — deep green with a lime number; the scale is a row of rounded white day tiles;
 * comments are white tiles on the card.
 */

/* covers: the score and the comments line sit over the shade, above the actions */
.post__stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 0; font-size: 14px; }
.post--card .post__stats { grid-row: 6; grid-column: 1 / -1; margin-top: 12px; color: var(--on-green-soft); }
.post__rating { display: inline-flex; align-items: baseline; gap: 2px; }
.post__rating-avg { font: 900 24px/1 var(--font); letter-spacing: -0.04em; color: var(--lime); }
.post__rating-max { font-weight: 600; color: var(--on-green-soft); }
.post__comments { font-weight: 700; color: #fff; text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post__comments:hover { color: var(--lime); }

.post__flash { margin: 20px 0 0; }
.notice--ok { box-shadow: inset 6px 0 0 var(--lime), var(--lift); color: var(--green); font-weight: 600; }

/* rating: a deep green tile, the average huge in lime, the scale as day tiles */
.rating, .comments { margin-top: clamp(20px, 2vw, 32px); }
.rating { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px clamp(24px, 3vw, 48px); align-items: end; padding: clamp(22px, 3vw, 40px); border-radius: var(--r-big); background: var(--green); color: var(--on-green); box-shadow: var(--lift); }
.rating__title { grid-column: 1 / -1; margin: 0 0 4px; }
.rating__title, .comments__title { font: 900 clamp(30px, 3vw, 46px)/0.95 var(--font); letter-spacing: -0.045em; }
.rating__title::before { content: "Your score"; display: table; margin-bottom: 14px; padding: 6px 9px; background: var(--lime); color: var(--green); font: 800 11px/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; }
.rating__score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; }
.rating__avg { font: 900 clamp(96px, 10vw, 168px)/0.8 var(--font); letter-spacing: -0.065em; color: var(--lime); }
.rating__max { font: 800 clamp(20px, 1.8vw, 28px)/1 var(--font); letter-spacing: -0.02em; color: #fff; }
.rating__count { width: 100%; margin-top: 10px; color: var(--on-green-soft); font-size: 14px; }
.rating__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; min-width: 0; }
.rating__scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; flex: 1 1 320px; min-width: 0; max-width: 520px; margin: 0; padding: 0; border: 0; }
.rating__legend { margin-bottom: 12px; padding: 0; color: var(--on-green); font: 700 15px/1.3 var(--font); }
.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: flex; align-items: flex-start; height: 56px; padding: 8px 10px; border-radius: var(--r-tile); background: var(--white); color: var(--ink);
    font: 900 22px/1 var(--font); letter-spacing: -0.04em; cursor: pointer; user-select: none;
    transition: background 200ms ease, color 200ms ease, transform 150ms ease, box-shadow 200ms ease;
}
.rating__opt:hover .rating__num { box-shadow: 0 10px 24px -14px rgb(0 0 0 / 0.7); transform: translateY(-2px); }
.rating__opt:active .rating__num { transform: scale(0.95); }
.rating__input:checked + .rating__num { background: var(--lime); color: var(--green); box-shadow: inset 0 0 0 2px var(--green), 0 0 0 2px var(--lime); }
.rating__input:focus-visible + .rating__num { outline: 3px solid #fff; outline-offset: 3px; }
.rating__submit { min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--lime); color: var(--green); text-decoration: none; cursor: pointer; transition: background 200ms ease, transform 150ms ease; }
.rating__submit:hover { background: #fff; }
.rating__submit:active { transform: scale(0.97); }
.rating :focus-visible { outline-color: #fff; }
.rating__mine { margin: 0; color: var(--on-green); font-size: 17px; line-height: 1.5; }
.rating__mine-score { padding: 2px 10px; border-radius: 10px; background: var(--lime); color: var(--green); font: 900 1.6em/1 var(--font); letter-spacing: -0.04em; }

/* comments: a card with white tiles */
.comments { padding: clamp(22px, 3vw, 40px); border-radius: var(--r-big); background: var(--card); box-shadow: var(--lift); }
.comments__title { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; }
.comments__count { display: inline-grid; place-items: center; min-width: 40px; height: 34px; padding: 0 10px; border-radius: 10px; background: var(--lime); color: var(--green); font-size: 20px; letter-spacing: -0.02em; }
.comments__list { display: grid; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.comment { padding: 16px 18px; border-radius: var(--r-tile); background: var(--white); }
.comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 6px; }
.comment__author { font: 900 18px/1.1 var(--font); letter-spacing: -0.03em; }
.comment__date { color: var(--muted); font-size: 13px; font-weight: 600; }
.comment__body { max-width: 64ch; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.comments__empty { margin: 0 0 22px; padding: 16px 18px; border-radius: var(--r-tile); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }
.comment-form { display: grid; gap: 16px; margin: 0; }
.comment-form__field { display: grid; gap: 6px; margin: 0; }
.comment-form__label { font: 800 12px/1.2 var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.comment-form__input, .comment-form__text {
    width: 100%; padding: 12px 16px; border: 2px solid transparent; border-radius: var(--r-tile); background: var(--white); color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line-2); font: 400 16px/1.5 var(--font); transition: border-color 200ms ease, box-shadow 200ms ease;
}
.comment-form__input { max-width: 400px; min-height: 50px; }
.comment-form__text { min-height: 130px; resize: vertical; }
.comment-form__input:focus, .comment-form__text:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 4px rgb(200 240 106 / 0.75); }
.comment-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 2px 0 0; }
.comment-form__submit { min-height: 50px; padding: 0 26px; border: 0; background: var(--green); color: #fff; cursor: pointer; }
.comment-form__submit:hover { background: var(--ink); color: var(--lime); }
.comment-form__note { color: var(--muted); font-size: 14px; }

@media (max-width: 760px) {
    .rating { grid-template-columns: minmax(0, 1fr); }
    .rating__scale { flex-basis: 100%; }
    .rating__submit { flex: 1 0 100%; justify-content: center; }
}
