/* HMS-346 — Hotel Reviews moderation hub (Figma 600:26667 family).
   Shares reports-hub__kpi/table/badge classes. */

.reviews-hub__subtabs {
  display: flex;
  gap: var(--wa-space-l);
  border-bottom: 1px solid var(--wa-color-neutral-border-quiet);
  margin-bottom: var(--wa-space-m);
}
.reviews-hub__subtab {
  padding: var(--wa-space-s) var(--wa-space-2xs);
  color: var(--wa-color-text-quiet);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: var(--wa-font-weight-semibold);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.reviews-hub__subtab--active { color: var(--wa-color-text-normal); border-bottom-color: var(--wa-color-brand); }
.reviews-hub__count { font-weight: 400; color: var(--wa-color-text-quiet); margin-left: 2px; }

/* HMS-1039 — Figma review KPIs: tinted cards, right-aligned icons. */
.reviews-hub__kpi--info { background: var(--wa-color-brand-fill-quiet); }
.reviews-hub__kpi--warn { background: var(--wa-color-warning-fill-quiet); }
.reviews-hub__kpi--danger { background: var(--wa-color-danger-fill-quiet); }
.reviews-hub__kpi-icon--info { background: var(--wa-color-brand-fill-normal); color: var(--wa-color-brand-on-normal); }
.reviews-hub__kpi-icon--warn-star { background: var(--wa-color-warning-fill-normal); color: var(--wa-color-warning-on-normal); }
.reviews-hub__kpi-icon--danger { background: var(--wa-color-danger-fill-normal); color: var(--wa-color-danger-on-normal); }
.reviews-hub .reports-hub__kpi-value { font-size: 1.25rem; }
.reviews-hub .reports-hub__kpi-label { font-size: 0.75rem; }

.reviews-hub__alert {
  display: flex; align-items: center; gap: var(--wa-space-s);
  background: var(--wa-color-danger-fill-quiet); color: var(--wa-color-danger-on-quiet);
  border-radius: var(--wa-border-radius-m);
  padding: var(--wa-space-s) var(--wa-space-m);
  margin-bottom: var(--wa-space-m);
  font-size: 0.8125rem;
}
.reviews-hub__alert p { margin: 0; flex: 1; }
.reviews-hub__dismiss {
  background: var(--wa-color-danger-fill-loud); color: var(--wa-color-neutral-on-loud); border: 0;
  border-radius: var(--wa-border-radius-s);
  padding: var(--wa-space-2xs) var(--wa-space-s);
  font-size: 0.8125rem; cursor: pointer;
}

/* HMS-1040/1042 — Figma: white table, no row rules, 16px/#1B1D26 text. */
.reviews-hub__table { width: 100%; border-collapse: collapse; background: var(--wa-color-surface-default); font-size: 1rem; color: var(--wa-color-text-normal); }
/* HMS-1042 — Figma column widths: Review 360, Hotel 180, Overall 133,
   Categories 237, Attendee 128, Days Pending 162, Actions 336. */
.reviews-hub__col--review { width: 22.5rem; }
.reviews-hub__col--hotel { width: 11.25rem; }
.reviews-hub__col--overall { width: 8.3125rem; }
.reviews-hub__col--categories { width: 14.8125rem; }
.reviews-hub__col--attendee { width: 8rem; }
.reviews-hub__col--days { width: 10.125rem; }
.reviews-hub__col--actions { width: 21rem; }
.reviews-hub__table th {
  text-align: center; font-size: 1rem; font-weight: 600;
  color: var(--wa-color-text-normal); background: var(--wa-color-surface-lowered);
  border-bottom: 1px solid var(--wa-color-surface-border);
  padding: 0.75rem 1rem; white-space: nowrap;
}
.reviews-hub__table td {
  padding: 0.75rem 1rem; border-bottom: none;
  vertical-align: middle; color: var(--wa-color-text-normal);
}
/* HMS-1042 — header content: 16px column glyph at 50% + 16px label at 60%
   + 14px sort glyph at 50%, centered with a 10px gap. */
.reviews-hub__queue-sort, .reviews-hub__th {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.625rem; color: inherit; text-decoration: none;
}
.reviews-hub__queue-sort:hover { color: var(--wa-color-text-normal); }
.reviews-hub__queue-sort > i, .reviews-hub__th > i { opacity: 0.5; font-size: 1rem; }
.reviews-hub__queue-sort > i:last-child { font-size: 0.875rem; }
.reviews-hub__th-label { opacity: 0.6; }
.reviews-hub__comment { max-width: 20rem; font-weight: 600; line-height: 1.4; }
.reviews-hub__status { display: inline-flex; align-items: center; gap: 6px; }
.reviews-hub__status i { font-size: 0.8125rem; }
.reviews-hub__status--published { color: var(--wa-color-success-on-quiet); }
.reviews-hub__status--pending { color: var(--wa-color-warning-on-quiet); }
.reviews-hub__status--rejected { color: var(--wa-color-danger-on-quiet); }
.reviews-hub__status--removed { color: var(--wa-color-neutral-on-quiet); }
.reviews-hub__row--flagged { background: var(--wa-color-warning-fill-quiet); }

.reviews-hub__rating {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--wa-color-warning-fill-quiet); color: var(--wa-color-warning-60);
  padding: 0.5rem 0.75rem; border-radius: var(--wa-border-radius-m);
  font-size: 0.75rem; font-weight: 600;
}
.reviews-hub__flagged {
  display: inline-block; margin-left: var(--wa-space-2xs);
  background: var(--wa-color-danger-fill-quiet); color: var(--wa-color-danger-fill-loud);
  padding: 2px var(--wa-space-xs); border-radius: var(--wa-border-radius-s);
  font-size: 0.6875rem; font-weight: 600;
}
/* HMS-1042 — Figma shows one compact "Cleanliness: 1 · Service: 1 · Value: 2"
   line in normal 16px body text; wraps within the 237px column. */
