/*
 * Layout layer of the main pricing page (all languages).
 *
 * Loaded only on that page, after design-system.css. Every rule is scoped by
 * .page-pricing, which templates/layouts/main.php sets on <html>, so no other page
 * is affected. Shared blocks (reviews, FAQ, call-to-action) keep their markup.
 */

/* ---------- Page tokens ---------- */

:root.page-pricing {
  --pp-popular-ground: linear-gradient(165deg, #f7fbff 0%, #ecf3fd 60%, #e6effb 100%);
  --pp-popular-border: #4074bd;
  --pp-popular-glow: 0 18px 44px rgba(64, 116, 189, 0.2);
  --pp-action-ground: linear-gradient(180deg, #467bc6 0%, #3a6cb2 100%);
  --pp-action-ground-hover: linear-gradient(180deg, #4d82cc 0%, #4073ba 100%);
  --pp-action-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 16px rgba(64, 116, 189, 0.28);
  --pp-quiet-ground: linear-gradient(180deg, #ffffff 0%, #f1f5fb 100%);
  --pp-price: #4074bd;
  --pp-band: #1e2b4e;
  --pp-gutter: 20px;
  --pp-title: clamp(1.75rem, 3.4vw, 2.375rem);
  --pp-title-gap: clamp(2rem, 4vw, 3rem);
}

/* The dark ground itself is the site-wide navy set in design-system.css. */
:root.page-pricing[data-theme='dark'] {
  --pp-popular-ground: linear-gradient(165deg, #25315a 0%, #1a223c 60%, #171e35 100%);
  --pp-popular-border: #4f86d4;
  --pp-quiet-ground: linear-gradient(180deg, #252c40 0%, #1c2233 100%);
  --pp-price: #8fb8ee;
  --pp-band: #1a2238;
}

/* ---------- Hero ---------- */

.page-pricing .bg-dark-pseudo--compact {
  background: var(--ds-page);
}

.page-pricing .bg-dark-pseudo--compact > .content--pricing {
  box-sizing: border-box;
  max-width: calc(var(--ds-container) + 2 * var(--pp-gutter));
  padding: clamp(2.75rem, 6vw, 4.5rem) var(--pp-gutter) var(--ds-section-y);
}

.page-pricing .bg-dark-pseudo--compact .pricing-block {
  /* The plan grid and the buttons switch on this width, not on the window width. */
  container-type: inline-size;
  padding: clamp(2rem, 4vw, 3rem) 0 0;
}

/* ---------- Plans ---------- */

.page-pricing #price-list.price-list--page {
  align-items: stretch;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}

.page-pricing #price-list.price-list--page > .priceTable {
  box-sizing: border-box;
  width: 100%;
  overflow: visible;
  gap: 22px;
  padding: clamp(22px, 3cqw, 36px);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-sm);
  justify-self: stretch;
  grid-column: auto;
}

.page-pricing #price-list.price-list--page > .priceTable.priceTable--most-popular {
  border: 2px solid var(--pp-popular-border);
  background: var(--pp-popular-ground);
  box-shadow: var(--pp-popular-glow);
}

.page-pricing .price-list--page .priceTable__summary {
  min-height: 0;
  gap: 22px;
}

.page-pricing .price-list--page .priceTable .planName,
.page-pricing .price-list--page .priceTable .price-wrap {
  padding: 0;
}

.page-pricing .price-list--page .planName__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 12px;
  margin: 0 0 4px;
}

.page-pricing .price-list--page .priceTable .planName h2 {
  margin: 0;
  font-size: 1.625rem;
  line-height: 1.2;
}

.page-pricing .price-list--page .priceTable .planName > .smallText {
  font-size: 0.9375rem;
  font-weight: 400;
}

.page-pricing .price-list--page .priceTable__popular-label {
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--ds-marker);
  color: var(--ds-marker-text);
  font-size: 0.78rem;
  line-height: 1.6;
}

.page-pricing .price-list--page .priceTable .price {
  margin: 0 0 8px;
  color: var(--pp-price);
  font-size: clamp(2.875rem, 4.8cqw, 3.625rem);
  letter-spacing: -0.01em;
}

/* Sale state: the old price is small and struck through, the label sits under the new price. */
.page-pricing .price-list--page .promotion.discounted .localized-price {
  margin-bottom: 6px;
  color: var(--ds-text-muted);
  font-size: 0.5em;
}

.page-pricing .price-list--page .promotion.discounted .localized-price::after {
  left: -4%;
  width: 108%;
  height: 2px;
  background: currentColor;
  transform: translateY(-1px) rotate(-8deg);
}

.page-pricing .price-list--page .promotion__discount-label {
  width: auto;
  margin: 8px 0 0;
  font-size: 0.9375rem;
  letter-spacing: 0;
  line-height: 1.3;
  text-align: left;
}

