/* ============================================================
   Support v3 — additive patch, loaded AFTER support.css (v21).
   Kept separate so support.css is never rewritten wholesale.
   Additive only: no structural layout overrides.

   v21 contents:
   - Header logo: swap the Site Logo module's rendered image for
     the Hubb.church Support lockup (image 1487224), in CSS only,
     via content:url() so the module's link and alt text stay
     intact. This file only loads on the support templates
     (83155/83156), so the global marketing-site logo is never
     touched. Base sizing (height:34px; width:auto) comes from
     support.css .sv3-brand img.
   - Mobile fit: the lockup is wide (~8:1), so it can't share a
     phone header with both the Contact button and the Menu
     toggle. The logo steps down, the ghost "Back to Hubb.church"
     link drops once the mobile nav appears, and the primary
     Contact button drops on phones (Contact stays reachable via
     the sidebar card and page CTAs).
   - Listing hover: guide-row cards (.sv3-cattiles) get the soft
     .5s hover fade the numbered onboarding rows use, instead of
     the snappy .18s tile default. Reduced-motion still neutralises
     it via the .sv3-topic transition:none rule in support.css.
   - Mobile CTA de-dupe: on the content template the sidebar's
     "Need a hand?" card and the article's own "Still stuck?" CTA
     both appear. Above 900px they sit in separate columns; below
     900px the sidebar drops under the article and the two contact
     panels stack. Hide the in-article CTA below 900px so the
     sidebar card is the single mobile contact box. Kept this way
     round on purpose: the sidebar card is present on every content
     page (category listings carry no in-article CTA), so contact
     stays reachable on phones, where the header Contact button is
     already hidden.
   ============================================================ */

/* Header logo swap (this file only loads on the support templates) */
.sv3-brand img {
  content: url("/Images/Content/82/1487224.png");
}

/* Listing guide-row hover */
.sv3-article .sv3-cattiles a.sv3-topic {
  transition: background-color .5s var(--sv3-ease),
              border-color .5s var(--sv3-ease),
              color .5s var(--sv3-ease),
              box-shadow .5s var(--sv3-ease);
}

/* Mobile header fit */
@media (max-width: 960px) {
  .sv3-brand img { height: 30px; }
  .sv3-header-actions .sv3-btn-ghost { display: none; }
}

@media (max-width: 640px) {
  .sv3-brand img { height: 26px; }
  .sv3-header-actions .sv3-btn-primary { display: none; }
}

/* Mobile CTA de-dupe (content template). Below 900px the sidebar
   stacks under the article, so the in-article "Still stuck?" panel
   and the sidebar "Need a hand?" card sit back to back. Hide the
   in-article panel on mobile; the sidebar card stays as the single
   contact box, and unlike the in-article panel it appears on every
   content page (including category listings). */
@media (max-width: 900px) {
  .sv3-article .sv3-cta-panel { display: none; }
}

/* ============================================================
   v23 — search on content pages (phase 1, revised placement).
   The content template (83156) embeds the SAME search module
   instance as the homepage hero (instance 1422692, type 12,
   wrapper id="sv3-search") at the TOP OF THE SIDEBAR, so it
   matches the right-hand column's 300px width and is sticky
   alongside the cards. (v22 briefly placed it in the crumb bar;
   Adam preferred the column, so the crumb bar is back to
   breadcrumb only and the v22 crumb rules are gone.) The hero
   styling in support.css assumes a 60px input with a heavy
   shadow on a dark panel, so everything below is scoped to
   .sv3-searchwrap-side and the homepage hero is untouched.
   Below 900px the sidebar (and the search with it) stacks under
   the article, matching the other sidebar cards.
   ============================================================ */

.sv3-searchwrap-side {
  margin: 0;
  position: relative;
}

/* Compact, light-background restyle of the shared search module */
.sv3-searchwrap-side #sv3-search input[type="text"],
.sv3-searchwrap-side #sv3-search input[type="search"] {
  height: 44px;
  padding: 0 64px 0 40px;
  border-color: var(--sv3-gray-300);
  box-shadow: none;
  font-size: 14px;
}
.sv3-searchwrap-side #sv3-search input[type="text"]:focus,
.sv3-searchwrap-side #sv3-search input[type="search"]:focus {
  border-color: var(--sv3-purple-light);
  box-shadow: 0 0 0 3px rgb(95 92 167 / 0.15);
}
.sv3-searchwrap-side #sv3-search input[type="submit"],
.sv3-searchwrap-side #sv3-search input[type="button"],
.sv3-searchwrap-side #sv3-search button {
  height: 34px;
  line-height: 34px;
  padding: 0 14px;
  right: 5px;
  font-size: 13px;
}
.sv3-searchwrap-side .sv3-search-icon {
  left: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--sv3-gray-400);
}

