/* Follow the existing directory palette and typography. */
.rating-page { padding-top: 24px; padding-bottom: 48px; }
.rating-form { max-width: 760px; }
.rating-form p, .rating-history > p { color: var(--muted); font-size: 14px; }
.rating-form form > * + * { margin-top: 20px; }
.rating-form textarea { width: 100%; padding: 12px; border: 1px solid #b9c2d0; border-radius: 4px; font: inherit; color: var(--ink); resize: vertical; }
.rating-form textarea:focus, .rating-secondary:focus { outline: 3px solid var(--accent); outline-offset: 3px; }
.rating-notice { padding: 16px; border-left: 4px solid #177452; background: #e9f6ef; }
.rating-fieldset { border: 0; margin: 0; padding: 0; }
.rating-fieldset legend { font-size: 16px; font-weight: 600; }
.rating-choice { display: flex; flex-direction: row-reverse; justify-content: flex-end; position: relative; }
.rating-radio { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rating-choice label { padding: 0 5px; font-size: 42px; color: #7c8793; cursor: pointer; }
.rating-choice input:checked ~ label { color: #986600; }
.rating-choice input:focus + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.rating-confirm { display: flex; align-items: flex-start; gap: 10px; }
.rating-confirm input { margin-top: 6px; }
.rating-history { margin-top: 36px; }
.rating-table-scroll { overflow-x: auto; }
.rating-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rating-table th, .rating-table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.rating-table small { color: var(--muted); }
.rating-secondary { border: 1px solid var(--accent); color: var(--accent); background: #fff; padding: 9px 14px; border-radius: 4px; font: inherit; cursor: pointer; }
.rating-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 12px 0; font-size: 15px; }
.rating-stars { display: inline-block; position: relative; color: #7c8793; font-size: 25px; letter-spacing: 2px; line-height: 1; white-space: nowrap; }
.rating-stars-fill { position: absolute; top: 0; left: 0; overflow: hidden; color: #986600; }
@media (max-width: 600px) { .rating-choice label { font-size: 36px; } .rating-table th, .rating-table td { padding: 10px 8px; } }

/* Compact actions stay on one row, including inside narrow table cells. */
.directory .rating-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; min-width: 96px; }
.directory .rating-actions form, .directory .rating-copy { display: inline-flex; flex: 0 0 auto; margin: 0; }
.directory .rating-icon-button { display: inline-flex; flex: 0 0 42px; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 1px solid #c7d7e3; border-radius: 8px; background: #f3f8fc; color: #075b8f; cursor: pointer; }
.directory .rating-icon-button:hover { border-color: #075b8f; background: #e1eff9; }
.directory .rating-icon-button:focus-visible { outline: 3px solid #075b8f; outline-offset: 3px; }
.directory .rating-icon-button svg { display: block; width: 20px; height: 20px; }
.rating-tooltip { position: fixed; z-index: 10000; width: max-content; max-width: min(270px, calc(100vw - 24px)); padding: 10px 13px; border-radius: 7px; background: #203b50; color: #fff; box-shadow: 0 4px 14px rgba(32,59,80,.2); font: 13px/1.5 "Segoe UI", Arial, sans-serif; text-align: left; pointer-events: none; }
.rating-tooltip[hidden] { display: none; }

/* Rating choices fit on mobile without changing the rating order. */
.directory .rating-choice label { font-size: clamp(18px, 4vw, 34px); padding: 4px 2px; }
.directory .rating-stars { font-size: 20px; letter-spacing: 1px; }