.reviews-hub__cats { max-width: 13rem; }
/* HMS-1042 — review text stays directly in the row. Clamp to three lines and
   let the Stimulus control reveal the toggle only when the text overflows. */
.reviews-hub__text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.reviews-hub__toggle {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin-top: 0.125rem;
  color: var(--wa-color-text-link, var(--wa-color-brand));
  font: inherit;
  font-weight: 400;
  cursor: pointer;
}
.reviews-hub__toggle:hover { text-decoration: underline; }
.reviews-hub__toggle[hidden] { display: none; }
.admin-table-wrap .reviews-hub__table--all { min-width: 72rem; }
.reviews-hub__table--all { table-layout: fixed; }
.reviews-hub__all-col--review { width: 13.5rem; }
.reviews-hub__all-col--guest { width: 9.5rem; }
.reviews-hub__all-col--hotel { width: 9rem; }
.reviews-hub__all-col--overall { width: 6rem; }
.reviews-hub__all-col--categories { width: 11rem; }
.reviews-hub__all-col--status { width: 7rem; }
.reviews-hub__all-col--date { width: 7rem; }
.reviews-hub__all-col--actions { width: 9rem; }
.reviews-hub__table--all th,
.reviews-hub__table--all td { padding-right: 0.75rem; padding-left: 0.75rem; }
.reviews-hub__table--all td { overflow-wrap: break-word; }
.reviews-hub__all-status,
.reviews-hub__all-date { white-space: nowrap; }
.reviews-hub__table--all .reviews-hub__rating { white-space: nowrap; }
.reviews-hub__table--all .reviews-hub__actions { flex-wrap: wrap; row-gap: 0.5rem; }
.reviews-hub__guest { max-width: 12rem; }
.reviews-hub__guest strong,
.reviews-hub__booking-ref,
.reviews-hub__guest-privacy { display: block; }
.reviews-hub__booking-ref { margin-top: 0.125rem; font-size: 0.875rem; white-space: nowrap; }
.reviews-hub__guest-privacy {
  margin-top: 0.125rem;
  color: var(--wa-color-text-quiet);
  font-size: 0.8125rem;
}

