/*
 * Plans page (/subscribe/solidres-for-joomla): plan cards, the full comparison behind a
 * toggle (pricing.js), cross-sells, loyalty rewards and the FAQ. Loaded by
 * html/com_content/article/default.php when the article carries the .sr-pp wrapper,
 * and by the product page (html/com_solidshop/product/default.php), which is one plan card.
 * The tier colours are the ones the comparison table uses (.col1 to .col5 in content.css);
 * where white text sits on a tier colour it uses the darker shade, so it stays readable.
 * The other colours are the template's tokens (both schemes follow), under the page's own
 * --sr-pp-* names: brand is a fill, link is brand as text (they part in the dark scheme).
 * In the dark scheme a tier's tint is its colour mixed into the dark surface.
 */

.sr-pp {
  --sr-pp-ink: var(--sr-ink);
  --sr-pp-text: var(--sr-text);
  --sr-pp-muted: var(--sr-muted);
  --sr-pp-brand: var(--sr-brand);
  --sr-pp-brand-dark: var(--sr-brand-strong);
  --sr-pp-link: var(--sr-link);
  --sr-pp-link-hover: var(--sr-link-hover);
  --sr-pp-accent: var(--sr-accent);
  --sr-pp-accent-text: var(--sr-accent-text);
  --sr-pp-line: var(--sr-line);
  --sr-pp-line-soft: var(--sr-line-soft);
  --sr-pp-surface: var(--sr-surface);
  --sr-pp-tint: var(--sr-tint);
  --sr-pp-radius: 10px;
  --sr-pp-shadow: var(--sr-shadow);
  --sr-pp-shadow-hover: var(--sr-shadow-raised);
  --sr-pp-focus: var(--sr-focus);
  color: var(--sr-pp-text);
  font-size: 15px;
  line-height: 1.6;
}
.sr-pp [hidden] {
  display: none !important;
}
.sr-pp__visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* The theme removes the focus outline from links; put a visible one back. */
.sr-pp a:focus-visible,
.sr-pp button:focus-visible,
.sr-pp summary:focus-visible,
.sr-pp .sr-compare-all:focus-visible {
  outline: 3px solid var(--sr-pp-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Tiers: the card accent, the soft header tint, the button and the text that sits on it. */
.sr-pp-tier--free {
  --sr-pp-tier: #7296af;
  --sr-pp-tier-tint: #eef3f7;
  --sr-pp-tier-strong: #4f7591;
  --sr-pp-tier-on: #ffffff;
}
.sr-pp-tier--single {
  --sr-pp-tier: #f9c454;
  --sr-pp-tier-tint: #fef7e6;
  --sr-pp-tier-strong: #f9c454;
  --sr-pp-tier-on: #3b2a00;
  --sr-pp-tier-icon: #c99a1e;
}
.sr-pp-tier--bundle {
  --sr-pp-tier: #61a760;
  --sr-pp-tier-tint: #eef6ee;
  --sr-pp-tier-strong: #3e7f3d;
  --sr-pp-tier-on: #ffffff;
}
.sr-pp-tier--hub {
  --sr-pp-tier: #c34258;
  --sr-pp-tier-tint: #fbedef;
  --sr-pp-tier-strong: #c34258;
  --sr-pp-tier-on: #ffffff;
}
.sr-pp-tier--developer {
  --sr-pp-tier: #2b6375;
  --sr-pp-tier-tint: #eaf1f3;
  --sr-pp-tier-strong: #2b6375;
  --sr-pp-tier-on: #ffffff;
}
[data-bs-theme="dark"] [class*="sr-pp-tier--"] {
  --sr-pp-tier-tint: color-mix(in srgb, var(--sr-pp-tier) 22%, var(--sr-surface));
  --sr-pp-tier-icon: color-mix(in srgb, var(--sr-pp-tier) 60%, #ffffff);
}

/* Section headings. The theme paints a bare h2 white and an h4 orange. The first one is the
   page's <h1> where the menu item hides the title, and keeps the look by its .h2 class. */
.sr-pp__section {
  margin: 64px 0 0;
}
.sr-pp :is(h2, .h2).sr-pp__title {
  margin: 0 0 12px;
  color: var(--sr-pp-link);
  font-size: 34px;
  line-height: 1.2;
}
.sr-pp__intro {
  max-width: 760px;
  margin: 0 0 32px;
  font-size: 16px;
  color: var(--sr-pp-text);
}
.sr-pp__section--center {
  text-align: center;
}
.sr-pp__section--center .sr-pp__intro {
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.sr-pp-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: var(--sr-pp-brand);
  color: #fff;
  font-family: var(--sr-font-heading);
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  text-shadow: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.sr-pp a.sr-pp-btn,
.sr-pp a.sr-pp-btn:hover,
.sr-pp a.sr-pp-btn:focus {
  color: #fff;
  text-decoration: none;
}
.sr-pp .sr-pp-btn:hover {
  background: var(--sr-pp-brand-dark);
}
.sr-pp-btn--outline,
.sr-pp a.sr-pp-btn--outline {
  background: transparent;
  border-color: var(--sr-pp-brand);
  color: var(--sr-pp-link);
}
.sr-pp .sr-pp-btn--outline:hover,
.sr-pp a.sr-pp-btn--outline:hover {
  background: var(--sr-pp-brand);
  color: #fff;
}
.sr-pp-btn i {
  padding: 0;
  font-size: 0.95em;
}

/* Plan cards */
.sr-pp-plans {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 18px 0 0;
  list-style: none;
}
.sr-pp-plan {
  position: relative;
  display: grid;
  grid-row: span 5;
  grid-template-rows: subgrid;
  row-gap: 0;
  min-width: 0;
  overflow: visible;
  border: 1px solid var(--sr-pp-line);
  border-top: 6px solid var(--sr-pp-tier);
  border-radius: var(--sr-pp-radius);
  background: var(--sr-pp-surface);
  box-shadow: var(--sr-pp-shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.sr-pp-plan:hover {
  box-shadow: var(--sr-pp-shadow-hover);
}
.sr-pp-plan--featured {
  border-color: var(--sr-pp-tier);
  border-width: 2px;
  border-top-width: 6px;
  box-shadow: 0 0 0 3px var(--sr-pp-tier-tint), var(--sr-pp-shadow-hover);
}
.sr-pp-plan__badge {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--sr-pp-tier-strong);
  color: var(--sr-pp-tier-on);
  font-family: var(--sr-font-heading);
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.sr-pp-plan__head {
  padding: 22px 18px 16px;
  background: var(--sr-pp-tier-tint);
  text-align: center;
}
.sr-pp .sr-pp-plan__name {
  margin: 0;
  color: var(--sr-pp-ink);
  font-family: var(--sr-font-heading);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sr-pp-plan__price {
  margin: 8px 0 2px;
  color: var(--sr-pp-ink);
  line-height: 1;
}
.sr-pp-plan__amount {
  font-family: var(--sr-font-heading);
  font-size: 44px;
  line-height: 1;
}
.sr-pp-plan__per {
  display: block;
  margin-top: 6px;
  color: var(--sr-pp-text);
  font-size: 13px;
  line-height: 1.3;
}
.sr-pp-plan__tagline {
  margin: 10px 0 0;
  color: var(--sr-pp-text);
  font-size: 14px;
  line-height: 1.4;
}
.sr-pp-plan__terms {
  margin: 0;
  padding: 14px 18px 0;
  list-style: none;
}
.sr-pp-plan__terms li {
  display: flex;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--sr-pp-ink);
  font-size: 14px;
  line-height: 1.4;
}
.sr-pp-plan__terms i {
  flex: none;
  width: 16px;
  margin-top: 2px;
  color: var(--sr-pp-link);
  text-align: center;
}
.sr-pp-plan__cta {
  padding: 10px 18px 16px;
  border-bottom: 1px solid var(--sr-pp-line-soft);
}
.sr-pp-plan__cta .sr-pp-btn {
  width: 100%;
  background: var(--sr-pp-tier-strong);
  color: var(--sr-pp-tier-on);
}
.sr-pp .sr-pp-plan__cta a.sr-pp-btn,
.sr-pp .sr-pp-plan__cta a.sr-pp-btn:focus {
  color: var(--sr-pp-tier-on);
}
.sr-pp .sr-pp-plan__cta a.sr-pp-btn:hover {
  background: var(--sr-pp-tier-strong);
  color: var(--sr-pp-tier-on);
  box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.12);
}
.sr-pp-plan__features {
  padding: 16px 18px 4px;
}
.sr-pp-plan__lead {
  margin: 0 0 8px;
  color: var(--sr-pp-ink);
  font-weight: 700;
  font-size: 14px;
}
.sr-pp-plan__features ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sr-pp-plan__features li {
  position: relative;
  margin: 0 0 7px;
  padding-left: 22px;
  color: var(--sr-pp-text);
  font-size: 14px;
  line-height: 1.4;
}
.sr-pp-plan__features li i {
  position: absolute;
  top: 2px;
  left: 0;
  color: var(--sr-pp-tier-icon, var(--sr-pp-tier));
}
.sr-pp-plan__more {
  padding: 4px 18px 18px;
}
.sr-pp .sr-pp-plan__more a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  color: var(--sr-pp-link);
  font-weight: 700;
  font-size: 14px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.sr-pp .sr-pp-plan__more a:hover {
  color: var(--sr-pp-link-hover);
}

/* The full comparison and its toggle */
.sr-pp-compare {
  margin: 56px 0 0;
  padding: 32px 24px;
  border: 1px solid var(--sr-pp-line);
  border-radius: var(--sr-pp-radius);
  background: var(--sr-pp-tint);
  text-align: center;
}
.sr-pp-compare .sr-pp__title {
  scroll-margin-top: 24px;
}
.sr-pp-compare .sr-pp__intro {
  margin: 0 auto 20px;
}
.sr-pp-compare__toggle i {
  transition: transform 0.2s ease;
}
.sr-pp-compare__toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}
.sr-pp .sr-compare-all {
  margin: 24px 0 0;
  scroll-margin-top: 24px;
}
.sr-pp .sr-compare-all:focus {
  outline: none;
}

/* Cross-sells */
.sr-pp-more {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sr-pp-more__item {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--sr-pp-line);
  border-radius: var(--sr-pp-radius);
  background: var(--sr-pp-surface);
  box-shadow: var(--sr-pp-shadow);
  transition: box-shadow 0.2s ease;
}
.sr-pp-more__item:hover {
  box-shadow: var(--sr-pp-shadow-hover);
}
.sr-pp .sr-pp-more__name {
  margin: 0 0 6px;
  color: var(--sr-pp-ink);
  font-family: var(--sr-font-heading);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.3;
}
.sr-pp-more__text {
  flex: 1;
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
}
.sr-pp .sr-pp-more__link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sr-pp-link);
  font-weight: 700;
  font-size: 14px;
}
.sr-pp .sr-pp-more__link:hover {
  color: var(--sr-pp-link-hover);
  text-decoration: underline;
}

/* Which plan is right for me? */
.sr-pp-guide {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sr-pp-guide__item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--sr-pp-line);
  border-left: 6px solid var(--sr-pp-tier);
  border-radius: 8px;
  background: var(--sr-pp-surface);
  line-height: 1.5;
}
.sr-pp-guide__tag {
  justify-self: start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--sr-pp-tier-strong);
  color: var(--sr-pp-tier-on);
  font-family: var(--sr-font-heading);
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* What's great about our pricing: the 0% commission highlight, then the checklist */
.sr-pp-zero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin: 0 0 32px;
  padding: 32px 36px;
  border-radius: var(--sr-pp-radius);
  background: linear-gradient(135deg, var(--sr-pp-brand-dark), var(--sr-pp-brand));
  box-shadow: var(--sr-pp-shadow-hover);
  color: #fff;
}
.sr-pp-zero__figure {
  margin: 0;
  padding-right: 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  font-family: var(--sr-font-heading);
  font-size: 112px;
  line-height: 1;
  color: #fff;
}
.sr-pp .sr-pp-zero__title {
  margin: 0 0 8px;
  color: #fff;
  font-family: var(--sr-font-heading);
  font-size: 28px;
  line-height: 1.25;
}
.sr-pp-zero__text {
  margin: 0 0 14px;
  color: #e8f4f7;
  font-size: 16px;
  line-height: 1.55;
}
.sr-pp-zero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sr-pp-zero__points li {
  margin: 0;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.5;
}
.sr-pp-zero__points i {
  margin-right: 4px;
  color: #b9e58f;
}
.sr-pp-perks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sr-pp-perks li {
  position: relative;
  margin: 0;
  padding-left: 30px;
  line-height: 1.5;
}
.sr-pp-perks li i {
  position: absolute;
  top: 2px;
  left: 0;
  color: var(--sr-green-text);
  font-size: 18px;
}
.sr-pp-perks strong {
  color: var(--sr-pp-ink);
}

