/*
 * The page's look is the theme and the "Stewardship Page" L&L style. This is
 * only what the plugin adds: state gates and the editors' preview dock. The
 * licence-key form's styles are in find.css (the editor loads them too).
 */

/* Hidden until the page knows which state it's in. Layout classes set display
   on groups, so [hidden] needs the !important too. */
:root:not(.ldxsp-is-found) .ldxsp-when-found,
:root:not(.ldxsp-is-not-found) .ldxsp-when-not-found,
:root:not(.ldxsp-has-paypal-cancel) .ldxsp-when-paypal-cancel,
[class*="ldxsp-"][hidden] {
  display: none !important;
}

/* Editors' preview dock. */
.ldxsp-dock {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #1e1033;
  color: #fff;
  font: 600 14px/1.2 system-ui, sans-serif;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25);
}
.ldxsp-dock__note {
  font-weight: 400;
  opacity: 0.7;
}
/* The theme colours form labels and links dark, which vanished on the dock.
   `body` lifts this above the theme's label rules without !important. */
body .ldxsp-dock label,
body .ldxsp-dock a {
  margin: 0;
  color: #fff;
}
body .ldxsp-dock label {
  font: inherit;
}
body .ldxsp-dock a {
  font-weight: 400;
  text-decoration: underline;
  white-space: nowrap;
}
.ldxsp-dock select {
  max-width: 60vw;
  font: inherit;
  font-weight: 400;
}
/* Licence-key form (Figma: Find Your Plan). Scoped under form.ldxsp-find to
   outrank Tangible UI's button and input resets (.tui-interface [type=…]),
   which Marketeer loads on this site. */
form.ldxsp-find .ldxsp-find__label {
  display: block;
  margin: 0 0 8px;
  font-size: var(--wp--preset--font-size--small);
  font-weight: 700;
  color: var(--wp--preset--color--purple-800);
}
form.ldxsp-find .ldxsp-find__row {
  display: flex;
  gap: 16px;
}
form.ldxsp-find .ldxsp-find__input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--wp--preset--color--gray-300, #cfcfd6);
  border-radius: 8px;
  background: var(--wp--preset--color--base, #fff);
  font: inherit;
  color: var(--wp--preset--color--gray-800);
}
form.ldxsp-find .ldxsp-find__input:focus-visible,
form.ldxsp-find .ldxsp-find__button:focus-visible {
  outline: 2px solid var(--wp--preset--color--purple-500);
  outline-offset: 2px;
}
form.ldxsp-find .ldxsp-find__button {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--wp--preset--color--purple-600);
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wp--preset--color--purple-600);
  cursor: pointer;
}
form.ldxsp-find .ldxsp-find__button:hover {
  background: var(--wp--preset--color--accent-5);
}
form.ldxsp-find .ldxsp-find__status:empty {
  display: none;
}
form.ldxsp-find .ldxsp-find__status {
  margin: 12px 0 0;
  color: var(--wp--preset--color--gray-700);
}
@media (max-width: 600px) {
  form.ldxsp-find .ldxsp-find__row {
    flex-direction: column;
  }
}