.reviews-hub__actions { display: flex; gap: 0.625rem; align-items: center; flex-wrap: nowrap; }
.reviews-hub__actions form { display: inline-flex; }
.reviews-hub__btn {
  border-radius: var(--wa-border-radius-m);
  font-size: 0.875rem; font-weight: 600;
  padding: 0.625rem 0.875rem; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid transparent; white-space: nowrap;
}
.reviews-hub__btn--approve { background: var(--wa-color-success-fill-quiet); color: var(--wa-color-success-on-normal); border-color: var(--wa-color-success-border-normal); }
.reviews-hub__btn--reject { background: var(--wa-color-danger-fill-normal); color: var(--wa-color-danger); border-color: var(--wa-color-danger-border-normal); }
.reviews-hub__btn--flag { background: var(--wa-color-danger-fill-loud); color: var(--wa-color-neutral-on-loud); }
.reviews-hub__btn--remove { background: var(--wa-color-danger-fill-loud); color: var(--wa-color-neutral-on-loud); }
.reviews-hub__btn--view { background: var(--wa-color-brand-fill-quiet); color: var(--wa-color-brand-on-quiet); border-color: var(--wa-color-brand-border-normal); }

/* wa-button renders its visual button in the shadow root, so the host classes
   above only paint the padding/border around it (navy button in a colored
   frame). For wa-button hosts, strip the host chrome and paint ::part(base). */
wa-button.reviews-hub__btn { padding: 0; border: 0; background: none; }
wa-button.reviews-hub__btn::part(base) {
  border-radius: var(--wa-border-radius-m);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 0.875rem;
}
wa-button.reviews-hub__btn--reject::part(base) {
  background: var(--wa-color-danger-fill-normal); color: var(--wa-color-danger); border: 1px solid var(--wa-color-danger-border-normal);
}
wa-button.reviews-hub__btn--flag::part(base) { background: var(--wa-color-danger-fill-loud); color: var(--wa-color-neutral-on-loud); }

.reviews-hub__trend {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px var(--wa-space-xs); border-radius: var(--wa-border-radius-s);
  font-size: 0.75rem; font-weight: var(--wa-font-weight-semibold);
}
.reviews-hub__trend--up { background: var(--wa-color-success-fill-quiet); color: var(--wa-color-success-on-quiet); }
.reviews-hub__trend--down { background: var(--wa-color-danger-fill-quiet); color: var(--wa-color-danger-on-quiet); }
.reviews-hub__trend--same { background: var(--wa-color-brand-fill-quiet); color: var(--wa-color-brand-on-quiet); }

.reviews-hub__rank { font-weight: var(--wa-font-weight-semibold); color: var(--wa-color-text-quiet); width: 2rem; }
.reviews-hub__section-title { margin: 0 0 var(--wa-space-3xs); font-size: 1.125rem; }
.reviews-hub__section-sub { margin: 0 0 var(--wa-space-m); font-size: 0.8125rem; color: var(--wa-color-text-quiet); }
.reviews-hub__filters { display: flex; gap: var(--wa-space-s); margin-bottom: var(--wa-space-m); flex-wrap: wrap; }
.reviews-hub__filters wa-select, .reviews-hub__filters wa-input { min-width: 12rem; }
/* Figma 600:27319 pins the Export dropdown at the right end of the filter row. */
.reviews-hub__export { margin-left: auto; }
.reviews-hub__empty { color: var(--wa-color-text-quiet); padding: var(--wa-space-m) 0; }

/* HMS-1809 — the queue's empty state sits inside the table card (white
   surface) under the header row: a small quiet speech-bubble icon over the
   centered message, same rhythm as the hotel-notes / my-bookings empties. */