/* ============================================================
   v24 — system page template (AA Support v3 System).
   System pages (search results, login, T&Cs, privacy, help etc.)
   render in whichever template is assigned to "System" in the
   web office. The v3 System template shares this stylesheet, so
   the version-bump rule covers THREE heads from here on: 83155,
   83156 and the System template. The platform injects its output
   into two special modules: System Page Left Column (type 83,
   instance 1422741, wrapper id="sv3-sysleft") then System Page
   Content (type 82, instance 1422740, wrapper id="sv3-syscontent").
   Their inner markup is platform-generated ASP.NET whose class
   names we don't control, so these rules style at element level
   inside the wrapper. Deliberately restrained: a readable first
   render to polish from a screenshot once the template is live.
   Additive only.
   ============================================================ */

.sv3-syspage {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 0 72px;
  font-size: 15px;
  line-height: 1.6;
}

/* Generic form controls emitted by system pages (search filters,
   login boxes and so on) */
.sv3-syspage input[type="text"],
.sv3-syspage input[type="search"],
.sv3-syspage input[type="password"],
.sv3-syspage input[type="email"],
.sv3-syspage select,
.sv3-syspage textarea {
  font: inherit;
  padding: 8px 12px;
  border: 1px solid var(--sv3-gray-300);
  border-radius: 8px;
  background: #fff;
  max-width: 100%;
  box-sizing: border-box;
}
.sv3-syspage input[type="submit"],
.sv3-syspage input[type="button"],
.sv3-syspage button {
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 20px;
  border: 0;
  border-radius: 999px;
  background: #5f5ca7;
  color: #fff;
  cursor: pointer;
}
.sv3-syspage input[type="submit"]:hover,
.sv3-syspage input[type="button"]:hover,
.sv3-syspage button:hover {
  background: #4e4b91;
}

/* Platform output is table-heavy; keep it inside the column */
.sv3-syspage table { max-width: 100%; }
.sv3-syspage img { max-width: 100%; height: auto; }

/* Breathing room between the two system slots when both render */
#sv3-sysleft:not(:empty) { margin-bottom: 24px; }

@media (max-width: 900px) {
  .sv3-syspage { padding: 8px 0 48px; }
}

/* ============================================================
   v25 — homepage section heads centred.
   The "Product help / Browse help by topic" and "Technical &
   account / Technical and account help" section heads looked
   fine full-width but sat oddly at laptop widths, so they are
   centred (Adam, 18 July). .sv3-section-head only occurs in
   those two homepage sections; auto margins also centre the
   block itself in case the base styles cap its width.
   ============================================================ */

.sv3-section-head {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   v26 — search results polish (system page, live markup pass).
   Styled from the real class names Adam supplied from the live
   page (18 July): .system_controls filter bar, .system_row
   result rows, .system_pager. All scoped inside .sv3-syspage so
   nothing outside the system template is touched. Decisions:
   - Result rows become guide-style cards (border, radius, soft
     .5s hover) matching the support site's listing rows.
   - The .site_name_column ("Hubb.church" on every row) is
     hidden: the support search only ever returns this site, so
     the label is pure noise. Revisit if the "related sites"
     scope ever becomes a thing on the support site.
   - .search_article_image:empty collapses the empty thumbnail
     cell; if the platform ever emits whitespace inside it the
     :empty selector stops matching, which is harmless (an empty
     borderless flex item renders invisibly anyway).
   - Pager prev/next become pill buttons; .aspNetDisabled is the
     platform's "you're on the first/last page" state.
   ============================================================ */

/* Page title ("Search", "Login" etc.) breathing room */
.sv3-syspage h1 { margin-bottom: 18px; }

/* Filter bar: soft rounded panel */
.sv3-syspage .system_controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  padding: 14px 16px;
  margin: 4px 0 26px;
  background: #f8f8fb;
  border: 1px solid var(--sv3-gray-300);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
}
.sv3-syspage .system_option {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.sv3-syspage .search_option_right { margin-left: auto; }
.sv3-syspage .system_controls select { height: 38px; padding-top: 0; padding-bottom: 0; }
.sv3-syspage .system_controls input[type="text"] { height: 38px; width: 200px; padding-top: 0; padding-bottom: 0; }

/* Section header: "Articles" + result count */
.sv3-syspage .system_section_header h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 800;
}
.sv3-syspage .search_result_count {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
}

