/*
 * Catalog style "demo7" — rating + comments add-on (loaded instead of _rate.css when
 * index.php?style=demo7 is shown). Mirrors /demo7/ like demo7.css.
 */
/* rating + comments: the reader pages at the back of the issue — Fraunces numerals, a yellow rule, letters to the editor */
.post__stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; margin: -8px 0 16px; color: var(--soft); font-size: 15px; }
.post--even .post__stats { color: var(--on-field-soft); }
.post__rating { font-family: var(--serif); font-style: italic; color: var(--ink); font-variant-numeric: tabular-nums; }
.post--even .post__rating { color: var(--on-field); }
.post__rating-avg { font-size: 22px; font-weight: 400; }
.post__rating-max { margin-left: 2px; font-size: 15px; }
.post__comments { text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 5px; }
.post--even .post__comments { text-decoration-color: var(--yellow); }
.post__comments:hover { color: var(--green-ink); }
.post--even .post__comments:hover { color: var(--yellow); }

.post__flash { max-width: 68ch; margin: 48px auto 0; padding: 20px 28px; font-size: 18px; }
.notice--ok { background: var(--field); color: var(--on-field); border-left: 6px solid var(--yellow); }

.rating, .comments { position: relative; max-width: 68ch; font-size: 18px; margin: clamp(56px, 7vw, 96px) auto 0; padding-top: 22px; border-top: 1px solid var(--ink); }
.rating::before, .comments::before { content: ""; position: absolute; left: 0; top: -2px; width: 34%; height: 3px; background: var(--yellow); }
.rating__title, .comments__title { margin: 0 0 18px; font-family: var(--serif); font-weight: 400; font-variation-settings: "opsz" 144; font-size: clamp(32px, 3.2vw, 48px); line-height: 1; letter-spacing: -0.02em; }
.rating__score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 28px; }
.rating__avg { font-family: var(--serif); font-weight: 340; font-variation-settings: "opsz" 144; font-size: clamp(88px, 10vw, 148px); line-height: 0.8; letter-spacing: -0.04em; color: var(--field); font-variant-numeric: tabular-nums; }
.rating__max { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--soft); }
.rating__count { margin-left: 10px; color: var(--soft); font-size: 15px; }
.rating__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 24px; }
.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; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--soft); }
.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-radius: 999px; box-shadow: inset 0 0 0 1px #b9c4bb; background: var(--paper);
    font-family: var(--serif); font-size: 22px; font-weight: 400; font-variant-numeric: tabular-nums; cursor: pointer; transition: background 220ms ease, color 220ms ease, box-shadow 220ms ease;
}
.rating__opt:hover .rating__num { background: var(--tone); box-shadow: inset 0 0 0 1px var(--ink); }
.rating__opt.is-mine .rating__num { box-shadow: inset 0 0 0 2px var(--yellow); }
.rating__input:checked + .rating__num { background: var(--field); color: var(--on-field); box-shadow: inset 0 0 0 2px var(--field), inset 0 -5px 0 var(--yellow); font-style: italic; }
.rating__input:focus-visible + .rating__num { outline: 3px solid var(--green); outline-offset: 3px; }
.rating__submit { padding: 0 28px; border: 0; border-radius: 999px; background: var(--field); color: var(--on-field); text-decoration: none; cursor: pointer; }
.rating__submit:hover { background: var(--yellow); color: var(--ink); text-underline-offset: 7px; }

.comments__count { font-style: italic; color: var(--green-ink); font-variant-numeric: tabular-nums; }
.comments__list { margin: 0 0 48px; padding: 0; list-style: none; }
.comment { padding: 22px 0 24px; border-bottom: 1px solid #c4cdc6; }
.comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin: 0 0 8px; color: var(--soft); font-size: 14px; }
.comment__author { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink); }
.comment__body { overflow-wrap: anywhere; white-space: pre-line; font-family: var(--serif); font-weight: 340; font-size: 20px; line-height: 1.45; }
.comments__empty { margin: 0 0 40px; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--soft); }
.comment-form { display: grid; gap: 20px; padding: clamp(24px, 4vw, 48px); background: var(--field); color: var(--on-field); }
.comment-form__field { display: grid; gap: 8px; margin: 0; }
.comment-form__label { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--on-field); }
.comment-form__input, .comment-form__text {
    width: 100%; padding: 12px 16px; border: 0; border-bottom: 3px solid var(--green); border-radius: 0; background: var(--paper); color: var(--ink);
    font: 400 17px/1.5 var(--sans);
}
.comment-form__input { max-width: 380px; min-height: 50px; }
.comment-form__text { min-height: 140px; resize: vertical; }
.comment-form__input:focus, .comment-form__text:focus { outline: 3px solid var(--yellow); outline-offset: 2px; border-bottom-color: var(--yellow); }
.comment-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 0; }
.comment-form__submit { border: 0; cursor: pointer; }
.comment-form .btn--primary:hover { background: var(--on-field); color: var(--field); }
.comment-form :focus-visible { outline-color: var(--yellow); }
.comment-form__note { color: var(--on-field-soft); font-size: 14px; }
@media (max-width: 560px) {
    .rating__num { width: 44px; height: 44px; font-size: 20px; }
    .rating__submit, .comment-form__submit { flex: 1 0 100%; justify-content: center; }
}

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