/*
 * Catalog style "demo1" — rating + comments add-on (loaded instead of _rate.css when
 * index.php?style=demo1 is shown). Mirrors /demo1/ like demo1.css.
 */
/* rating + comments */
/* Card: two small dark pills on the photo, under the meta (readable on any picture). */
.post--card .post__meta { margin-top: -132px; text-shadow: 0 1px 10px rgb(0 0 0 / 0.7); }
.post--card .post__stats { position: relative; z-index: 1; }
.post__stats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 13px; }
.post__rating, .post__comments { display: inline-flex; align-items: baseline; gap: 2px; min-height: 28px; padding: 5px 12px; border-radius: 999px; background: rgb(11 11 12 / 0.72); color: #fff; line-height: 1.2; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.post__rating-avg { font: 600 14px/1.2 var(--head); }
.post__rating-max { font: 400 14px/1.2 var(--serif); color: var(--serif-ink); }
.post__comments { text-decoration: none; transition: background 200ms ease; }
.post__comments:hover { background: #fff; color: #111; }

/* Post: a centred column like the header, Lazurski line over heavy Poppins. */
.post__flash { max-width: 760px; margin: 40px auto 0; padding: 18px 24px; border-radius: 999px; font-size: 18px; }
.notice--ok { background: var(--pill); color: var(--ink); }
.notice--ok::before { content: "✓"; display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 12px; border-radius: 50%; background: #fff; color: #111; font: 700 15px/1 var(--head); vertical-align: middle; }

.rating, .comments { max-width: 760px; margin: clamp(56px, 7vw, 96px) auto 0; padding: 0 16px; }
.rating { text-align: center; }
.rating__title, .comments__title { margin: 0 0 6px; font: 400 clamp(26px, 2.8vw, 40px)/1.1 var(--serif); color: var(--serif-ink); letter-spacing: -0.01em; }
.rating__score { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 10px; margin: 0 0 clamp(22px, 3vw, 34px); }
.rating__avg { font: 700 clamp(84px, 12vw, 160px)/0.9 var(--head); letter-spacing: -0.06em; color: var(--ink); }
.rating__max { font: 400 clamp(22px, 2.4vw, 32px)/1 var(--serif); color: var(--serif-ink); }
.rating__count { flex-basis: 100%; color: var(--soft); font: 300 15px/1.4 var(--head); }
.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: var(--soft); font: 400 18px/1.3 var(--serif); 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: 52px; height: 52px; border-radius: 50%; background: var(--pill); color: var(--ink);
    font: 600 18px/1 var(--head); cursor: pointer; user-select: none; transition: background 200ms ease, color 200ms ease, transform 200ms ease;
}
.rating__opt:hover .rating__num { background: var(--pill-hover); transform: translateY(-2px); }
.rating__opt.is-mine .rating__num { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.5); }
.rating__input:checked + .rating__num { background: #fff; color: #111; font-weight: 700; transform: none; }
.rating__input:focus-visible + .rating__num { outline: 2px solid rgb(255 255 255 / 0.9); outline-offset: 3px; }
.rating__submit {
    gap: 12px; padding: 4px 22px 4px 4px; border: 0; border-radius: 999px; background: var(--pill); color: #fff;
    font: 500 15px/1.2 var(--head); text-decoration: none; cursor: pointer; transition: background 200ms ease;
}
.rating__submit::before { content: "→"; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #111; font-weight: 700; transition: transform 250ms ease; }
.rating__submit:hover { background: var(--pill-hover); }
.rating__submit:hover::before { transform: translateX(4px); }

.comments__title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.comments__count { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 999px; background: #fff; color: #111; font: 700 16px/1 var(--head); align-self: center; }
.comments__list { display: grid; gap: 0; margin: 0 0 32px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.comment { padding: 20px 0; border-bottom: 1px solid var(--line); }
.comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 6px; }
.comment__author { font: 600 17px/1.3 var(--head); color: var(--ink); letter-spacing: -0.01em; }
.comment__date { font: 400 16px/1.3 var(--serif); color: var(--soft); }
.comment__body { color: #dcdce0; font: 300 16px/1.65 var(--head); overflow-wrap: anywhere; }
.comments__empty { margin: 0 0 32px; color: var(--soft); font: 400 20px/1.4 var(--serif); }
.comment-form { display: grid; gap: 18px; padding: clamp(20px, 3vw, 32px); border-radius: 22px; background: var(--bg-2); border: 1px solid var(--line); }
.comment-form__field { display: grid; gap: 8px; margin: 0; }
.comment-form__label { font: 400 18px/1.2 var(--serif); color: var(--serif-ink); }
.comment-form__input, .comment-form__text {
    width: 100%; padding: 12px 18px; border: 1px solid #3a3a40; background: var(--bg); color: var(--ink);
    font: 400 16px/1.5 var(--head); transition: border-color 200ms ease, box-shadow 200ms ease;
}
.comment-form__input { max-width: 380px; min-height: 48px; border-radius: 999px; }
.comment-form__text { min-height: 130px; border-radius: 18px; resize: vertical; }
.comment-form__input:focus, .comment-form__text:focus { border-color: #fff; outline: none; box-shadow: 0 0 0 3px rgb(255 255 255 / 0.22); }
.comment-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 4px 0 0; }
.comment-form__submit { border: 0; color: #fff; cursor: pointer; }
.comment-form__note { color: var(--soft); font-size: 13px; }
@media (max-width: 620px) {
    .post__flash { border-radius: 22px; }
    .rating__scale { gap: 8px 6px; max-width: 300px; }
    .rating__num { width: 48px; height: 48px; font-size: 17px; }
}

/* 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; }
