html { scroll-padding-top: 86px; }  /* clears the sticky header on anchor jumps */

/* Integrations Page
   A searchable, filterable, paged directory of every form-plugin x app
   combination. Webfont faces live in fonts.css, which every page links first.
   The markup is generated from data (tools/build-integrations.js), so this
   file styles by class rather than repeating inline styles per card. */

:root {
  --purple: #5B2FE0;
  --purple-dark: #3D1B9E;
  --teal: #12B5A5;
  --ink: #171B36;
  --faint: #8b83a3;
  --lilac: #f6f2fe;
}

* { box-sizing: border-box; }

/* Cards and the pager carry a display rule of their own, which outranks the
   UA stylesheet's [hidden] — make hidden win, since the filtering toggles it. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Poppins', system-ui, sans-serif; margin: 0; }
a { color: var(--purple); text-decoration: none; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Shared header nav (see nav.js) */

/* ---------------------------------------------------------------
   Brand tiles — --brand carries each product's colour from the markup
   --------------------------------------------------------------- */
/* Holds the real plugin/app icon copied from the plugin's admin/images.
   The tile itself is a neutral chip so each brand's own colours read
   correctly instead of sitting on a tinted square. */

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.hero {
  background: linear-gradient(180deg, #fff 0%, var(--lilac) 100%);
  padding: 52px 0 40px;
  text-align: center;
}

.hero h1 {
  font-weight: 800;
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0;
}

/* ---------------------------------------------------------------
   Toolbar: search + filters.

   It used to be sticky, riding up under the header and sitting over
   the cards as you scrolled. It stays in its own band now — the
   translucent fill and blur went with the stickiness, since there is
   no longer anything passing underneath it to show through.

   scroll-margin-top stays: the site header is still sticky, and
   integrations.js scrolls back to this band when you page through
   results.
   --------------------------------------------------------------- */
.toolbar-wrap {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 18px 0 14px;
  scroll-margin-top: 86px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) repeat(3, minmax(158px, 1fr));
  gap: 12px;
  align-items: end;
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
  letter-spacing: .02em;
}

.field input,
.field select {
  width: 100%;
  height: 46px;
  border: 1.5px solid #e6ddfb;
  border-radius: 12px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field input:focus,
.field select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(91, 47, 224, .12);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  /* caret drawn in CSS so the control matches across browsers */
  background-image:
    linear-gradient(45deg, transparent 50%, var(--faint) 50%),
    linear-gradient(135deg, var(--faint) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.field-search input { font-size: 15px; }

.toolbar-status {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 20px; /* holds its space whether or not Clear is showing */
  margin-top: 12px;
  flex-wrap: wrap;
}

.clear, .linkish {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--purple);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.clear:hover, .linkish:hover { color: #FF4D6D; }

/* ---------------------------------------------------------------
   Combination cards
   --------------------------------------------------------------- */
.results { padding: 34px 0 8px; }

/* ---------------------------------------------------------------
   Combo: the searchable dropdown that stands in for a <select>.

   The native <select> stays in the markup and stays the source of
   truth — combo writes back to it and fires `change`, so the filter
   logic never knows the difference and the page still filters if the
   script does not run. Twenty trigger apps is more than a native
   dropdown wants to hold, hence the search box.
   --------------------------------------------------------------- */
.field select.is-enhanced { display: none; }

.combo { position: relative; }

.combo-btn {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.combo-btn:hover { border-color: #d9cbfa; }
.combo-btn:focus-visible,
.combo.is-open .combo-btn {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(91, 47, 224, .12);
}
.combo-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.combo-caret {
  flex: none;
  color: var(--faint);
  font-size: 12px;
  transition: transform .18s ease;
}
.combo.is-open .combo-caret { transform: rotate(180deg); }

.combo-ico {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 3px;
  box-sizing: border-box;
  display: flex;
}
.combo-ico img, .combo-ico svg { width: 100%; height: 100%; object-fit: contain; }

/* --- the panel ----------------------------------------------------- */
.combo-pop {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 50px rgba(23, 49, 102, .16);
  overflow: hidden;
}
.combo-search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.combo-search svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--faint); stroke-width: 2; }
.combo-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}
.combo-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 286px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.combo-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.combo-opt.is-active { background: var(--lilac); }
.combo-opt.is-on { color: var(--purple); font-weight: 600; }
.combo-opt.is-on::after { content: '\2713'; margin-left: auto; font-size: 12px; flex: none; }
.combo-none { padding: 20px 14px; text-align: center; font-size: 13.5px; color: var(--faint); }

.no-results {
  text-align: center;
  font-size: 16px;
  color: var(--muted);
  padding: 56px 24px;
  line-height: 1.6;
}

/* ---------------------------------------------------------------
   Pager
   --------------------------------------------------------------- */
.pager {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 0 8px;
}
.page-summary {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.page-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.page-list { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.page-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.page-btn:hover:not(:disabled):not(.is-current) { border-color: var(--purple); background: var(--lilac); }
.page-btn:disabled { opacity: .4; cursor: default; }
.page-btn.is-current {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
  cursor: default;
}
.page-num { padding: 0; }
.page-gap { color: var(--faint); padding: 0 2px; }

/* ---------------------------------------------------------------
   Missing-integration prompt
   (the copyright bar below it is the shared one, styled inline)
   --------------------------------------------------------------- */
/* Closes the page on the same white-to-lilac wash the hero opens with,
   so the two bookend the card grid between them. It was a solid purple
   slab, which sat between a white grid and a dark footer as a third
   colour belonging to neither. */
.missing {
  margin-top: 56px;
  background: linear-gradient(180deg, #fff 0%, var(--lilac) 100%);
  border-top: 1px solid var(--line);
  color: var(--ink);
  padding: 64px 0 72px;
  text-align: center;
}
.missing h2 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.missing p { font-size: 16px; color: var(--muted); margin: 0 auto 26px; max-width: 560px; line-height: 1.55; }

.cta {
  display: inline-block;
  background: linear-gradient(135deg, #FF6B57, #FF3D6E);
  color: #fff;
  border-radius: 12px;
  padding: 15px 32px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 10px 22px rgba(255, 61, 110, .3);
  transition: transform .15s ease, box-shadow .15s ease;
}
/* Explicit and higher-specificity than the global `a:hover` (base.css),
   which would otherwise repaint this link's text var(--accent) — nearly
   the same pink as this button's own background, hiding the label. */
.cta:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 32px rgba(255, 61, 110, .42); }

/* ---------------------------------------------------------------
   Narrower screens: the toolbar reflows before it squeezes
   --------------------------------------------------------------- */
@media (max-width: 1080px) {
  .toolbar { grid-template-columns: repeat(3, 1fr); }
  .field-search { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .toolbar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .hero { padding: 36px 0 30px; }
  .hero h1 { font-size: 30px; }
  .toolbar { grid-template-columns: repeat(2, 1fr); }
  .missing h2 { font-size: 24px; }
}

/* Phones: one filter per row, not two squeezed side by side */
@media (max-width: 480px) {
  .toolbar { grid-template-columns: 1fr; }
}