.page-pricing .price-list--page .priceTable .price-wrap > .smallText {
  min-height: 0;
  font-size: 0.875rem;
}

.page-pricing .price-list--page .priceTable .buy-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  margin: 0;
}

/* Main plan button: filled blue. */
.page-pricing .price-list--page .priceTable a.tableBuy {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  margin: 0;
  border: 0;
  border-radius: var(--ds-radius);
  background: var(--pp-action-ground);
  box-shadow: var(--pp-action-shadow);
  color: #fff;
  font-size: 1.0625rem;
  line-height: 1.25;
  text-align: center;
}

.page-pricing .price-list--page .priceTable a.tableBuy:hover {
  background: var(--pp-action-ground-hover);
  box-shadow: var(--pp-action-shadow);
  color: #fff;
}

/*
 * Plans side by side: only the highlighted plan keeps the blue button.
 * Stacked plans (phones): each plan is alone on screen, so each button is blue.
 * 864px = two 420px columns plus the 24px gap.
 */
@container (min-width: 864px) {
  .page-pricing .price-list--page .priceTable:not(.priceTable--most-popular) a.tableBuy {
    border: 1px solid var(--ds-border-strong);
    background: var(--pp-quiet-ground);
    box-shadow: var(--ds-shadow-xs);
    color: var(--ds-heading);
  }

  .page-pricing .price-list--page .priceTable:not(.priceTable--most-popular) a.tableBuy:hover {
    border-color: var(--ds-primary);
    background: var(--pp-quiet-ground);
    box-shadow: var(--ds-shadow-sm);
    color: var(--ds-heading);
  }
}

