/**
 * @file
 * Hosting gateway, terms page and the checkout terms pane.
 *
 * Palette taken from the live AN theme: deep purple headings (#21005b),
 * the pink-to-purple button gradient (#c14a7b -> #9b59b6). Colours are forced
 * because the theme sets blanket link and text colours.
 *
 * Contrast checked: white on both gradient stops >= 4.6:1, #21005b and
 * #3a2a45 on white >= 10:1.
 */

/* ---------------------------------------------------------------- Gateway. */
.an-hosting-gate {
  display: flex;
  justify-content: center;
  padding: 1rem 1rem 3.5rem;
}

.an-hosting-gate__card {
  max-width: 34rem;
  width: 100%;
  background: #ffffff;
  border: 1px solid #f0d5e2;
  border-radius: 16px;
  padding: 2rem 2rem 2.25rem;
  box-shadow: 0 8px 28px rgba(155, 89, 182, 0.13);
  text-align: center;
}

.an-hosting-gate__eyebrow {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a8286b !important;
  font-weight: 700;
}

.an-hosting-gate__lead {
  margin: 0 0 0.85rem;
  font-size: 1.1rem;
  line-height: 1.55;
  color: #21005b !important;
  font-weight: 600;
}

.an-hosting-gate__body {
  margin: 0 0 1.75rem;
  line-height: 1.65;
  color: #3a2a45 !important;
}

.an-hosting-gate__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* The "you have just registered, go and check your email" state. */
.an-hosting-gate__card--welcome {
  border-color: #d9c2ea;
}

.an-hosting-gate__steps {
  counter-reset: an-step;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  text-align: left;
  max-width: 25rem;
  margin-inline: auto;
}

.an-hosting-gate__steps li {
  counter-increment: an-step;
  position: relative;
  padding: 0 0 0 2.35rem;
  margin-bottom: 0.7rem;
  line-height: 1.55;
  color: #3a2a45 !important;
}

.an-hosting-gate__steps li::before {
  content: counter(an-step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background-image: linear-gradient(135deg, #c14a7b, #9b59b6);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.an-hosting-gate__note {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: #6b5a72 !important;
}

.an-hosting-gate__button,
.an-hosting-gate__button:visited {
  display: inline-block;
  box-sizing: border-box;
  max-width: 100%;
  padding: 0.85rem 2rem;
  border-radius: 60px;
  background-image: linear-gradient(135deg, #c14a7b, #9b59b6);
  background-color: #a8286b;
  color: #ffffff !important;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  box-shadow: 0 8px 22px rgba(155, 89, 182, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.an-hosting-gate__button:hover,
.an-hosting-gate__button:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(155, 89, 182, 0.45);
  color: #ffffff !important;
  text-decoration: none;
}

.an-hosting-gate__button--ghost,
.an-hosting-gate__button--ghost:visited {
  background-image: none;
  background-color: #ffffff;
  color: #a8286b !important;
  border-color: #d9a8c2;
  box-shadow: none;
}

.an-hosting-gate__button--ghost:hover,
.an-hosting-gate__button--ghost:focus {
  background-color: #fdf3f8;
  color: #7a1a4a !important;
  border-color: #a8286b;
  box-shadow: none;
}

/* ------------------------------------------- Invitation card on a profile. */
.an-hosting-invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: 0 0 1.75rem;
  padding: 1.35rem 1.6rem;
  border: 1px solid #f0d5e2;
  border-radius: 16px;
  background: linear-gradient(135deg, #fdf7fa, #f7f2fc);
  box-shadow: 0 6px 20px rgba(155, 89, 182, 0.1);
}

.an-hosting-invite__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: #a8286b !important;
}

.an-hosting-invite__lead {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #21005b !important;
}

.an-hosting-invite__body {
  margin: 0;
  color: #3a2a45 !important;
  line-height: 1.55;
}

.an-hosting-invite__button,
.an-hosting-invite__button:visited {
  display: inline-block;
  box-sizing: border-box;
  flex: 0 0 auto;
  padding: 0.8rem 1.9rem;
  border-radius: 60px;
  background-image: linear-gradient(135deg, #c14a7b, #9b59b6);
  background-color: #a8286b;
  color: #ffffff !important;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  box-shadow: 0 8px 22px rgba(155, 89, 182, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.an-hosting-invite__button:hover,
.an-hosting-invite__button:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(155, 89, 182, 0.45);
  color: #ffffff !important;
  text-decoration: none;
}

@media (max-width: 560px) {
  .an-hosting-invite {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .an-hosting-invite__button {
    width: 100%;
  }
}

/* ------------------------------------------------------------------ Terms. */
.an-hosting-terms-page {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem 1rem 4rem;
}

.an-hosting-terms {
  line-height: 1.7;
  color: #3a2a45 !important;
}

.an-hosting-terms h3 {
  margin: 1.9rem 0 0.5rem;
  font-size: 1.12rem;
  color: #21005b !important;
}

.an-hosting-terms p,
.an-hosting-terms li {
  color: #3a2a45 !important;
}

.an-hosting-terms a,
.an-hosting-terms a:visited {
  color: #a8286b !important;
  text-decoration: underline;
}

.an-hosting-terms__version {
  font-size: 0.85rem;
  color: #6b5a72 !important;
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0d5e2;
}

/* --------------------------------------------------------- Checkout pane. */
.an-hosting-terms-wrapper {
  border: 1px solid #f0d5e2;
  border-radius: 12px;
  background: #fdf7fa;
  padding: 0.35rem 1rem;
  margin-bottom: 1rem;
}

.an-hosting-terms-wrapper > summary {
  color: #a8286b !important;
  font-weight: 700;
  cursor: pointer;
  padding: 0.7rem 0;
}

/* Keep the long terms scrollable inside checkout instead of pushing the
   Pay button off the screen. */
.an-hosting-terms-wrapper .an-hosting-terms {
  max-height: 22rem;
  overflow-y: auto;
  padding-right: 0.75rem;
}

.an-hosting-accept + label,
label.an-hosting-accept,
.form-item .an-hosting-accept ~ label {
  color: #21005b !important;
  line-height: 1.55;
}

/* The allowance table inside the terms. */
.an-hosting-allowance {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1.25rem;
}

.an-hosting-allowance th,
.an-hosting-allowance td {
  border-bottom: 1px solid #f0d5e2;
  padding: 0.55rem 0.6rem;
  text-align: left;
  vertical-align: top;
  color: #3a2a45 !important;
}

.an-hosting-allowance th {
  width: 40%;
  font-weight: 700;
  color: #21005b !important;
  white-space: nowrap;
}

/* Unticked terms box at checkout: say so where they are looking. */
.an-hosting-terms-missing {
  border: 2px solid #b3261e;
  border-radius: 10px;
  background: #fdeceb;
  padding: 0.85rem 1rem;
}

.an-hosting-inline-error {
  margin: 0.5rem 0 0;
  font-weight: 700;
  line-height: 1.5;
  color: #b3261e !important;
}

.an-hosting-inline-error::before {
  content: "⚠ ";
}

.an-hosting-accept[aria-invalid="true"] {
  outline: 2px solid #b3261e;
  outline-offset: 2px;
}

/* --------------------------------------------------- Request access form. */
.an-hosting-intro {
  max-width: 34rem;
  line-height: 1.65;
  color: #3a2a45 !important;
}

@media (max-width: 480px) {
  .an-hosting-gate__card {
    padding: 1.5rem 1.25rem 1.75rem;
  }

  .an-hosting-gate__actions {
    flex-direction: column;
  }

  .an-hosting-gate__button {
    width: 100%;
  }
}