/* Result rows as guide cards */
.sv3-syspage .system_row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  margin: 0 0 12px;
  background: #fff;
  border: 1px solid #e6e6ef;
  border-radius: 14px;
  transition: border-color .5s var(--sv3-ease), box-shadow .5s var(--sv3-ease);
}
.sv3-syspage .system_row:hover {
  border-color: var(--sv3-purple-light);
  box-shadow: 0 6px 18px rgb(47 46 92 / 0.06);
}
.sv3-syspage .system_row > .system_column { min-width: 0; }
.sv3-syspage .system_row > .system_column:nth-child(2) { flex: 1 1 auto; }

/* Thumbnail cell: collapse when empty, tidy when present */
.sv3-syspage .search_article_image { flex: 0 0 auto; }
.sv3-syspage .search_article_image:empty { display: none; }
.sv3-syspage .search_article_image img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* Site label: single-site support search, so it's noise */
.sv3-syspage .site_name_column { display: none; }

/* Result text */
.sv3-syspage .search_article_title {
  display: block;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  color: inherit;
  text-decoration: none;
  margin: 0 0 4px;
}
.sv3-syspage .search_article_title:hover { color: #5f5ca7; }
.sv3-syspage .search_article_summary {
  color: #5b616e;
  font-size: 14.5px;
  margin: 0 0 6px;
}
.sv3-syspage .search_article_more {
  font-size: 13.5px;
  font-weight: 700;
  color: #5f5ca7;
  text-decoration: none;
}
.sv3-syspage .search_article_more:hover { text-decoration: underline; }

/* Pager: centred, pill prev/next */
.sv3-syspage .system_pager {
  display: flex;
  justify-content: center;
  margin: 22px 0 4px;
}
.sv3-syspage .system_pager span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.sv3-syspage .system_pager a {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--sv3-gray-300);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: #5f5ca7;
  text-decoration: none;
  transition: border-color .5s var(--sv3-ease);
}
.sv3-syspage .system_pager a:hover { border-color: var(--sv3-purple-light); }
.sv3-syspage .system_pager a.aspNetDisabled {
  color: #9aa0ab;
  border-color: #e6e6ef;
  pointer-events: none;
}
.sv3-syspage .system_pager select { height: 36px; padding-top: 0; padding-bottom: 0; }

/* Error text emitted by the platform */
.sv3-syspage .validator { color: #b4232a; }

/* Phones */
@media (max-width: 640px) {
  .sv3-syspage .system_controls { gap: 10px 16px; }
  .sv3-syspage .search_option_right { margin-left: 0; }
  .sv3-syspage .system_controls input[type="text"] { width: 100%; }
  .sv3-syspage .search_article_image { display: none; }
}

/* ============================================================
   v27 — search results refinements (Adam's review, 18 July).
   - Sort by moves out of the filter panel onto the "Articles
     (…)" heading row, right-aligned (relocated by js/syspage.js
     v1, loaded by template 83157 only; the .sv3-sysort class is
     added by that script). With it gone, the panel is one
     streamlined row: scope / type / term / Search button.
   - The platform's system.css paints every .system_column as a
     grey cell (table-cell, 10px padding, #f6f6f6 background,
     white border) — inside our white cards that read as grey
     boxes with double padding. Flattened here, which also fixes
     "more..." to sit left with the text instead of floating.
   - Card padding trimmed now the inner cell padding is gone.
   - These rules target the generic .system_column/.system_row
     classes, so media results (Media (n found) sections, as on
     the town church) inherit the same card treatment.
   ============================================================ */

/* Panel: Sort by has left, so tighten the gap under it */
.sv3-syspage .system_controls { margin-bottom: 22px; }

/* Heading row: "Articles (…)" left, Sort by right */
.sv3-syspage .system_section_header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 16px;
}
.sv3-syspage .system_section_header h2 {
  flex: 1 1 auto;
  margin: 0;
}
.sv3-syspage .sv3-sysort {
  font-size: 13.5px;
  font-weight: 600;
  color: #6b7280;
}
.sv3-syspage .sv3-sysort select { height: 34px; }