/* WordPress checkout, as a sentence under the main button. */
.page-pricing .priceTable__wp {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 6px;
  margin: 0;
  color: var(--ds-text-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.page-pricing .priceTable__wp-icon {
  width: 15px;
  height: 15px;
  flex: none;
  background: currentColor;
  -webkit-mask: url('/img/wordpress.svg') no-repeat center / contain;
  mask: url('/img/wordpress.svg') no-repeat center / contain;
}

.page-pricing .priceTable__wp-link {
  color: var(--ds-link);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-pricing .priceTable__wp-link:hover {
  color: var(--ds-link-hover);
}

.page-pricing .price-list--page .priceTable .pricing-block__captions {
  text-align: center;
}

.page-pricing .price-list--page .priceTable .pricing-block__caption {
  font-size: 0.875rem;
}

.page-pricing .price-list--page .priceTable .pricing-block__caption--first {
  margin-top: 0;
}

/* Feature rows */
.page-pricing .price-list--page .priceTable .featureList {
  display: grid;
  align-content: start;
  padding: 22px 0 0;
  margin: 0;
  border-top: 1px solid var(--ds-border);
  column-gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  list-style: none;
}

.page-pricing .price-list--page .priceTable--most-popular .featureList {
  border-top-color: var(--ds-border-strong);
}

.page-pricing .price-list--page .priceTable .featureList li {
  position: relative;
  padding: 5px 0 5px 24px;
  margin: 0;
  border: 0;
  background: none;
  color: var(--ds-text);
  font-size: 0.906rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
}

.page-pricing .price-list--page .priceTable .featureList li::before {
  position: absolute;
  top: 8px;
  left: 0;
  display: block;
  width: 16px;
  height: 16px;
  margin: 0;
  background: var(--ds-success);
  content: '';
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5l4.5 4.5L19 7.5'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5l4.5 4.5L19 7.5'/></svg>") no-repeat center / contain;
  transform: none;
}

/* Second plan: a short list of what it adds, in larger type. */
.page-pricing .price-list--page .priceTable:nth-child(2) .featureList {
  grid-template-columns: minmax(0, 1fr);
}

.page-pricing .price-list--page .priceTable:nth-child(2) .featureList li {
  padding: 6px 0 6px 30px;
  color: var(--ds-heading);
  font-size: clamp(0.969rem, 1.2cqw + 0.6875rem, 1.0625rem);
  font-weight: 500;
}

.page-pricing .price-list--page .priceTable:nth-child(2) .featureList li::before,
.page-pricing .price-list--page .priceTable--band .featureList li::before {
  top: 9px;
  width: 20px;
  height: 20px;
}

/* The last word and the video icon stay on one line. */
.page-pricing .featureList__tail {
  white-space: nowrap;
}

.page-pricing .price-list--page .hover-video {
  width: 30px;
  height: 30px;
  padding: 0;
  margin: -7px -4px -5px -4px;
  cursor: pointer;
}

.page-pricing .price-list--page .hover-video .tiny-icon {
  width: 18px;
  height: 18px;
}

/* Further plans: a full-width band, price on the left and features in a panel. */
.page-pricing #price-list.price-list--page > .priceTable.priceTable--band {
  display: grid;
  align-items: stretch;
  gap: 28px 40px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 2.2fr);
}

.page-pricing .price-list--page .priceTable--band .featureList {
  align-content: center;
  padding: clamp(18px, 2.4cqw, 28px);
  border: 0;
  border-radius: var(--ds-radius);
  background: var(--ds-surface-muted);
  column-gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
}

.page-pricing .price-list--page .priceTable--band .featureList li {
  padding: 6px 0 6px 30px;
  color: var(--ds-heading);
  font-size: clamp(0.9375rem, 1.2cqw + 0.65rem, 1rem);
  font-weight: 500;
}

@container (max-width: 863.98px) {
  .page-pricing #price-list.price-list--page > .priceTable.priceTable--band {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* License note and legal lines under the plans. */
.page-pricing .bg-dark-pseudo--compact .pricing-license-note {
  max-width: none;
  padding: 0;
  margin: 28px 0 0;
  border: 0;
  background: none;
  color: var(--ds-text);
  font-size: 1rem;
  line-height: 1.55;
  text-align: center;
}

.page-pricing .pricing-notes {
  /* Wide enough for the three legal lines to share one row on desktop. */
  max-width: none;
  margin-top: 10px;
  font-size: 0.8125rem;
}

/* ---------- Section frame shared by the blocks below ---------- */

.page-pricing .page-wrapper > .fh-block,
.page-pricing .page-wrapper > .reviews-block,
.page-pricing .page-wrapper > .faq-block,
.page-pricing .page-wrapper > section.cta-buttons-block {
  box-sizing: border-box;
  padding: var(--ds-section-y) var(--pp-gutter);
  margin: 0;
}

.page-pricing .page-wrapper > .fh-block > .content,
.page-pricing .page-wrapper > .reviews-block > .content,
.page-pricing .page-wrapper > .faq-block > .content,
.page-pricing .page-wrapper > section.cta-buttons-block > .content {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--ds-container);
  padding: 0;
  margin: 0 auto;
}

.page-pricing .features-highlights__title,
.page-pricing .reviews-block h2,
.page-pricing .faq-block__title {
  margin: 0 0 var(--pp-title-gap);
  font-size: var(--pp-title);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

/* ---------- Made for self-hosting ---------- */

.page-pricing .page-wrapper > .fh-block {
  background: var(--ds-surface-muted);
}

.page-pricing .features-highlights {
  display: grid;
  width: auto;
  gap: 32px 28px;
  padding: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
}

.page-pricing .fh {
  display: block;
  width: auto;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-align: left;
}

.page-pricing .fh__title {
  justify-content: flex-start;
  gap: 8px;
  color: var(--ds-heading);
  font-size: 1.1875rem;
  line-height: 1.25;
}

/* The icon is inline SVG now; drop the old check-circle mask. */
.page-pricing .fh__title::before {
  content: none;
}

.page-pricing .fh__icon {
  flex: none;
  color: var(--ds-link);
}

.page-pricing .fh__body {
  padding: 8px 0 0;
  color: var(--ds-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  opacity: 1;
}

.page-pricing .fh__body span {
  display: inline;
  color: var(--ds-text);
  font-weight: 500;
}

/* ---------- Reviews ---------- */

.page-pricing .page-wrapper > .reviews-block {
  padding-bottom: 24px;
}

.page-pricing .reviews {
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}

.page-pricing .reviews blockquote {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 2.6vw, 28px);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-sm);
  font-style: normal;
  text-align: left;
  text-indent: 0;
}

.page-pricing .reviews blockquote::before,
.page-pricing .reviews blockquote::after {
  content: none;
}

.page-pricing .reviews blockquote br {
  display: none;
}

.page-pricing .reviews blockquote > span:first-child {
  display: block;
  margin: 0;
  font-weight: 400;
  text-indent: 0;
  color: var(--ds-text);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.page-pricing .reviews .review_stars {
  order: -1;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  line-height: 1;
}

.page-pricing .reviews .review_author::before {
  content: none;
}

.page-pricing .reviews .review_author {
  margin-top: auto;
  color: var(--ds-text-muted);
  font-size: 0.875rem;
  font-weight: 700;
}

/* ---------- "Choose a license" panel under the reviews ---------- */

.page-pricing .page-wrapper > section.cta-buttons-block.bg-color-4 {
  padding-top: 0;
  background: none;
}

.page-pricing .cta-buttons-block.bg-color-4::before,
.page-pricing .cta-buttons-block.bg-color-4::after {
  content: none;
}

.page-pricing .cta-buttons-block.bg-color-4 .buy-buttons {
  box-sizing: border-box;
  display: flex;
  width: auto;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding: clamp(22px, 3vw, 32px) clamp(22px, 3.4vw, 40px);
  margin: 0;
  border-radius: var(--ds-radius-lg);
  background: var(--pp-popular-ground);
}

.page-pricing .cta-buttons-block.bg-color-4 h2 {
  margin: 0;
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  line-height: 1.2;
  text-align: left;
}

.page-pricing .cta-buttons-block .margin-top-10,
.page-pricing .cta-buttons-block .buy-buttons > br {
  display: none;
}

.page-pricing .cta-buttons-block a.tableBuy {
  box-sizing: border-box;
  display: inline-flex;
  width: auto;
  min-height: 52px;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 26px;
  margin: 0;
  border: 0;
  border-radius: var(--ds-radius);
  background: var(--pp-action-ground);
  box-shadow: var(--pp-action-shadow);
  color: #fff;
  font-size: 1.0625rem;
  line-height: 1.25;
}

.page-pricing .cta-buttons-block a.tableBuy:hover {
  background: var(--pp-action-ground-hover);
  color: #fff;
}

.page-pricing .cta-buttons-block a.tableBuy .buy-icon {
  margin: 0;
}

/* ---------- FAQ ---------- */

.page-pricing .page-wrapper > .faq-block {
  background: var(--ds-surface-muted);
}

.page-pricing .page-wrapper > .faq-block > .content {
  display: grid;
  column-gap: 40px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
}

.page-pricing .faq-block__title {
  grid-column: 1 / -1;
}

.page-pricing .faq-group-title {
  padding: 18px 0 0;
  margin: 0;
  color: var(--ds-heading);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
}

.page-pricing .faq-block .accordion {
  gap: 0;
  margin: 0 0 36px;
  border-top: 1px solid var(--ds-border);
}

.page-pricing .faq-block .accordion:last-child {
  margin-bottom: 0;
}

.page-pricing .faq-block .accordion-item,
.page-pricing .faq-block .accordion-item[open] {
  border: 0;
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.page-pricing .faq-block .accordion-button {
  padding: 18px 0;
  font-size: 1.0625rem;
}

.page-pricing .faq-block .accordion-icon {
  color: var(--ds-text-muted);
  font-size: 1.5rem;
  font-weight: 400;
}

.page-pricing .faq-block .accordion-body {
  padding: 0 0 18px;
  border: 0;
  background: none;
  font-size: 0.9375rem;
}

/* ---------- Closing call to action ---------- */

.page-pricing .page-wrapper > section.cta-buttons-block:not(.bg-color-4) {
  padding-top: clamp(3.5rem, 6.5vw, 5.75rem);
  padding-bottom: clamp(3.5rem, 6.5vw, 5.75rem);
  background: var(--pp-band);
}

.page-pricing .cta-buttons-block:not(.bg-color-4) .buy-buttons {
  display: flex;
  width: auto;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 0;
  margin: 0;
}

.page-pricing .cta-buttons-block:not(.bg-color-4) h2 {
  margin: 0;
  color: #fff;
  font-size: var(--pp-title);
  line-height: 1.15;
}

/* The footer wave sits on the closing band, so the strip above it takes the band color. */
.page-pricing .bg-color-3,
.page-pricing .footer.bg-color-3 {
  --footer-wave-top-color: var(--pp-band);
}

/* ---------- Phones: one text edge ---------- */

@media (max-width: 760px) {
  .page-pricing .bg-dark-pseudo--compact .content--pricing > h1,
  .page-pricing .bg-dark-pseudo--compact .content--pricing > h2,
  .page-pricing .features-highlights__title,
  .page-pricing .reviews-block h2,
  .page-pricing .faq-block__title,
  .page-pricing .cta-buttons-block:not(.bg-color-4) h2,
  .page-pricing .bg-dark-pseudo--compact .pricing-license-note,
  .page-pricing .pricing-notes {
    margin-right: 0;
    margin-left: 0;
    text-align: left;
  }

  .page-pricing .bg-dark-pseudo--compact .verified {
    justify-content: flex-start;
    text-align: left;
  }

  .page-pricing .pricing-notes {
    justify-content: start;
    justify-items: start;
    padding: 0;
  }

  .page-pricing .page-wrapper > .faq-block > .content {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-pricing .faq-group-title {
    padding: 0 0 12px;
  }

  .page-pricing .cta-buttons-block:not(.bg-color-4) .buy-buttons {
    align-items: stretch;
  }

  .page-pricing .cta-buttons-block.bg-color-4 a.tableBuy {
    width: 100%;
  }
}
