/* Guest reviews: customer form pages + admin moderation. */
.gr-page { max-width: 720px; padding-block: 32px 48px; }
.gr-page__title { font-size: 1.6rem; font-weight: 700; color: var(--primary, #1e3c72); margin-bottom: 12px; text-wrap: balance; }
.gr-badge-verified { color: #1a7f37; font-weight: 600; margin-bottom: 20px; }
.gr-form { display: grid; gap: 16px; }
.gr-field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.gr-label { font-weight: 600; font-size: .95rem; margin: 0; }
.gr-optional { font-weight: 400; color: #6b7280; }
.gr-required { color: #b42318; }
.gr-hint { font-size: .85rem; color: #6b7280; margin: 0; }
.gr-section-title { font-weight: 700; color: var(--primary, #1e3c72); margin: 8px 0 0; border-top: 1px solid #e3e7ee; padding-top: 12px; }
.gr-agency-select { max-width: 220px; }
.gr-subscores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .gr-subscores { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gr-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.gr-scale input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gr-scale label { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #d5dae3; border-radius: 8px; cursor: pointer; font-weight: 600; background: #fff; }
.gr-scale input:checked + label { background: var(--primary, #1e3c72); border-color: var(--primary, #1e3c72); color: #fff; }
.gr-scale input:focus-visible + label { outline: 2px solid var(--secondary, #2a5298); outline-offset: 2px; }
.gr-error { color: #b42318; font-size: .85rem; margin: 0; }
.gr-hp { position: absolute; left: -9999px; }
.gr-check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; }
.gr-check input { margin-top: 4px; }
.gr-submit { justify-self: start; }
.gr-rules { font-size: .85rem; color: #6b7280; margin: 0; }

/* Admin */
.gr-admin-score { font-size: 1.6rem; font-weight: 700; color: var(--primary, #1e3c72); line-height: 1; }
.gr-admin-score small { font-size: .8rem; color: #6b7280; }
.gr-admin-body { white-space: pre-line; }
.gr-hotel-search { min-width: 280px; }
.gr-hotel-suggestions { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; max-height: 280px; overflow-y: auto; cursor: pointer; }
.gr-link-cell { min-width: 150px; }
.gr-link-output { min-width: 260px; font-size: .75rem; }
.gr-ai-row { margin-bottom: 6px; }
.gr-ai-gist { flex: 1 1 320px; min-width: 0; }
.gr-thanks { border-top: 1px solid #e3e7ee; padding-top: 8px; }
.gr-thanks summary { cursor: pointer; }
.gr-thanks-label { min-width: 250px; }
.gr-thanks-url { flex: 1 1 320px; min-width: 0; }

/* Public review sections: our own guests (_hotel_reviews.html, hotel pages and
   /viaggi sheets) and the partner's (_etg_guest_reviews.html) share one look
   (owner 08/10/2026, canvas «Recensioni ospiti scheda hotel»). Moved from
   hotel-detail.css on 24/09/2026, which /viaggi does not load. */
/* Layout follows the SECTION's width, not the window's: on hotel pages it
   sits in the main column (~820 px on desktop), where a side summary would
   squeeze the cards. The summary always sits on top of the list, also in
   the full-width band of /viaggi (owner 09/10/2026: same look as the hotel
   sheet, no side column). Container queries: bars in a second column of the
   summary from 640 px, cards scrolling sideways below 480 px. */
.hd-reviews { padding-block: 56px; background: #f5f7fb; scroll-margin-top: 100px; container-type: inline-size; }
.hd-reviews__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.hd-reviews__summary, .hd-reviews__main { min-width: 0; }
@container (min-width: 640px) {
  /* Two columns only with the score bars: online excerpts alone have no
     head nor bars, and the policy note would sit in a half-empty card. */
  .hd-reviews__summary:has(> .hd-reviews__subs) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "head subs" "foot subs";
    column-gap: 32px; align-content: start; }
  .hd-reviews__summary:has(> .hd-reviews__subs) > .hd-reviews__summary-head { grid-area: head; }
  .hd-reviews__summary:has(> .hd-reviews__subs) > .hd-reviews__subs { grid-area: subs; }
  .hd-reviews__summary:has(> .hd-reviews__subs) > .hd-reviews__summary-foot { grid-area: foot; align-self: start; }
  .hd-reviews__summary-foot > .hd-reviews__best:first-child { border-top: 0; padding-top: 0; }
}
.hd-reviews__head { grid-column: 1 / -1; display: grid; gap: 4px; }
.hd-reviews__title { font-size: 1.6rem; font-weight: 700; color: var(--primary, #1e3c72); margin: 0; letter-spacing: -.2px; }
.hd-reviews__subtitle { font-size: .95rem; color: #5f6878; margin: 0; }
/* Summary card */
.hd-reviews__summary { background: #fff; border: 1px solid #e3e7ee; border-radius: 20px; padding: 24px;
  display: grid; gap: 20px; box-shadow: 0 8px 24px rgba(30, 60, 114, .06); }
.hd-reviews__summary-head, .hd-reviews__summary-foot { display: grid; gap: 16px; min-width: 0; }
.hd-reviews__scorebox { display: flex; align-items: center; gap: 16px; }
.hd-reviews__score { width: 88px; height: 88px; flex: none; border-radius: 20px; background: var(--primary, #1e3c72); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 700; line-height: 1; }
.hd-reviews__score small { font-size: .75rem; font-weight: 500; color: rgba(255, 255, 255, .85); margin-top: 4px; }
.hd-reviews__verdict { display: grid; gap: 2px; min-width: 0; }
.hd-reviews__word { font-size: 1.35rem; font-weight: 700; color: #1f2733; margin: 0; }
.hd-reviews__count { color: #5f6878; font-size: .88rem; line-height: 1.4; margin: 0; }
.hd-reviews__source { display: flex; align-items: flex-start; gap: 10px; background: #eef2f9; border-radius: 12px; padding: 12px 14px;
  font-size: .82rem; line-height: 1.45; color: #384152; margin: 0; }
.hd-reviews__source svg { flex: none; margin-top: 1px; color: var(--primary, #1e3c72); }
.hd-reviews__subs { display: grid; gap: 14px; margin: 0; align-self: start; }
.hd-reviews__sub { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; font-size: .88rem; }
.hd-reviews__sub dt { font-weight: 400; color: #384152; }
.hd-reviews__sub dd { display: contents; margin: 0; }
.hd-reviews__sub-val { font-weight: 600; color: #1f2733; font-variant-numeric: tabular-nums; text-align: right; }
.hd-reviews__bar, .hd-reviews__meter { grid-column: 1 / -1; order: 2; }
.hd-reviews__bar { height: 8px; border-radius: 4px; background: #e3e7ee; overflow: hidden; }
.hd-reviews__bar-fill { display: block; height: 100%; border-radius: 4px; background: var(--primary, #1e3c72); transform-origin: left; transform: scaleX(0); }
.hd-reviews__meter { width: 100%; height: 8px; border: 0; border-radius: 4px; background: #e3e7ee; -webkit-appearance: none; appearance: none; }
.hd-reviews__meter::-webkit-meter-bar { background: #e3e7ee; border: 0; border-radius: 4px; height: 8px; }
.hd-reviews__meter::-webkit-meter-optimum-value { background: var(--primary, #1e3c72); border-radius: 4px; }
.hd-reviews__meter::-moz-meter-bar { background: var(--primary, #1e3c72); border-radius: 4px; }
.hd-reviews__best { display: flex; align-items: center; gap: 10px; border-top: 1px solid #eef0f4; padding-top: 16px; margin: 0; font-size: .88rem; color: #384152; }
.hd-reviews__best svg { flex: none; color: #b45309; }
.hd-reviews__best strong { color: #1f2733; }
.hd-reviews__agency { font-size: .85rem; margin: 0; }
.hd-reviews__agency-note { color: #5f6878; }
.hd-reviews__policy { font-size: .8rem; line-height: 1.45; color: #384152; background: #eef2f9; border-radius: 12px; padding: 12px 14px; margin: 0; }
/* Review cards */
.hd-reviews__list { display: grid; gap: 18px; }
@container (min-width: 640px) { .hd-reviews__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 479.98px) {
  .hd-reviews__list { grid-auto-flow: column; grid-auto-columns: 86%; align-items: start; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .hd-review { scroll-snap-align: start; }
  .hd-reviews__score { width: 72px; height: 72px; font-size: 1.85rem; border-radius: 16px; }
  .hd-reviews__more, .hd-reviews__expand > summary { width: 100%; }
}
.hd-review { background: #fff; border: 1px solid #e3e7ee; border-radius: 16px; padding: 20px 22px; display: grid; gap: 12px; align-content: start; }
.hd-review__head { display: flex; align-items: center; gap: 12px; }
.hd-review__who-wrap { min-width: 0; flex: 1; }
.hd-review__avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; background: #eef2f9; color: var(--primary, #1e3c72); font-weight: 600; display: grid; place-items: center; }
.hd-review__who { font-weight: 600; font-size: .95rem; line-height: 1.25; color: #1f2733; }
.hd-review__when { font-size: .8rem; color: #5f6878; }
.hd-review__score { margin-left: auto; flex: none; background: #eef2f9; color: var(--primary, #1e3c72); font-weight: 700; font-size: .95rem;
  border-radius: 10px; padding: 5px 10px; white-space: nowrap; }
.hd-review__score small { font-weight: 500; color: #5f6878; font-size: .75rem; }
.hd-review__title { font-size: 1rem; font-weight: 600; margin: 0; color: #1f2733; }
.hd-review__body { font-size: .9rem; line-height: 1.6; color: #384152; margin: 0; white-space: pre-line; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
/* Partner reviews: positive and negative lines, clamped together. */
.hd-review__body--lines { display: grid; gap: 10px; white-space: normal; -webkit-line-clamp: unset; max-height: 9.6em; }
.hd-review__line { display: flex; gap: 10px; align-items: flex-start; margin: 0; white-space: pre-line; }
.hd-review__line svg { flex: none; margin-top: .2em; }
.hd-review__line--plus svg { color: var(--secondary, #2a5298); }
.hd-review__line--minus svg { color: #b45309; }
.hd-review__body.is-expanded { display: block; -webkit-line-clamp: unset; overflow: visible; max-height: none; }
.hd-review__body--lines.is-expanded { display: grid; }
.hd-review__more { justify-self: start; background: none; border: 0; padding: 0; font-size: .85rem; font-weight: 600; color: var(--secondary, #2a5298); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.hd-review__more:hover, .hd-review__more:focus-visible { color: var(--primary, #1e3c72); }
.hd-review__lang { font-size: .78rem; color: #5f6878; margin: 0; }
.hd-reviews__toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 0 14px; }
.hd-reviews__sort-label { font-size: .85rem; color: #5f6878; margin: 0; white-space: nowrap; }
.hd-reviews__sort { width: auto; min-width: 170px; }
.hd-reviews__list.is-loading { opacity: .5; pointer-events: none; transition: opacity .15s; }
.hd-review__foot { font-size: .78rem; color: #5f6878; background: transparent; border-top: 1px solid #f0f2f6; margin: 0; padding: 8px 0 0; }
.hd-review__badge--verified { color: #1a7f37; font-weight: 600; }
.hd-review__badge--invited { color: var(--primary, #1e3c72); font-weight: 600; }
.hd-review__reply { background: #f4f6fa; border-radius: 10px; padding: 10px 12px; font-size: .84rem; }
.hd-review__reply p { margin: 4px 0 0; white-space: pre-line; }
.hd-review__reply--hotel { background: #eef6f0; }
.hd-review__reply + .hd-review__reply { margin-top: 6px; }
.hd-reviews__empty { color: #5f6878; }
.hd-reviews__form { margin-top: 20px; background: #fff; border: 1px solid #e3e7ee; border-radius: 16px; padding: 18px; }
/* «Mostra altre»: an outlined button under the list, ours and the partner's. */
.hd-reviews__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.hd-reviews__note { font-size: .82rem; color: #5f6878; margin: 0; }
.hd-reviews__more, .hd-reviews__expand > summary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 10px 22px; border: 1.5px solid var(--primary, #1e3c72); border-radius: 12px; background: #fff; color: var(--primary, #1e3c72);
  font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; }
.hd-reviews__more:hover, .hd-reviews__more:focus-visible, .hd-reviews__expand > summary:hover { background: #eef2f9; color: var(--primary, #1e3c72); }
.hd-reviews__expand { margin-top: 18px; }
.hd-reviews__expand > summary { list-style: none; }
.hd-reviews__expand > summary::-webkit-details-marker { display: none; }
.hd-reviews__expand[open] > summary { display: none; }
/* /volo-hotel card variant: no full-width band, one column. */
.hd-reviews--compact { background: none; padding-block: 0; }
.hd-reviews--compact .hd-reviews__list { grid-auto-flow: row; overflow: visible; }

/* Outcome of a card action, shown where the operator is (scroll kept). */
.gr-toast { position: fixed; right: 16px; bottom: 16px; z-index: 1080; max-width: min(420px, calc(100vw - 32px));
  background: #0f7a4a; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: .9rem; }
.gr-toast--error { background: #b42318; }
.gr-review-card { scroll-margin-top: 80px; }