/* Flatten the platform's grey cells inside our cards */
.sv3-syspage .system_row > .system_column {
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
}
.sv3-syspage .system_row { padding: 14px 18px; }

/* more... sits left with the text, not floated right */
.sv3-syspage .search_article_more {
  float: none;
  display: inline-block;
}

/* ============================================================
   v28 — on-brand result cards + author column fix (Adam, 18 July).
   - BUG FIX: the v27 flatten rule (.system_row > .system_column,
     three class selectors) out-ranks the v26 site-name hide (two),
     so its display:block resurrected the "Hubb.church" label on
     every card. Re-hidden below at higher specificity. Same belt
     for the empty-thumbnail collapse, which the flatten rule also
     out-ranked (harmless — an empty block renders nothing as a
     flex item — but tidier gone).
   - Result cards adopt the category-listing row look from the
     content pages (Adam: "hazey purple", brand consistency):
     haze background --sv3-gray-50, transparent border, easing to
     white with a lilac border and a soft shadow on hover, same
     .5s fade and 12px radius as the listing rows. Generic
     .system_row selector, so media results inherit it too.
   ============================================================ */

/* Hidden columns, re-asserted above the v27 flatten rule */
.sv3-syspage .system_row > .system_column.site_name_column { display: none; }
.sv3-syspage .system_row > .search_article_image:empty { display: none; }

/* Cards match the category listing rows */
.sv3-syspage .system_row {
  background: var(--sv3-gray-50);
  border-color: transparent;
  border-radius: var(--sv3-radius);
  transition: background-color .5s var(--sv3-ease),
              border-color .5s var(--sv3-ease),
              box-shadow .5s var(--sv3-ease);
}
.sv3-syspage .system_row:hover {
  background: var(--sv3-white);
  border-color: var(--sv3-purple-light);
  box-shadow: var(--sv3-shadow-sm);
}

/* ============================================================
   v29 — minimal support-only footer (Adam, 18 July).
   The support site now stands on its own (own header, own
   menus), so the full sales-site footer grid no longer belongs.
   js/footer.js (new, loaded by all three heads AFTER support.js)
   replaces the built grid with a slim row: brand line + Support
   home / Getting started guides / Contact support / Back to
   Hubb.church. The footer-bottom bar (legal links module 1422693)
   is untouched. The raw sales footer article (.sv3-salesfooter)
   is hidden here in CSS too, so even with JS off nobody sees the
   sales links — the no-JS footer is just the legal bar.
   ============================================================ */

/* No-JS belt: never show the raw sales footer article */
.sv3-salesfooter { display: none; }

/* Minimal footer row (markup built by js/footer.js) */
.sv3-footer { padding: 36px 0 30px; }
.sv3-sfgrid.sv3-minfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  flex-wrap: wrap;
}
.sv3-minfoot-brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--sv3-gray-950);
}
.sv3-minfoot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  font-size: 14px;
  font-weight: 600;
}
.sv3-minfoot-links a {
  color: var(--sv3-gray-600);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color .2s ease, text-decoration-color .3s ease;
}
.sv3-minfoot-links a:hover {
  color: var(--sv3-purple);
  text-decoration-color: var(--sv3-purple-light);
}

/* With the grid gone the bottom bar needs less air above it */
.sv3-footer .sv3-footer-bottom {
  margin-top: 24px;
  padding-top: 20px;
}

/* ============================================================
   v30 (SUPERSEDED by v31) — first alignment attempt. Hid the
   thumbnail cell only when it held no <img> (:not(:has(img))).
   The real card markup (confirmed 18 July) shows articles DO
   carry a real thumbnail img, so this rule correctly left them
   alone — but that's exactly the problem: thumbnailed cards are
   indented by the image while thumbnail-less cards (groups) sit
   flush, so the list stayed ragged. Kept below for history; v31
   makes it moot.
   ============================================================ */

.sv3-syspage .system_row > .search_article_image:not(:has(img)) {
  display: none;
}

