/**
 * @file        sg-community.css
 * @description Styles of the community module: country and city pages, community figures, review replies and flag links, price and fact blocks, advertising block, admin lists (U5-01, U5-02, U5-07 to U5-09, R5-23, D5-06, D5-08, D5-09); mockup pass 2026-12-03
 *
 * @author      Thomas Dobler - SYNTHETIXMIND LTD
 * @company     SYNTHETIXMIND LTD, Paphos, Cyprus
 * @url         https://synthetixmind.com
 *
 * @uid         6a9a8c2b-1858-426b-84f8-1ff602fec0f2
 * @version     0.1.1.2
 * @created     2026-12-01
 * @updated     2026-12-03
 *
 * @copyright   (c) 2026 by SYNTHETIXMIND LTD
 * @license     Proprietary — All rights reserved
 */

/* Page frame, 360 px first: one column, nothing wider than the screen at 130 % text. */
.sg-community-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.sg-community-page > section, .sg-community-page > aside { min-width: 0; }
.sg-community-hero h1 { font-family: var(--font-head); overflow-wrap: anywhere; margin: 4px 0 8px; }
.sg-community-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Community figures (U5-01, U5-02): the overall score is the one focal figure. */
.sg-community-figures__overall { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 1.25rem; margin: 0 0 12px; }
.sg-community-figures__none { font-weight: 600; margin: 0 0 4px; }
.sg-community-aspects { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.sg-community-aspects li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.sg-community-aspects__name { min-width: 0; overflow-wrap: anywhere; }
.sg-community-aspects__value { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Reviews with sort tabs and pager. */
.sg-community-reviews__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.sg-community-sort { margin: 0 0 8px; }
.sg-community-reply { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-sm); }
.sg-community-reply__label { font-weight: 600; margin: 0 0 4px; }
.sg-community-reply-link { margin: 8px 0 0; font-size: 0.9rem; }
.sg-community-flag { min-height: 44px; display: inline-flex; align-items: center; }

/* Lists of places, trips and countries. */
.sg-community-places__list { flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.sg-community-places__list a { display: inline-flex; min-height: 44px; align-items: center; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.sg-community-trip { overflow-wrap: anywhere; }
.sg-community-list { list-style: none; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.sg-community-list a { display: inline-flex; min-height: 44px; align-items: center; gap: 6px; }

/* Fact sheet summary. */
.sg-community-facts__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; }
.sg-community-fact dt { font-weight: 600; }
.sg-community-fact dd { margin: 0; overflow-wrap: anywhere; }

/* R5-23 advertising: labelled, set apart from ratings and reviews. */
.sg-community-ads { border-style: dashed; }
.sg-community-ads__label { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); margin: 0 0 6px; }

/* Forms and admin. */
.sg-community-form .sg-quote, .sg-community-admin-reply .sg-quote { overflow-wrap: anywhere; }
.sg-community-admin-replies { list-style: none; padding: 0; display: grid; gap: 12px; }
.sg-community-url code { overflow-wrap: anywhere; word-break: break-all; }

@media (min-width: 900px) {
  .sg-community-aspects { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .sg-community-facts__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sg-community-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── Mockup pass 2026-12-03 ── */

/* U5-01, U5-02 hero and two columns from 1024 px: ratings and reviews left, trips, prices, facts and ads right. */
.sg-community-crumb { margin: 0; }
.sg-community-crumb a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.sg-community-lead { margin: 0 0 12px; color: var(--ink-muted); max-width: 60ch; }
.sg-community-type { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sg-community-actions .sg-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.sg-community-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.sg-community-main, .sg-community-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; min-width: 0; }
.sg-community-main > *, .sg-community-side > * { min-width: 0; margin: 0; }
@media (min-width: 1024px) { .sg-community-layout { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }

/* Section heads with a count chip or a link on the right. */
.sg-community-sechead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 6px 12px; margin: 0 0 12px; }
.sg-community-sechead h2 { margin: 0; }
.sg-community-sechead p { margin: 4px 0 0; }
.sg-community-sechead > a { display: inline-flex; align-items: center; min-height: 44px; }
.sg-community-note { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.sg-community-note p { margin: 0; flex: 1 1 220px; }
.sg-community-note .sg-icon { flex: none; }

/* Figures: the overall score is the focal figure, aspects as small cards. */
.sg-community-scores { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.sg-community-overall { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--bg); }
.sg-community-overall p { margin: 0 0 4px; }
.sg-community-figures__overall { font-size: 2rem; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.sg-community-figures__overall .sg-muted { font-size: 1rem; }
.sg-community-figures .sg-community-aspects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.sg-community-aspects .sg-community-aspect { display: block; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.sg-community-aspect p { margin: 0; overflow-wrap: anywhere; }
.sg-community-aspect__value { font-size: 1.25rem; }
@media (min-width: 640px) { .sg-community-scores { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }

/* Reviews: sort as a segmented control, empty card. */
.sg-community-empty { display: grid; justify-items: start; gap: 4px; }
.sg-community-empty p { margin: 0; }
.sg-community-reply__label { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sg-community-flag { gap: 6px; }
.sg-community-flag .sg-rating-icon { width: 16px; height: 16px; }
.sg-community-reply-link a { display: inline-flex; align-items: center; min-height: 44px; }

/* Side column: trips as rows with an icon, prices as rows with the median on the right. */
.sg-community-triplist, .sg-community-pricelist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.sg-community-trip a { display: flex; gap: 10px; align-items: center; min-height: 44px; padding: 6px 0; text-decoration: none; color: inherit; overflow-wrap: anywhere; }
.sg-community-trip a > span:last-child { display: grid; min-width: 0; }
.sg-community-trip__icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius); }
.sg-community-trip a:hover strong, .sg-community-trip a:focus-visible strong { text-decoration: underline; }
.sg-community-price { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.sg-community-price:last-child { border-bottom: 0; }
.sg-community-price > div { min-width: 0; overflow-wrap: anywhere; }
.sg-community-price p { margin: 0; }
.sg-community-price__name { font-weight: 600; }
.sg-community-price__median { white-space: nowrap; font-weight: 600; }
.sg-community-off { display: flex; gap: 12px; align-items: flex-start; }
.sg-community-off h2 { margin: 0 0 4px; font-size: 1.1rem; }
.sg-community-off p { margin: 0; }

/* U5-07, U5-08 forms: dialog head with close, reason cards, label row with counter, footer buttons. */
.sg-community-dialog__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 0 0 12px; }
.sg-community-dialog__head > div { min-width: 0; }
.sg-community-dialog__head h1 { margin: 0 0 4px; overflow-wrap: anywhere; }
.sg-community-close { flex: none; min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; padding: 0; }
.sg-community-choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.sg-community-choice { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.sg-community-choice > span { display: grid; gap: 2px; min-width: 0; }
.sg-community-choice:has(input:checked) { border-color: var(--navy); background: var(--bg); }
.sg-community-choice input { margin-top: 3px; }
:root[data-theme="dark"] .sg-community-choice:has(input:checked) { border-color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sg-community-choice:has(input:checked) { border-color: var(--ink); } }
@media (min-width: 480px) { .sg-community-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sg-community-labelrow { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.sg-community-labelrow .sg-hint { margin: 0; font-family: var(--font-mono); }
.sg-community-formfoot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.sg-community-formfoot .sg-button { min-height: 44px; display: inline-flex; align-items: center; }
.sg-community-quotecard { margin: 0 0 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); overflow-wrap: anywhere; }
.sg-community-quotecard__head { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 6px; }
.sg-community-quotecard figcaption { font-size: .9rem; }
.sg-community-grid2, .sg-community-grid3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 12px; }
.sg-community-grid2 input, .sg-community-grid3 input, .sg-community-grid3 select { width: 100%; }
@media (min-width: 640px) { .sg-community-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .sg-community-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* D5-06 reply cards: sender and date on top, excerpt and proposed reply side by side from 900 px, actions below. */
.sg-community-admin-replies > li { list-style: none; }
.sg-community-admin-reply__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0 0 8px; }
.sg-community-admin-reply__head h2 { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.sg-community-admin-reply__head p { margin: 0; overflow-wrap: anywhere; }
.sg-community-admin-reply__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 900px) { .sg-community-admin-reply__body { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sg-community-decide { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.sg-community-decline { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 260px; }
.sg-community-decline input { flex: 1 1 180px; min-height: 44px; min-width: 0; }
.sg-community-decide .sg-button { min-height: 44px; }

/* D5-09 tiles and read-only thresholds. */
.sg-community-tiles { margin: 0 0 16px; }
.sg-community-rules { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; }
.sg-community-rule { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.sg-community-rule dt { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.sg-community-rule dd { margin: 4px 0 0; display: grid; gap: 2px; }
.sg-community-rule dd .sg-mono { font-weight: 600; }
@media (min-width: 760px) { .sg-community-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
