/* FreelanceReach — final "neat and clean" pass (4 Nov 2026). Loaded last, after salesbd.css.
   Only spacing, alignment and sizing: no colours, no z-index, nothing on html.kb-open, the bottom bar, the inbox panes'
   heights, .sticky-save or the settings menu's stickiness. Low specificity on purpose so a tab's own rule still wins. */

/* ---- 1. One control height on a mouse screen: a button is as tall as the field beside it (42px), and a segmented
   control (3 + 36 + 3) matches too, so "search box + button" and "tabs + filter" rows line up edge to edge.
   Touch screens keep their 44px targets from styles.css (@media (pointer: coarse)); .btn.sm stays 32px. ---- */
@media (pointer: fine) {
  .btn:where(:not(.sm)) { min-height: 42px; }
  .seg button { min-height: 36px; }
}

/* ---- 2. Cards in a .stack (Leads, Groups) sat 28px apart (the stack's 12px gap plus .card + .card's 16px);
   everywhere else cards are 16px apart. ---- */
.stack > .card + .card { margin-top: 4px; }

/* ---- 2b. The multi-pick filter ("All sources" on Leads) is a field like the selects beside it: same height and corners
   (it was 40px with 8px corners next to 42px fields with 10px corners). ---- */
.msel > summary { min-height: 42px; border-radius: 10px; }

/* ---- 3. Settings section menu on a wide screen: smaller chips and gaps, so the sticky menu takes two rows instead of
   three and covers less of the page while scrolling. ---- */
@media (min-width: 900px) and (pointer: fine) {
  .set-menu { gap: 6px; }
  .set-menu .chip { min-height: 30px; padding: 3px 11px; font-size: 0.8125rem; }
}

/* ---- 4. Phone ---- */
@media (max-width: 520px) {
  /* segmented controls: four options (Alerts, Groups) fit the card instead of scrolling with the last one cut off */
  .seg button { padding: 0 8px; font-size: 0.8125rem; }

  /* a card's actions drop under its title on a phone: line their labels up with the title text (6px head padding +
     58px + the button's 12px padding = the title's 76px), instead of floating between the icon and the title */
  .card-head > .card-actions { margin-left: 58px; max-width: calc(100% - 58px); }

  /* Home: the per-account Telegram status pills are one swipeable line (edge to edge, faded at the ends)
     instead of five rows of 44px pills; "Needs a look" above already names the accounts that need attention */
  #tab-home > .pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -16px;
    padding: 2px 28px 2px 16px;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent);
  }
  #tab-home > .pills::-webkit-scrollbar { display: none; }
  #tab-home > .pills > * { flex: none; }

  /* Leads: the "who is posting" filter chips are one swipeable line (like the Settings section menu on a phone)
     instead of three rows of chips above the list */
  .row.intent-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 28px 2px 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  .row.intent-chips::-webkit-scrollbar { display: none; }
  .row.intent-chips > * { flex: none; }
}
/* a narrow phone (360px): the four Alerts options still fit */
@media (max-width: 380px) { .seg button { padding: 0 6px; } }
