/* SwiftGigs — big tech UX wave 2 (additive)
 *
 * Fully token-driven. The body.light rules this file used to carry are gone:
 * the base rules use --surface, --border, --text and --text-muted, which
 * already flip with the theme, so an override could only restore the old
 * palette.
 */

.qg-hscroll {
  display: flex; gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 4px 2px 10px; scrollbar-width: none;
}
.qg-hscroll::-webkit-scrollbar { display: none; }
.qg-mini-card {
  flex: 0 0 200px; padding: 12px; border-radius: 14px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); display: block;
}
.qg-mini-card .tit { font-size: 13px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qg-mini-card .meta { font-size: 11px; margin-top: 6px; color: var(--text-muted); }

.qg-section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin: 0 0 10px; padding: 0 2px;
}
.qg-section-head h3 { font-size: 14px; font-weight: 700; margin: 0; }
.qg-section-head a { font-size: 12px; color: var(--accent); text-decoration: none; }

/* Amber surfaces use the soft/strong pair rather than a solid --attention fill.
   The two themes sit on opposite sides of the lightness midpoint — dark mode's
   amber is light, light mode's is a dark brown — so no single label colour
   works on a solid fill, the same problem --danger-text had to solve. */
.qg-streak-card {
  margin: 0 16px 16px; padding: 14px 16px; border-radius: 14px;
  background: var(--attention-soft); border: 1px solid color-mix(in srgb, var(--attention) 28%, transparent);
}
.qg-streak-title { font-size: 15px; font-weight: 600; }
.qg-streak-sub { font-size: 12px; margin-top: 4px; opacity: 0.75; line-height: 1.45; }

.qg-offline-banner {
  position: sticky; top: 0; z-index: 120; display: none;
  padding: 8px 14px; text-align: center; font-size: 12px; font-weight: 600;
  background: var(--attention-soft); color: var(--attention);
  border-bottom: 1px solid color-mix(in srgb, var(--attention) 35%, transparent);
}
.qg-offline-banner.show { display: block; }

/* Flat strip, matching the mockup's announcement bar — no purple gradient. */
.qg-announce-bar {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  padding: 10px 14px; font-size: 13px; line-height: 1.4;
  background: var(--surface);
  border-bottom: 1px solid var(--border); color: var(--text);
}
.qg-announce-bar a { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.qg-announce-bar button {
  margin-left: auto; border: none; background: transparent; color: var(--text-muted);
  font-size: 18px; cursor: pointer; min-width: 36px; min-height: 36px;
}

.qg-active-filters {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 18px 0; align-items: center;
}
.qg-active-filters:empty { display: none; }
.qg-af-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 999px; font-size: 11px;
  background: var(--accent); color: var(--accent-text); border: none; cursor: pointer;
  min-height: 28px; font-family: inherit;
}
.qg-af-clear { font-size: 12px; color: var(--accent); background: none; border: none; cursor: pointer; text-decoration: underline; font-family: inherit; }

.qg-budget-row { padding: 10px 18px 0; }
.qg-budget-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.qg-dual-range { position: relative; height: 28px; }
.qg-dual-range input[type=range] {
  position: absolute; left: 0; width: 100%; pointer-events: none; appearance: none;
  background: transparent; height: 28px; margin: 0;
}
.qg-dual-range input[type=range]::-webkit-slider-thumb {
  pointer-events: auto; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface); cursor: pointer; margin-top: -7px;
}
.qg-dual-range input[type=range]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px; background: var(--border);
}
.qg-budget-chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 0; scrollbar-width: none; }
.qg-budget-chips::-webkit-scrollbar { display: none; }
.qg-bchip {
  padding: 10px 14px; border-radius: 999px; font-size: 12px; white-space: nowrap;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; font-family: inherit; min-height: 44px;
}
.qg-bchip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

.qg-field-quality { font-size: 12px; margin-top: 6px; line-height: 1.4; color: var(--text-muted); }
.qg-field-quality.good { color: var(--green); }
.qg-field-quality.warn { color: var(--attention); }

.qg-inline-edit { cursor: pointer; border-radius: 8px; padding: 2px 4px; margin: -2px -4px; }
.qg-inline-edit:hover { background: var(--surface-alt); }
.qg-inline-tools { display: flex; gap: 6px; margin-top: 8px; }
.qg-inline-tools button {
  min-height: 36px; padding: 6px 12px; border-radius: 10px; border: none;
  font: inherit; cursor: pointer;
}
.qg-inline-save { background: var(--primary); color: var(--primary-text); }
.qg-inline-cancel { background: var(--surface-alt); color: var(--text); border: 1px solid var(--border); }

.qg-review-summary {
  display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px;
  padding: 14px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border);
}
.qg-rev-avg { font-size: 36px; font-weight: 700; line-height: 1; }
.qg-rev-stars { color: var(--attention); font-size: 14px; margin: 4px 0; }
.qg-rev-bars { flex: 1; }
.qg-rev-bar-row { display: flex; align-items: center; gap: 8px; font-size: 11px; margin: 3px 0; }
.qg-rev-bar-track { flex: 1; height: 6px; border-radius: 6px; background: var(--surface-alt); overflow: hidden; }
.qg-rev-bar-fill { height: 100%; background: var(--attention); border-radius: 6px; }

.qg-new-msg-pill {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 12px; z-index: 5; display: none;
  padding: 8px 14px; border-radius: 999px; border: none;
  background: var(--primary); color: var(--primary-text); font: inherit; font-size: 12px;
  cursor: pointer; min-height: 36px;
}
.qg-new-msg-pill.show { display: inline-flex; align-items: center; }
.bubble-row.grouped { margin-top: 2px; }
.bubble-row.grouped .bubble-time { display: none; }
.bubble-check { font-size: 10px; opacity: 0.65; margin-left: 4px; }
.typing-bubble {
  display: none; padding: 8px 14px; border-radius: 18px; font-size: 12px;
  background: var(--surface-alt); color: var(--text-muted);
  margin: 6px 0 10px; width: fit-content;
}
.typing-bubble.show { display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  .qg-confetti-root { display: none !important; }
}
