/* Guest experience (guest portal survey, today's changes, staff dashboard, recovery cases, hotel summary) — compact, mobile-first,
   RTL/LTR via logical properties, dark mode via theme variables, visible focus (WCAG 2.2 AA 2.4.7 / 2.4.11), 44px targets on the public survey (2.5.8). */

/* ---------- accessibility helpers (public portal) ---------- */
.gx-skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 1000; background: var(--tint); color: #fff; padding: 10px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.gx-skip:focus { top: 8px; outline: 3px solid #fff; outline-offset: 2px; }
.visit a:focus-visible, .visit button:focus-visible, .visit summary:focus-visible, .visit select:focus-visible, .visit textarea:focus-visible, .visit input:focus-visible { outline: 3px solid var(--tint); outline-offset: 2px; }
#main:focus { outline: none; }

/* ---------- today's changes banner + cancelled / moved slots (portal) ---------- */
.gx-changes { margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm, 12px); background: color-mix(in srgb, var(--orange) 14%, var(--bg-elev)); box-shadow: var(--shadow); }
.gx-changes b { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.gx-changes ul { margin: 6px 0 0; padding-inline-start: 18px; font-size: 13.5px; line-height: 1.6; }
.visit-timeline li.st-cancelled a { opacity: .7; }
.visit-timeline li.st-cancelled .vt-body b { text-decoration: line-through; text-decoration-thickness: 2px; }
.badge.gx-cancel { background: color-mix(in srgb, var(--red) 15%, transparent); color: var(--red); }
.badge.gx-moved { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }

/* ---------- feedback call to action (portal home / activity) ---------- */
.gx-cta { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r, 16px); background: var(--bg-elev); box-shadow: var(--shadow); color: var(--label); text-decoration: none; }
.gx-cta .grow { flex: 1; min-width: 0; }
.gx-cta b { display: block; font-size: 15px; }
.gx-cta small { color: var(--label-2); font-size: 13px; }
.gx-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gx-week .row .trail { display: flex; gap: 6px; align-items: center; }