/* ============================================================
   v31 — result cards: drop the thumbnail column (Adam, 18 July).
   Confirmed live card markup:
     <div class="system_row">
       <div class="system_column search_article_image"><a><img></a></div>
       <div class="system_column"> title / summary / more... </div>
       <div class="system_column site_name_column">Hubb.church</div>
     </div>
   The thumbnail is a leading .system_column.search_article_image.
   Where an article has one it indents the text; groups and
   thumbnail-less articles have no image, so they sit flush — a
   ragged left edge down the list. The v26 :empty and v30
   :not(:has(img)) hides only ever caught genuinely image-less
   cells, never a real thumbnail, so the raggedness remained.
   Fix, and the most on-brand option (the category listing rows
   are text + icon, no thumbnails): hide the thumbnail column on
   every result card so all titles align flush-left. Supersedes
   the v26/v30 thumbnail hides. To bring thumbnails back, remove
   this and instead reserve a fixed-width image column on EVERY
   card (present-or-empty) so the indent is uniform.
   ============================================================ */

.sv3-syspage .system_row > .search_article_image {
  display: none;
}

/* ============================================================
   v32 — Help guides mega at 6 columns (Adam, 21 July).
   The guides mega-menu grew to 18 entries when Shop joined; the
   base rule in support.css still pins it to 7 columns (written
   when the menu had 13 items, balancing 7 + 6), which now falls
   7 / 7 / 4. Six columns gives three even rows of six. The base
   rule stays put; this file loads after support.css and the
   selector matches it exactly (same specificity, later in the
   cascade, same min-width breakpoint), so this wins on desktop.
   The ≤960px mobile menu (2 columns) and the Getting started
   mega (9 items, repeat(5)) are untouched. If the menu count
   changes again, re-balance here: pick the column count that
   divides the entries most evenly.
   ============================================================ */

@media (min-width: 961px) {
  #sv3-mega-guides .sv3-topics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ============================================================
   v33 — Site Manager block in "Browse help by topic" (Adam,
   24 July). Most people work in the Site Manager, so the topic
   grid (and the guides mega) now lead with Site Manager as its
   own panel: a grey box (the homepage tile grey, --sv3-gray-50)
   holding white tiles for the Site Manager sub-areas, above the
   ordinary topic grid. The single "Site manager" tile is gone
   from the topic list (one fewer). The panel's grid keeps class
   .sv3-topics, so it inherits the tile look, accent cycling,
   hover, reveal and responsive rules; only the tile background
   flips to white so the tiles read as cards on the grey panel.
   Applied on 83155 (homepage section + guides mega) and the
   guides mega in 83156/83157. Mega variant is more compact.
   ============================================================ */

.sv3-smbox {
  background: var(--sv3-gray-50);
  border: 1px solid var(--sv3-gray-200);
  border-radius: var(--sv3-radius-xl);
  padding: 26px 28px 30px;
  margin-bottom: 20px;
}
.sv3-smbox-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sv3-purple);
  margin-bottom: 16px;
}

/* White tiles on the grey panel */
.sv3-smbox .sv3-topic { background: var(--sv3-white); border-color: transparent; }
.sv3-smbox .sv3-topic:hover {
  background: var(--sv3-white);
  border-color: var(--sv3-purple-light);
  box-shadow: var(--sv3-shadow-sm);
}

/* Compact panel inside the guides mega dropdown */
.sv3-mega .sv3-smbox {
  padding: 14px 16px 16px;
  margin-bottom: 14px;
  border-radius: var(--sv3-radius);
}
.sv3-mega .sv3-smbox-label { margin-bottom: 10px; }

/* ============================================================
   v34 — steady, tidy category rows (Adam, 24 July). On category
   pages js/support.js rebuilds the group/guide listing into rows
   after the page has painted, building each row title-first and
   pulling its summary in a moment later — so rows grow and shove
   one another as the text lands. Give every row a fixed two-line
   summary slot: the space is reserved up front, so a late summary
   drops into place instead of pushing the list around, and clamp
   the summary to two lines so nothing over-runs the slot (the full
   summary is always on the category's own page). The rebuilt list
   also eases in rather than snapping from the raw server list.
   The .sv3-cattile-* styling itself lives in drawer.css Section B
   and is untouched; this only reserves space, clamps and fades.
   Numbered onboarding rows (.sv3-numbered) are excluded.
   ============================================================ */

.sv3-article .sv3-cattiles:not(.sv3-numbered) a.sv3-topic { min-height: 100px; }
.sv3-article .sv3-cattiles:not(.sv3-numbered) .sv3-cattile-d {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  html.sv3-js .sv3-article .sv3-cattilegrid,
  html.sv3-js .sv3-article .sv3-cattiles {
    animation: sv3-fade .35s var(--sv3-ease) both;
  }
}
