/* ==========================================================================
   vivce#1086 — Registration wall (guest-only). Enqueued by lib/registration-wall.php
   only while the wall is on and the visitor is a guest.

   Visual language = the launch homepage (css/home-launch.css, #1085):
     teal      #0D7377  white text 5.62:1 (AA)   — primary button, links, lock
     teal deep #0A5C5F  white text 7.75:1 (AAA)  — hover
     wash      #E6F4F4  teal text 4.98:1 (AA)    — chips, lock badge, note
     ink       #18191C  / slate #5E626E
   Montserrat for headings (the theme already loads it), Inter for body.
   The teal underline swoosh reuses img/blue-shape.png (critical-child.css).
   The explainer modal reuses template-parts/global/modal.php + .modal-form.
   ========================================================================== */

.wall-search,
.library-wall,
.wall-explainer {
  --wall-teal: var(--color-teal, #0D7377);
  --wall-teal-deep: var(--color-teal-deep, #0A5C5F);
  --wall-wash: var(--color-wash, #E6F4F4);
  --wall-wash-line: var(--color-wash-line, #C9E6E4);
  --wall-ink: var(--color-black-10, #18191C);
  --wall-ink-2: var(--color-black-20, #2F3137);
  --wall-slate: var(--color-grey-40, #5E626E);
  --wall-line: var(--color-grey-90, #E3E4E7);
  --wall-white: var(--color-white, #ffffff);
  --wall-display: "Montserrat", "Inter", sans-serif;
  --wall-text: "Inter", "Montserrat", sans-serif;
}

/* --- Buttons (same shape as .hl-btn on the launch homepage) ------------- */

.wall-btn,
.wall-explainer .modal-form__actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 6px;
  border: 2px solid var(--wall-teal);
  background: var(--wall-teal);
  color: var(--wall-white);
  font-family: var(--wall-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wall-btn:hover,
.wall-explainer .modal-form__actions .button:hover {
  background: var(--wall-teal-deep);
  border-color: var(--wall-teal-deep);
  color: var(--wall-white);
}

.wall-btn--quiet,
.wall-explainer .modal-form__actions .button.outline {
  background: var(--wall-white);
  color: var(--wall-teal-deep);
}

.wall-btn--quiet:hover,
.wall-explainer .modal-form__actions .button.outline:hover {
  background: var(--wall-wash);
  border-color: var(--wall-teal);
  color: var(--wall-teal-deep);
}

.wall-explainer .modal-form__actions .button.transparent {
  background: transparent;
  border-color: transparent;
  color: var(--wall-slate);
  padding: 0;
  font-weight: 500;
}

.wall-explainer .modal-form__actions .button.transparent:hover {
  color: var(--wall-ink);
  background: transparent;
  border-color: transparent;
}

.wall-link {
  color: var(--wall-teal);
  font-family: var(--wall-text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.wall-link:hover {
  color: var(--wall-teal-deep);
  text-decoration-thickness: 2px;
}

.wall-search a:focus-visible,
.library-wall a:focus-visible,
.wall-explainer a:focus-visible,
.wall-explainer button:focus-visible {
  outline: 3px solid var(--wall-teal);
  outline-offset: 3px;
}

/* --- Locked search bar --------------------------------------------------- */

.wall-search {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
  font-family: var(--wall-text);
}

.wall-search__bar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  padding: 0 6px 0 16px;
  border-radius: 8px;
  border: 2px solid var(--wall-teal);
  background: var(--wall-white);
  color: var(--wall-ink);
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.wall-search__bar:hover {
  border-color: var(--wall-teal-deep);
  box-shadow: 0 8px 24px -12px rgba(8, 77, 80, 0.45);
}

.wall-search__bar > svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: var(--wall-slate);
}

.wall-search__text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--wall-slate);
}

.wall-search__lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--wall-wash);
  color: var(--wall-teal-deep);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex: none;
}

.wall-search__lock svg {
  width: 16px;
  height: 16px;
  fill: var(--wall-teal-deep);
}

.wall-search__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
  flex-wrap: wrap;
}

.wall-search__hint {
  font-size: 15px;
  color: var(--wall-slate);
}

/* Header (desktop): a compact pill on the dark bar, no extra buttons. */
.wall-search.variant-header {
  justify-content: flex-end;
  flex-wrap: nowrap;
  max-width: 400px;
  margin-left: auto;
}

.wall-search.variant-header .wall-search__bar {
  min-height: 42px;
  width: 100%;
  max-width: 320px;
  padding-right: 4px;
  font-size: 15px;
}

.wall-search.variant-header .wall-search__lock {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

/* Mobile bar: icon-only, opens the explainer. */
.wall-search.variant-mobile .wall-search__bar {
  min-height: 40px;
  min-width: 40px;
  padding: 0 8px;
  gap: 4px;
  border-color: rgba(255, 255, 255, 0.55);
  background: transparent;
  color: var(--wall-white);
}

.wall-search.variant-mobile .wall-search__bar > svg {
  fill: var(--wall-white);
}

.wall-search.variant-mobile .wall-search__lock {
  min-height: 0;
  padding: 0;
  background: none;
}

.wall-search.variant-mobile .wall-search__lock svg {
  fill: #FFC61C;
}

/* Body (library hero) / hero (shortcode): full-width bar with the CTA row under it. */
.wall-search.variant-body,
.wall-search.variant-hero {
  flex-direction: column;
  align-items: stretch;
  max-width: 670px;
  margin: 0 auto 24px;
}

.in-banner .wall-search.variant-body {
  max-width: 938px;
}

.wall-search.variant-body .wall-search__bar,
.wall-search.variant-hero .wall-search__bar {
  min-height: 60px;
  padding: 0 8px 0 20px;
  font-size: 18px;
  box-shadow: 0 24px 60px -32px rgba(8, 77, 80, 0.45), 0 2px 6px rgba(24, 25, 28, 0.06);
}

.wall-search.variant-body .wall-search__actions,
.wall-search.variant-hero .wall-search__actions {
  margin-top: 16px;
}

/* --- Library wall page ----------------------------------------------------- */

.library-wall {
  padding: 0 0 clamp(48px, 7vw, 96px);
  font-family: var(--wall-text);
  color: var(--wall-ink);
}

.library-wall__card {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 5vw, 64px);
  border: 1px solid var(--wall-line);
  border-radius: 12px;
  background: var(--wall-white);
  box-shadow: 0 24px 60px -32px rgba(8, 77, 80, 0.45), 0 2px 6px rgba(24, 25, 28, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.library-wall__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wall-teal);
}

.library-wall__eyebrow svg {
  width: 16px;
  height: 16px;
  fill: var(--wall-teal);
}

.library-wall__title {
  margin: 0;
  font-family: var(--wall-display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--wall-ink);
  text-wrap: balance;
}

.library-wall__title strong {
  font-weight: 800;
  color: var(--wall-teal);
  background: url(../img/blue-shape.png) no-repeat left bottom;
  background-size: contain;
  padding-bottom: 8px;
}

.library-wall__lead {
  margin: 0;
  max-width: 36em;
  font-size: 18px;
  line-height: 1.55;
  color: var(--wall-slate);
}

.library-wall__pending {
  margin: 0;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--wall-wash);
  border: 1px solid var(--wall-wash-line);
  color: var(--wall-teal-deep);
  font-size: 16px;
  font-weight: 500;
}

.library-wall__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.library-wall__fine {
  margin: -8px 0 0;
  font-size: 14px;
  color: var(--wall-slate);
}

.library-wall__examples {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.library-wall__examples-label {
  font-size: 15px;
  color: var(--wall-slate);
  margin-right: 4px;
}

.library-wall__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--wall-wash-line);
  background: var(--wall-wash);
  color: var(--wall-teal-deep);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.library-wall__chip:hover {
  border-color: var(--wall-teal);
  background: var(--wall-white);
}

.library-wall__chip svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.library-wall__why {
  width: 100%;
  margin: 8px 0 0;
  padding: 16px 20px;
  border-top: 1px solid var(--wall-line);
  font-size: 15px;
  line-height: 1.55;
  color: var(--wall-ink-2);
}

.library-wall__why b {
  font-weight: 600;
  color: var(--wall-ink);
}

.library-wall__note {
  margin: 0;
  font-size: 14px;
  color: var(--wall-slate);
}

/* --- Explainer modal (content only; frame is the theme modal) ------------- */

.wall-explainer {
  font-family: var(--wall-text);
}

.wall-explainer .modal-form__title {
  font-family: var(--wall-display);
  font-weight: 700;
  color: var(--wall-ink);
}

.wall-explainer .modal-form__description p {
  color: var(--wall-slate);
}

.wall-explainer__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--wall-wash);
}

.wall-explainer__icon svg {
  width: 24px;
  height: 24px;
  fill: var(--wall-teal);
}

.wall-explainer__pending {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--wall-wash);
  border: 1px solid var(--wall-wash-line);
  color: var(--wall-teal-deep);
  font-weight: 500;
}

.wall-explainer__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  color: var(--wall-ink-2);
}

.wall-explainer__list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.wall-explainer__list svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 1px;
  fill: var(--wall-teal);
}