/* ---------- public survey ---------- */
.gx-survey-head { display: flex; gap: 12px; align-items: center; margin: 6px 0 14px; }
.gx-survey-head h1 { font-size: 20px; margin: 0 0 2px; line-height: 1.3; }
.gx-survey-head p { margin: 0; font-size: 13px; }
.gx-form { display: flex; flex-direction: column; gap: 10px; }
.gx-q { border: 0; margin: 0; padding: 12px 14px; }
.gx-q legend { float: inline-start; width: 100%; padding: 0; margin-bottom: 10px; font-weight: 700; font-size: 15px; line-height: 1.4; }
.gx-q legend + * { clear: both; }
.gx-req { color: var(--red); }
.gx-csat { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.gx-face { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; min-height: 44px; border-radius: 12px; background: var(--fill); cursor: pointer; text-align: center; }
.gx-face input, .gx-nps input, .gx-mini input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gx-dot { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 800; color: #fff; background: var(--gray, #8e8e93); }
.gx-face.f1 .gx-dot { background: #d92d20; } .gx-face.f2 .gx-dot { background: #e8590c; } .gx-face.f3 .gx-dot { background: #a16207; }
.gx-face.f4 .gx-dot { background: #2f9e44; } .gx-face.f5 .gx-dot { background: #087f5b; }
.gx-fl { font-size: 12px; line-height: 1.2; color: var(--label); }
.gx-face:has(input:checked) { box-shadow: 0 0 0 3px var(--tint); background: var(--bg-elev); }
.gx-face:has(input:focus-visible), .gx-nps label:has(input:focus-visible), .gx-mini label:has(input:focus-visible), .gx-check:has(input:focus-visible) { outline: 3px solid var(--tint); outline-offset: 2px; }
.gx-nps { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; direction: ltr; }
@media (max-width: 420px) { .gx-nps { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.gx-nps label { position: relative; cursor: pointer; }
.gx-nps label span { display: grid; place-items: center; min-height: 44px; border-radius: 10px; background: var(--fill); font-weight: 700; color: var(--label); }
.gx-nps label.d input:checked + span { background: #d92d20; color: #fff; }
.gx-nps label.p input:checked + span { background: #a16207; color: #fff; }
.gx-nps label.g input:checked + span { background: #087f5b; color: #fff; }
.gx-scale { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--label-2); direction: ltr; }
[dir="rtl"] .gx-scale { flex-direction: row-reverse; }
.gx-more { padding: 10px 14px; }
.gx-more summary { cursor: pointer; font-weight: 700; padding: 6px 0; min-height: 32px; }
.gx-aspect { border: 0; margin: 10px 0 0; padding: 0; }
.gx-aspect legend { font-size: 14px; margin-bottom: 6px; padding: 0; }
.gx-mini { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; direction: ltr; }
.gx-mini label { position: relative; cursor: pointer; }
.gx-mini label span { display: grid; place-items: center; min-height: 40px; border-radius: 10px; background: var(--fill); font-weight: 700; }
.gx-mini input:checked + span { background: var(--tint); color: #fff; }
.gx-form textarea { width: 100%; box-sizing: border-box; min-height: 88px; border-radius: 12px; border: 1px solid var(--separator, var(--fill-2)); background: var(--bg); color: var(--label); padding: 10px; font: inherit; resize: vertical; }
.gx-count { text-align: end; margin-top: 4px; }
.gx-count.low { color: var(--red); font-weight: 700; }
.gx-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 600; min-height: 32px; }
.gx-check input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--tint); }
.gx-fu .gx-contact { display: none; }
.gx-fu:has(input[name="followup"]:checked) .gx-contact { display: flex; }
.gx-fu:has(input[name="followup"]:checked) p.gx-contact { display: block; }
.gx-after { display: grid; gap: 8px; margin-top: 14px; }
.gx-thanks { margin-top: 4px; }

/* ---------- staff: dashboard ---------- */
.gx-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .gx-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .gx-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.gx-kpi { display: block; background: var(--bg-elev); box-shadow: var(--shadow); border-radius: var(--r-sm, 12px); padding: 9px 11px; min-width: 0; color: var(--label); text-decoration: none; }
.gx-kpi .v { font-size: 22px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gx-kpi .l { font-size: 11.5px; color: var(--label-2); line-height: 1.35; }
.gx-kpi.good .v { color: var(--green); } .gx-kpi.warn .v { color: var(--orange); } .gx-kpi.bad .v { color: var(--red); }
.gx-bar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.gx-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) { .gx-2 { grid-template-columns: 1fr 1fr; } }
.gx-split { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--fill); margin: 8px 0 6px; }
.gx-split i { display: block; height: 100%; }
.gx-split .d { background: #d92d20; } .gx-split .p { background: #c9a227; } .gx-split .g { background: #12a150; }
.gx-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--label-2); }
.gx-legend b { color: var(--label); font-variant-numeric: tabular-nums; }
.gx-legend .sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 4px; vertical-align: middle; }
.gx-trend { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; align-items: end; height: 120px; margin-top: 10px; }
.gx-trend .col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; font-size: 11px; color: var(--label-2); }
.gx-trend .col i { display: block; width: 70%; max-width: 38px; border-radius: 6px 6px 2px 2px; background: var(--tint); min-height: 2px; }
.gx-trend .col i.neg { background: var(--red); }
.gx-trend .col b { color: var(--label); font-size: 12px; font-variant-numeric: tabular-nums; }
.gx-tbl td.num, .gx-tbl th.num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gx-topics { display: flex; flex-direction: column; gap: 6px; }
.gx-topic { display: grid; grid-template-columns: minmax(0, 9em) 1fr auto; gap: 8px; align-items: center; font-size: 13px; color: var(--label); text-decoration: none; }
.gx-topic .bar { height: 10px; border-radius: 99px; background: var(--fill); overflow: hidden; display: flex; }
.gx-topic .bar i { display: block; height: 100%; }
.gx-topic .bar .neg { background: var(--red); } .gx-topic .bar .pos { background: var(--green); } .gx-topic .bar .neu { background: var(--gray, #8e8e93); opacity: .45; }
.gx-topic .n { font-variant-numeric: tabular-nums; color: var(--label-2); font-size: 12px; white-space: nowrap; }
.gx-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.gx-chip { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--fill); color: var(--label-2); white-space: nowrap; text-decoration: none; }
.gx-chip.red { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.gx-chip.green { background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green); }
.gx-chip.orange { background: color-mix(in srgb, var(--orange) 15%, transparent); color: var(--orange); }
.gx-chip.blue { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }
.gx-score { display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 6px; border-radius: 7px; font-size: 12px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.gx-score.d { background: #d92d20; } .gx-score.p { background: #a16207; } .gx-score.g { background: #087f5b; }
.gx-quote { font-size: 14px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.gx-quote.muted { color: var(--label-2); font-style: italic; }
.gx-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.gx-tabs a { flex: none; display: inline-flex; gap: 6px; align-items: center; padding: 6px 11px; border-radius: 99px; background: var(--bg-elev); box-shadow: var(--shadow); color: var(--label); text-decoration: none; font-size: 13px; }
.gx-tabs a.on { background: var(--tint); color: #fff; }
.gx-tabs a b { font-variant-numeric: tabular-nums; font-size: 12px; opacity: .85; }

/* ---------- staff: case file ---------- */
.gx-case-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gx-sla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
@media (min-width: 700px) { .gx-sla { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gx-sla div { background: var(--fill); border-radius: 10px; padding: 7px 10px; font-size: 12px; color: var(--label-2); }
.gx-sla div b { display: block; color: var(--label); font-size: 13.5px; }
.gx-sla .red b { color: var(--red); } .gx-sla .green b { color: var(--green); } .gx-sla .orange b { color: var(--orange); }
.gx-tl { display: flex; flex-direction: column; gap: 8px; }
.gx-tl .it { display: flex; gap: 9px; align-items: flex-start; }
.gx-tl .it .tile { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.gx-tl .it .b { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.gx-tl .it .m { color: var(--label-2); font-size: 11.5px; }
.gx-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) { .gx-grid { grid-template-columns: 1.1fr 1fr; } }
.gx-warn { padding: 9px 12px; border-radius: var(--r-sm, 12px); background: color-mix(in srgb, var(--orange) 13%, transparent); font-size: 13.5px; }
.gx-danger { padding: 9px 12px; border-radius: var(--r-sm, 12px); background: color-mix(in srgb, var(--red) 11%, transparent); font-size: 13.5px; }
.gx-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.gx-words label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--label-2); }
.gx-words textarea { min-height: 52px; font-size: 12.5px; }
.gx-qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.gx-qr-card { text-align: center; padding: 10px; }
.gx-qr-card canvas { width: 140px; height: 140px; image-rendering: pixelated; }
.gx-qr-card b { display: block; font-size: 13px; margin-top: 4px; }

/* ---------- hotel monthly summary (standalone, print / PDF) ---------- */
.gx-print { font-family: system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; color: #111; background: #f3f3f3; margin: 0; padding: 20px; font-size: 13.5px; }
.gx-print .printable { max-width: 900px; margin: 0 auto; background: #fff; padding: 28px; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.gx-print .head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--hc, #111); padding-bottom: 12px; margin-bottom: 16px; }
.gx-print h1 { margin: 0 0 4px; font-size: 20px; } .gx-print h2 { margin: 20px 0 8px; font-size: 15px; }
.gx-print .muted { color: #555; font-size: 12.5px; line-height: 1.7; }
.gx-print table { width: 100%; border-collapse: collapse; } .gx-print th, .gx-print td { padding: 7px 8px; border-bottom: 1px solid #ddd; text-align: start; vertical-align: top; }
.gx-print th { background: #f6f6f6; font-size: 12px; } .gx-print td.n, .gx-print th.n { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gx-print .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gx-print .box { border: 1px solid #ddd; border-radius: 8px; padding: 8px 10px; } .gx-print .box b { display: block; font-size: 20px; }
.gx-print .ok { color: #15803d; } .gx-print .bad { color: #b91c1c; } .gx-print .ltr { direction: ltr; unicode-bidi: embed; }
.gx-print blockquote { margin: 0 0 8px; padding: 8px 12px; border-inline-start: 3px solid var(--hc, #999); background: #fafafa; font-size: 13px; }
.gx-print blockquote small { display: block; color: #666; font-size: 11px; margin-top: 3px; }
.gx-print .noprint { text-align: center; }
.gx-print .noprint form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.gx-print .sign { display: flex; justify-content: space-between; margin-top: 36px; gap: 24px; } .gx-print .sign div { flex: 1; border-top: 1px solid #999; padding-top: 6px; color: #555; font-size: 12px; }
@media (max-width: 640px) { .gx-print .grid { grid-template-columns: repeat(2, 1fr); } .gx-print { padding: 8px; } .gx-print .printable { padding: 14px; } }
@media print {
  .gx-print { background: #fff; padding: 0; } .gx-print .printable { box-shadow: none; border-radius: 0; max-width: none; padding: 0; }
  .noprint, .no-print { display: none !important; }
  .gx-print h2, .gx-print table, .gx-print blockquote { break-inside: avoid; }
}