/* Loyalty rewards */
.sr-pp-rewards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sr-pp-rewards li {
  margin: 0;
  padding: 22px 22px 20px;
  border: 1px solid var(--sr-pp-line);
  border-radius: var(--sr-pp-radius);
  background: var(--sr-pp-surface);
  box-shadow: var(--sr-pp-shadow);
  line-height: 1.5;
}
.sr-pp-rewards__figure {
  display: block;
  margin: 0 0 4px;
  color: var(--sr-pp-accent-text);
  font-family: var(--sr-font-heading);
  font-size: 40px;
  line-height: 1.1;
}
.sr-pp-rewards__label {
  display: block;
  margin: 0 0 8px;
  color: var(--sr-pp-ink);
  font-family: var(--sr-font-heading);
  font-size: 17px;
}

/* We accept */
.sr-pp-pay {
  margin: 0;
}
.sr-pp-pay img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--sr-pp-line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

/* FAQ */
.sr-pp-faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  align-items: start;
}
.sr-pp-faq__col {
  display: grid;
  gap: 12px;
}
.sr-pp-faq details {
  border: 1px solid var(--sr-pp-line);
  border-radius: 8px;
  background: var(--sr-pp-surface);
}
.sr-pp-faq details[open] {
  box-shadow: var(--sr-pp-shadow);
}
.sr-pp-faq summary {
  position: relative;
  display: block;
  padding: 14px 44px 14px 16px;
  color: var(--sr-pp-ink);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}