.reviews-hub__table-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wa-space-xs);
  padding: var(--wa-space-xl) var(--wa-space-m);
  text-align: center;
  color: var(--wa-color-text-quiet);
}
.reviews-hub__table-empty-icon {
  font-size: 1.25rem;
  color: var(--wa-color-text-quiet);
}
.reviews-hub__table-empty-text { margin: 0; }

/* Flag / Reject dialogs */
.review-dialog__card {
  border: 1px solid var(--wa-color-neutral-border-quiet);
  border-radius: var(--wa-border-radius-m);
  padding: var(--wa-space-s) var(--wa-space-m);
  margin-bottom: var(--wa-space-m);
}
.review-dialog__hotel { margin: 0 0 var(--wa-space-2xs); font-weight: var(--wa-font-weight-semibold); display: flex; gap: var(--wa-space-xs); align-items: center; }
.review-dialog__comment { margin: 0 0 var(--wa-space-2xs); }
.review-dialog__meta { margin: 0; font-size: 0.75rem; color: var(--wa-color-text-quiet); }
.review-dialog__fieldset { border: 0; margin: 0 0 var(--wa-space-m); padding: 0; }
.review-dialog__fieldset legend { font-weight: var(--wa-font-weight-semibold); font-size: 0.875rem; margin-bottom: var(--wa-space-xs); }
.review-dialog__radio, .review-dialog__check { display: flex; gap: var(--wa-space-xs); align-items: center; padding: var(--wa-space-3xs) 0; font-size: 0.875rem; }
/* HMS-1043 — Figma "Message Tile" (Warning/Solid/Icon On, nodes 942:48012 and
   943:48298): 12px/16px padding, 8px icon gap, 1px #da7e00 stroke inside the
   #fef3cd fill, #1b1d26 14px text at 1.2 leading, #da7e00 14px icon. The
   earlier pass left the gap at 12px, dropped the stroke, kept the icon on
   warning-on-quiet and ran text at 13px/1.6 — QA's retest caught all of it. */
.review-dialog__warning {
  display: flex;
  align-items: center;
  gap: var(--wa-space-xs);
  padding: var(--wa-space-s) var(--wa-space-m);
  background: var(--wa-color-warning-fill-quiet);
  border: 1px solid var(--wa-color-warning-60);
  border-radius: var(--wa-border-radius-s);
  color: var(--wa-color-text-normal);
  font-size: 0.875rem;
  line-height: var(--wa-line-height-condensed);
  margin-top: var(--wa-space-m);
}
.review-dialog__warning i {
  color: var(--wa-color-warning-60);
  font-size: 0.875rem;
  flex: none;
  /* Font Awesome's exclamation-triangle ink sits ~2px above the em-box
     center, so a centered flex item still reads high against the text.
     The 2px nudge lands the glyph ink on the text block's optical center —
     the alignment Figma's Message Tile shows. */
  transform: translateY(0.125rem);
}
.review-dialog__footer {
  display: flex; justify-content: center; gap: var(--wa-space-s);
  margin-top: var(--wa-space-l); padding-top: var(--wa-space-m);
  border-top: 1px solid var(--wa-color-neutral-border-quiet);
}
.review-dialog__reject-submit::part(base) { background: var(--wa-color-danger-fill-loud); color: var(--wa-color-neutral-on-loud); }

/* HMS-626 — expanded state shows the same text node without the clamp, so
   nothing is duplicated when the toggle opens. */
.reviews-hub__text--expanded {
  display: block;
  overflow: visible;
}

/* HMS-1054 — rankings panel: white card surface, sortable glyph headers,
   bold hotel names (Figma 600:26667). */
.reviews-hub__rankings-card {
  background: #fff;
  border: 1px solid var(--wa-color-neutral-border-quiet);
  border-radius: var(--wa-border-radius-m, 8px);
  padding: var(--wa-space-m);
}
.reviews-hub__sort { color: inherit; text-decoration: none; white-space: nowrap; }
.reviews-hub__sort:hover { color: var(--wa-color-text-normal); }
.reviews-hub__sort.is-active { color: var(--wa-color-text-normal); }