.wall-explainer .modal-form__actions {
  gap: 12px;
  flex-wrap: wrap;
}

.wall-explainer .modal-form__actions .button-group {
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 1100px) {
  .wall-search.variant-header {
    max-width: none;
    margin-left: 0;
    justify-content: flex-start;
  }

  .wall-search.variant-header .wall-search__bar {
    max-width: none;
  }
}

@media (max-width: 767px) {
  .wall-search.variant-body .wall-search__bar,
  .wall-search.variant-hero .wall-search__bar {
    min-height: 52px;
    padding-left: 14px;
    font-size: 16px;
  }

  .wall-search__lock {
    padding: 0 10px;
  }

  .wall-search.variant-body .wall-search__lock span,
  .wall-search.variant-hero .wall-search__lock span,
  .wall-search.variant-header .wall-search__lock span {
    display: none;
  }

  .library-wall__card {
    border-radius: 10px;
  }

  .library-wall__title {
    font-size: 26px;
  }

  .library-wall__lead {
    font-size: 16px;
  }

  .library-wall__actions,
  .library-wall__actions .wall-btn {
    width: 100%;
  }

  .wall-explainer .modal-form__actions,
  .wall-explainer .modal-form__actions .button-group,
  .wall-explainer .modal-form__actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wall-search__bar,
  .wall-btn,
  .library-wall__chip,
  .wall-explainer .modal-form__actions .button {
    transition: none;
  }
}