.sr-pp-faq summary::-webkit-details-marker {
  display: none;
}
.sr-pp-faq summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--sr-pp-tint);
  color: var(--sr-pp-link);
  font-size: 18px;
  font-weight: 400;
  line-height: 22px;
  text-align: center;
}
.sr-pp-faq details[open] summary::after {
  content: "\2212";
}
.sr-pp-faq__answer {
  padding: 0 16px 6px;
}
.sr-pp-faq__answer p {
  margin: 0 0 12px;
}

/* Product page (html/com_solidshop/product/default.php): one plan card, built from the
   cards above, with the store's buy buttons. A product that is not a Solidres or Channel
   Manager plan takes the brand's colour as its tier. */
.sr-pp-tier--brand {
  --sr-pp-tier: var(--sr-brand);
  --sr-pp-tier-tint: var(--sr-brand-tint);
  --sr-pp-tier-strong: var(--sr-brand);
  --sr-pp-tier-on: var(--sr-on-brand);
}
.sr-product__layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
  padding: 8px 0 24px;
}
.sr-product__media {
  flex: 1 1 420px;
  min-width: 0;
}
/* A card of its own, not a cell of the plans grid. */
.sr-product__card.sr-pp-plan {
  display: flex;
  flex: 0 1 420px;
  flex-direction: column;
  max-width: 100%;
}
.sr-pp .sr-product__name {
  margin: 0;
  color: var(--sr-pp-ink);
  font-family: var(--sr-font-heading);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
}
.sr-product__price {
  margin: 12px 0 0;
}
/* Solidshop prints the price with Bootstrap's size utilities (.fs-4, .fs-6), which are
   !important; the card's sizes have to be too. */
.sr-product__price .price-line {
  margin: 0;
  color: var(--sr-pp-ink);
  font-family: var(--sr-font-heading);
  font-size: 44px !important;
  font-weight: 400;
  line-height: 1;
}
.sr-product__price .regular-price {
  color: var(--sr-pp-muted);
  font-size: 22px !important;
  vertical-align: middle;
}
.sr-product__options {
  padding: 14px 18px 0;
}
.sr-product__cta {
  display: grid;
  gap: 10px;
  padding-top: 18px;
  padding-bottom: 18px;
}
/* The card's buttons are <button>s; the plans page's are links, which the rules above
   restyle on hover. */
.sr-pp .sr-product__cta .sr-pp-btn:hover {
  background: var(--sr-pp-tier-strong);
  color: var(--sr-pp-tier-on);
  box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.12);
}
.sr-product__cta .sr-pp-btn--outline {
  border-color: var(--sr-pp-brand);
  background: transparent;
  color: var(--sr-pp-link);
}
.sr-pp .sr-product__cta .sr-pp-btn--outline:hover {
  background: var(--sr-pp-brand);
  color: #fff;
  box-shadow: none;
}
.sr-product__cta .sr-pp-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.sr-product__card .sr-pp-plan__more {
  padding-top: 14px;
  text-align: center;
}
.sr-product__share {
  padding: 0 18px 18px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .sr-pp *,
  .sr-pp *::before,
  .sr-pp *::after {
    transition: none !important;
  }
}

@media (max-width: 1099px) {
  .sr-pp-plans {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 32px;
  }
  .sr-pp-more {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .sr-pp :is(h2, .h2).sr-pp__title {
    font-size: 28px;
  }
  .sr-pp__section {
    margin-top: 48px;
  }
  .sr-pp-plans {
    grid-template-columns: minmax(0, 1fr);
  }
  .sr-pp-perks,
  .sr-pp-rewards,
  .sr-pp-faq {
    grid-template-columns: minmax(0, 1fr);
  }
  .sr-pp-guide__item {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .sr-pp-compare {
    padding: 24px 16px;
  }
  .sr-pp-zero {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 24px 20px;
  }
  .sr-pp-zero__figure {
    padding: 0;
    border: 0;
    font-size: 72px;
  }
  .sr-pp .sr-pp-zero__title {
    font-size: 24px;
  }
}

@media (max-width: 479px) {
  .sr-pp-more {
    grid-template-columns: minmax(0, 1fr);
  }
}
