/* Easy Digital Downloads customer flow; native EDD markup and behavior stay intact. */
body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) {
  --y-edd-content: 1080px;
  --y-edd-control-height: 50px;
  background: var(--y-subtle);
}

body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-site-main {
  max-width: none;
  padding-bottom: clamp(56px, 8vw, 104px);
  background: var(--y-subtle);
}

body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-header,
body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content {
  width: min(var(--y-edd-content), calc(100% - 48px));
  max-width: none;
  margin-inline: auto;
}

body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-header {
  padding-block: clamp(48px, 7vw, 88px) clamp(24px, 4vw, 44px);
}

body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-header .wp-block-post-title {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.055em;
}

body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content {
  padding-bottom: 0;
}

body:is(.page-id-596, .page-id-597, .page-id-599, .page-id-600, .page-id-609) .y-article-content > :is(
  .wp-block-edd-checkout,
  .wp-block-edd-receipt,
  .wp-block-edd-confirmation,
  .wp-block-edd-orders,
  .wp-block-edd-order-history,
  .wp-block-edd-user-downloads,
  .wp-block-edd-profile-editor,
  .wp-block-edd-subscriptions,
  .wp-block-edd-login,
  #edd_checkout_wrap,
  .edd_form
) {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content *,
body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content *::before,
body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content *::after {
  box-sizing: border-box;
}

body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content :where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--y-focus);
  outline-offset: 3px;
}

/* Cards and section rhythm. */
body:is(.page-id-596, .page-id-597, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content :is(
  .edd-blocks-form,
  .edd_form fieldset,
  .edd-blocks-form__cart #edd_checkout_cart,
  .wp-block-edd-receipt,
  .edd-blocks-receipt,
  .edd-blocks__receipt,
  .wp-block-edd-orders,
  .edd-blocks-order-history,
  .edd-blocks__orders,
  .wp-block-edd-user-downloads,
  .edd-blocks-user-downloads,
  .edd-blocks__user-downloads,
  .edd-blocks-subscriptions,
  #edd_user_history,
  #edd_user_downloads,
  #edd_subscription_receipt,
  .edd_invoice
) {
  border: 1px solid var(--y-border);
  border-radius: var(--y-card-radius);
  background: var(--y-white);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .05);
}

body:is(.page-id-596, .page-id-597, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content :is(
  .edd-blocks-form,
  .edd_form fieldset
) {
  padding: clamp(22px, 4vw, 38px);
}

body:is(.page-id-596, .page-id-597, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content :is(fieldset, form, table) {
  min-width: 0;
}

body:is(.page-id-596, .page-id-597, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content :is(legend, .edd-blocks-form__title, .edd-blocks__title, h2, h3) {
  color: var(--y-text);
  font-weight: 500;
  letter-spacing: -.025em;
}

body:is(.page-id-596, .page-id-597, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content legend {
  width: 100%;
  margin-bottom: 22px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--y-border);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.25;
}

/* Fields preserve native names, labels, descriptions, VAT fields and validation. */
body:is(.page-id-596, .page-id-599, .page-id-609, .page-id-622) .y-article-content :is(label, .edd-label) {
  color: var(--y-text);
  font-size: .94rem;
  font-weight: 500;
  line-height: 1.4;
}

body:is(.page-id-596, .page-id-599, .page-id-609, .page-id-622) .y-article-content :is(.edd-description, .edd-blocks-form__description, .edd-description-row, small) {
  color: var(--y-muted);
  font-size: .82rem;
  line-height: 1.55;
}

body:is(.page-id-596, .page-id-599, .page-id-609, .page-id-622) .y-article-content :is(
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="text"],
  input[type="url"],
  input[type="number"],
  select,
  textarea
) {
  width: 100%;
  min-width: 0;
  min-height: var(--y-edd-control-height);
  padding: 11px 14px;
  border: 1px solid var(--y-control-border);
  border-radius: 10px;
  background: var(--y-white);
  color: var(--y-text);
  font: inherit;
  line-height: 1.35;
}

/* EDD's frontend stylesheet gives .edd-input controls a 70% width. */
.page-id-596 #edd_purchase_form :is(
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="text"],
  input[type="url"],
  input[type="number"],
  select,
  textarea
) {
  width: 100%;
  max-width: 100%;
}

body:is(.page-id-596, .page-id-599, .page-id-609, .page-id-622) .y-article-content textarea {
  min-height: 120px;
  resize: vertical;
}

body:is(.page-id-596, .page-id-599, .page-id-609, .page-id-622) .y-article-content :is(
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="text"],
  input[type="url"],
  input[type="number"],
  select,
  textarea
):focus-visible {
  border-color: var(--y-control-border);
}

body:is(.page-id-596, .page-id-599, .page-id-609, .page-id-622) .y-article-content :is(input, select, textarea)[aria-invalid="true"],
body:is(.page-id-596, .page-id-599, .page-id-609, .page-id-622) .y-article-content :is(input, select, textarea).edd-input-error {
  border-color: var(--y-error);
  box-shadow: 0 0 0 3px rgba(166, 46, 59, .12);
}

body:is(.page-id-596, .page-id-599, .page-id-609, .page-id-622) .y-article-content :is(input, select, textarea):disabled {
  cursor: not-allowed;
  opacity: .65;
  background: var(--y-subtle);
}

body:is(.page-id-596, .page-id-599, .page-id-609, .page-id-622) .y-article-content :is(input[type="checkbox"], input[type="radio"]) {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0 .45rem 0 0;
  accent-color: var(--y-accent);
  vertical-align: -.15rem;
}

/* Native EDD actions. */
body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content :is(
  .edd-submit,
  #edd-purchase-button,
  .edd-button-primary,
  button[type="submit"],
  input[type="submit"]
) {
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 11px 24px;
  border: 1px solid var(--y-accent);
  border-radius: var(--y-r-pill);
  background: var(--y-accent);
  color: var(--y-on-accent);
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content :is(
  .edd-submit,
  #edd-purchase-button,
  .edd-button-primary,
  button[type="submit"],
  input[type="submit"]
):hover {
  border-color: var(--y-accent);
  background: var(--y-accent);
  color: var(--y-on-accent);
  transform: translateY(-1px);
}

body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content :is(
  .edd-submit,
  #edd-purchase-button,
  .edd-button-primary,
  button[type="submit"],
  input[type="submit"]
):disabled {
  cursor: wait;
  opacity: .6;
  transform: none;
}

body:is(.page-id-596, .page-id-599, .page-id-609, .page-id-622) .y-article-content :is(.edd-button-secondary, .edd-blocks__button-secondary) {
  border-color: var(--y-border);
  background: var(--y-white);
  color: var(--y-accent-text);
}

/* Checkout: customer details and order summary form one coherent flow. */
body.page-id-596 {
  --y-edd-content: 1180px;
}

.page-id-596 .y-article-header {
  padding-block: clamp(44px, 6vw, 72px) clamp(26px, 3vw, 36px);
}

.page-id-596 .y-article-header .wp-block-post-title {
  max-width: none;
  font-size: clamp(2.5rem, 4.3vw, 3.5rem);
  line-height: 1.08;
}

.page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout {
  display: grid;
  align-items: start;
  gap: 30px;
}

.page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout > :is(
  .edd-blocks__logged-in,
  .edd-blocks__cart,
  .edd-blocks__purchase-form
) {
  min-width: 0;
}

.page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout > .edd-blocks__logged-in {
  margin: 0;
  padding: 15px 18px;
  border: 1px solid var(--y-border);
  border-radius: 12px;
  background: var(--y-subtle);
  color: var(--y-accent-text);
  font-size: .92rem;
}

.page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout #edd_purchase_form {
  display: grid;
  gap: 24px;
  margin: 0;
}

body.page-id-596 .y-article-content #edd_purchase_form.edd-blocks-form {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-id-596 #edd_purchase_form > :is(.edd-blocks__user-details, .edd-blocks__payment-details) {
  min-width: 0;
}

.page-id-596 #edd_purchase_form > :is(.edd-blocks__user-details, .edd-blocks__payment-details) > * + * {
  margin-top: 24px;
}

.page-id-596 #edd_purchase_form :is(fieldset.edd-blocks-form, #edd_purchase_submit) {
  margin: 0;
  padding: 30px;
  border: 0;
  border-radius: 18px;
  background: var(--y-white);
  box-shadow: inset 0 0 0 1px var(--y-border);
}

/* Floating the native legend moves it fully inside the panel instead of through its edge. */
.page-id-596 #edd_purchase_form fieldset.edd-blocks-form > legend {
  float: left;
  grid-column: 1 / -1;
  width: 100%;
  margin: 0 0 24px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--y-border);
  font-size: clamp(1.22rem, 1.8vw, 1.5rem);
  line-height: 1.25;
}

.page-id-596 #edd_purchase_form fieldset.edd-blocks-form > legend + * {
  clear: both;
}

.page-id-596 #edd_checkout_user_info {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
}

.page-id-596 #edd_checkout_user_info > :is(div, p) {
  grid-column: 1 / -1;
}

.page-id-596 #edd_checkout_user_info > #edd-first-name-wrap {
  grid-column: 1;
}

.page-id-596 #edd_checkout_user_info > #edd-last-name-wrap {
  grid-column: 2;
}

.page-id-596 #edd_purchase_form .edd-blocks-form__group > label {
  margin-bottom: 7px !important;
}

.page-id-596 #edd_purchase_form :is(.edd-description, .edd-blocks-form__description, .edd-description-row) {
  margin-top: 7px;
}

.page-id-596 #edd-payment-mode-wrap {
  gap: 10px;
}

.page-id-596 #edd-payment-mode-wrap label.edd-gateway-option {
  min-height: 52px;
  border-color: var(--y-border);
  border-radius: 12px;
  background: var(--y-white);
}

.page-id-596 #edd-payment-mode-wrap label.edd-gateway-option:is(:hover, .edd-gateway-option-selected) {
  border-color: var(--y-accent);
  background: var(--y-subtle);
}

.page-id-596 #edd_purchase_submit {
  padding: 26px 30px;
  background: var(--y-subtle);
  box-shadow: inset 0 0 0 1px var(--y-border);
}

.page-id-596 #edd_final_total_wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
  color: var(--y-text);
}

.page-id-596 #edd_final_total_wrap .edd_cart_amount {
  font-size: 1.25rem;
  font-weight: 600;
}

.page-id-596 #edd-purchase-button {
  width: 100%;
  min-height: 56px;
  font-size: 1rem;
}

/* Order summary. */
.page-id-596 #edd_checkout_cart_form,
.page-id-596 #edd_checkout_cart {
  min-width: 0;
}

body.page-id-596 .y-article-content .edd-blocks-form__cart #edd_checkout_cart {
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: var(--y-white);
  box-shadow: inset 0 0 0 1px var(--y-border);
}

.page-id-596 #edd_checkout_cart .edd-blocks-cart__row-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--y-border);
  background: var(--y-subtle);
  color: var(--y-muted);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.page-id-596 #edd_checkout_cart .edd-blocks-cart__row-item {
  align-items: flex-start;
  padding: 20px;
  border: 0;
}

.page-id-596 #edd_checkout_cart .edd-blocks-cart__row-item + .edd-blocks-cart__row-item {
  border-top: 1px solid var(--y-border);
}

.page-id-596 #edd_checkout_cart .edd_checkout_cart_item_title {
  font-weight: 500;
  line-height: 1.4;
}

.page-id-596 #edd_checkout_cart .edd_cart_item_price {
  white-space: nowrap;
}

.page-id-596 #edd_checkout_cart .edd_cart_footer_row {
  min-height: 46px;
  padding: 11px 20px;
  border: 0;
  border-top: 1px solid var(--y-border);
  background: var(--y-white);
  font-size: .9rem;
}

.page-id-596 #edd_checkout_cart .edd_cart_footer_row:has(.edd_cart_total) {
  min-height: 58px;
  padding-block: 15px;
  background: var(--y-subtle);
  color: var(--y-accent-text);
  font-size: 1rem;
}

.page-id-596 #edd_checkout_cart :is(.edd_cart_subtotal, .edd_cart_tax, .edd_cart_total) {
  border: 0;
  background: transparent;
}

.page-id-596 #edd_checkout_cart .edd_cart_total .edd_cart_amount {
  font-size: 1.12rem;
  font-weight: 600;
}

.page-id-596 #edd_checkout_cart :is(#edd_show_discount, #edd-discount-code-wrap) {
  font-size: .86rem;
}

.page-id-596 .edd_empty_cart {
  display: block;
  width: 100%;
  margin: 0;
  padding: clamp(36px, 7vw, 72px) 24px;
  border: 1px solid var(--y-border);
  border-radius: 18px;
  background: var(--y-white);
  color: var(--y-muted);
  box-shadow: none;
  font-size: 1.05rem;
}

.page-id-596 .y-article-content > .wp-block-paragraph:last-child {
  margin: 24px 0 0;
  font-size: .92rem;
}

.page-id-596 .y-article-content > .wp-block-paragraph:last-child a {
  font-weight: 500;
  text-underline-offset: 4px;
}

.page-id-596 .edd-loading,
.page-id-596 .edd-loading-ajax {
  color: var(--y-accent-text);
}

@media (min-width: 60rem) {
  .page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 390px);
    gap: 34px clamp(34px, 4vw, 52px);
  }

  .page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout > .edd-blocks__logged-in {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout > .edd-blocks__purchase-form {
    grid-column: 1;
    grid-row: 2;
  }

  .page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout > .edd-blocks__cart {
    position: sticky;
    top: 110px;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout > .edd-alert {
    grid-column: 1 / -1;
  }
}

@media (max-width: 59.99rem) {
  .page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout > .edd-blocks__logged-in,
  .page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout > .edd-blocks__cart,
  .page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout > .edd-blocks__purchase-form {
    grid-column: 1;
  }

  .page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout > .edd-blocks__logged-in { order: 1; }
  .page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout > .edd-blocks__cart { order: 2; }
  .page-id-596 #edd_checkout_form_wrap.wp-block-edd-checkout > .edd-blocks__purchase-form { order: 3; }
}

@media (max-width: 48rem) {
  .page-id-596 #edd_purchase_form :is(fieldset.edd-blocks-form, #edd_purchase_submit) {
    padding: 20px;
    border-radius: 14px;
  }

  .page-id-596 #edd_purchase_form fieldset.edd-blocks-form > legend {
    margin-bottom: 20px;
    padding-bottom: 14px;
  }

  .page-id-596 #edd_checkout_user_info,
  .page-id-596 #edd_purchase_form .edd-blocks-form.cc-address {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-id-596 #edd_checkout_user_info > :is(div, p),
  .page-id-596 #edd_checkout_user_info > #edd-first-name-wrap,
  .page-id-596 #edd_checkout_user_info > #edd-last-name-wrap,
  .page-id-596 #edd_purchase_form .edd-blocks-form.cc-address > * {
    width: 100%;
    grid-column: 1;
  }

  .page-id-596 #edd_purchase_form .edd-blocks-form__halves {
    flex-direction: column;
  }

  .page-id-596 #edd_purchase_form .edd-blocks-form__halves > * {
    width: 100%;
  }

  .page-id-596 #edd_checkout_cart .edd-blocks-cart__row-header {
    display: none;
  }

  .page-id-596 #edd_checkout_cart .edd-blocks-cart__row-item {
    align-items: flex-start;
    padding: 18px;
  }

  .page-id-596 #edd_checkout_cart .edd_cart_footer_row {
    align-items: flex-start;
    padding-inline: 18px;
  }

  .page-id-596 #edd_final_total_wrap {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

/* Login and logged-out account fallback. */
.page-id-609 .y-article-content {
  max-width: 720px;
}

.page-id-599 .y-article-content .edd_form {
  max-width: 720px;
}

body:is(.page-id-599, .page-id-609) .y-article-content :is(.edd-blocks-form__login, #edd_login_form) {
  margin: 0;
}

body:is(.page-id-599, .page-id-609) .y-article-content :is(.edd-blocks-form__group, .edd_form p) {
  margin: 0;
}

body:is(.page-id-599, .page-id-609) .y-article-content :is(.edd-blocks-form__group, .edd_form fieldset) > * + * {
  margin-top: 8px;
}

body:is(.page-id-599, .page-id-609) .y-article-content .edd-blocks-form {
  gap: 22px;
}

body:is(.page-id-599, .page-id-609) .y-article-content :is(.edd-blocks-form__group-submit, .edd-login-submit) :is(.edd-submit, input[type="submit"]) {
  width: 100%;
}

body:is(.page-id-599, .page-id-609) .y-article-content :is(.edd-blocks-form__group-lost-password, .edd-lost-password) {
  text-align: center;
}

.page-id-599 .edd-logged-out {
  padding: 16px 18px;
  border-left: 4px solid var(--y-accent);
  background: var(--y-subtle);
  color: var(--y-accent-text);
}

/* Receipts, order history, downloads, subscriptions and invoices. */
body:is(.page-id-597, .page-id-599, .page-id-600, .page-id-622) .y-article-content :is(table, .edd-table) {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--y-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--y-white);
  font-size: .92rem;
}

body:is(.page-id-597, .page-id-599, .page-id-600, .page-id-622) .y-article-content :is(th, td) {
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--y-border);
  text-align: left;
  vertical-align: top;
}

body:is(.page-id-597, .page-id-599, .page-id-600, .page-id-622) .y-article-content th {
  background: var(--y-subtle);
  color: var(--y-muted);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .045em;
  text-transform: uppercase;
}

body:is(.page-id-597, .page-id-599, .page-id-600, .page-id-622) .y-article-content tr:last-child :is(th, td) {
  border-bottom: 0;
}

body:is(.page-id-597, .page-id-599, .page-id-600, .page-id-622) .y-article-content :is(
  .edd-blocks-receipt,
  .wp-block-edd-receipt,
  .edd-blocks__receipt,
  .wp-block-edd-orders,
  .edd-blocks-order-history,
  .edd-blocks__orders,
  .wp-block-edd-user-downloads,
  .edd-blocks-user-downloads,
  .edd-blocks__user-downloads,
  .edd-blocks-subscriptions,
  #edd_user_history,
  #edd_user_downloads,
  #edd_subscription_receipt,
  .edd_invoice
) {
  margin-block: 0 28px;
  padding: clamp(20px, 4vw, 34px);
  overflow-x: auto;
}

.page-id-599 .edd-blocks__subscriptions-grid {
  gap: 18px;
}

.page-id-599 .edd-blocks-subscriptions__grid-item {
  border-color: var(--y-border);
  border-radius: 12px;
  background: var(--y-white);
}

.page-id-599 #edd-blocks-form__profile-editor :is(
  #edd_profile_personal_fieldset,
  #edd_profile_address_fieldset,
  #edd_profile_password_fieldset
) {
  margin: 0;
  padding: 24px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-id-599 #edd-blocks-form__profile-editor :is(
  #edd_profile_personal_fieldset,
  #edd_profile_address_fieldset,
  #edd_profile_password_fieldset
) + fieldset {
  margin-top: 20px;
}

/* The invoice shortcode renders its editable billing form directly in content. */
.page-id-622 .y-article-content {
  max-width: 820px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--y-border);
  border-radius: var(--y-card-radius);
  background: var(--y-white);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .05);
}

.page-id-622 #edd-invoices {
  display: grid;
  gap: 20px;
}

.page-id-622 #edd-invoices .edd-invoices-div {
  display: grid;
  grid-template-columns: minmax(150px, .45fr) minmax(0, 1fr);
  align-items: center;
  gap: 14px 24px;
  margin: 0;
}

.page-id-622 #edd-invoices .edd-invoices-div__notes {
  align-items: start;
}

.page-id-622 #edd-invoices .edd-invoices-div__generate {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

/* Confirmation, receipt and failure messages. */
body:is(.page-id-597, .page-id-598, .page-id-600, .page-id-622) .y-article-content > p:not(.edd-alert),
body:is(.page-id-597, .page-id-598, .page-id-600, .page-id-622) .y-article-content > .wp-block-paragraph {
  max-width: 760px;
  margin: 0;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--y-border);
  border-radius: var(--y-card-radius);
  background: var(--y-white);
}

body:is(.page-id-597, .page-id-598, .page-id-600, .page-id-622) .y-article-content > p + p {
  margin-top: 16px;
}

body.page-id-598 .y-article-content {
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--y-border);
  border-radius: var(--y-card-radius);
  background: var(--y-white);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .05);
}

.page-id-598 .y-article-content > :is(p, .wp-block-paragraph) {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.page-id-598 .y-article-content > :is(p, .wp-block-paragraph) + :is(p, .wp-block-paragraph) {
  margin-top: 16px;
}

body.page-id-598 .y-article-content > p:not(.edd-alert),
body.page-id-598 .y-article-content > .wp-block-paragraph:not(.edd-alert) {
  max-width: none;
  margin-inline: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.page-id-598 .y-article-content > p:not(.edd-alert) + p:not(.edd-alert) {
  margin-top: 16px;
}

body:is(.page-id-596, .page-id-597, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content .edd-alert {
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid var(--y-border);
  border-left: 4px solid var(--y-accent);
  border-radius: 10px;
  background: var(--y-white);
  color: var(--y-text);
  box-shadow: none;
}

body:is(.page-id-596, .page-id-597, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content .edd-alert-error {
  border-color: var(--y-error);
  border-left-color: var(--y-error);
  background: var(--y-error-background);
  color: var(--y-error);
}

body:is(.page-id-596, .page-id-597, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content .edd-alert-success {
  border-color: var(--y-success);
  border-left-color: var(--y-success);
  background: var(--y-success-background);
  color: var(--y-success);
}

@media (max-width: 48rem) {
  body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-header,
  body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content {
    width: min(100% - 32px, var(--y-edd-content));
  }

  .page-id-622 #edd-invoices .edd-invoices-div {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .page-id-622 #edd-invoices .edd-invoices-div__generate,
  .page-id-622 #edd-invoices .edd-invoices-generate-invoice-button {
    width: 100%;
  }

  body:is(.page-id-597, .page-id-599, .page-id-600, .page-id-622) .y-article-content :is(table, .edd-table) {
    max-width: 100%;
    font-size: .82rem;
  }

  body:is(.page-id-597, .page-id-599, .page-id-600, .page-id-622) .y-article-content :is(th, td) {
    padding: 11px 9px;
    overflow-wrap: anywhere;
  }

  body:is(.page-id-597, .page-id-599, .page-id-600, .page-id-622) .y-article-content :is(
    .edd-blocks-receipt,
    .wp-block-edd-receipt,
    .edd-blocks__receipt,
    .wp-block-edd-orders,
    .edd-blocks-order-history,
    .edd-blocks__orders,
    .wp-block-edd-user-downloads,
    .edd-blocks-user-downloads,
    .edd-blocks__user-downloads,
    .edd-blocks-subscriptions,
    #edd_user_history,
    #edd_user_downloads,
    #edd_subscription_receipt,
    .edd_invoice
  ) {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content :is(
    .edd-submit,
    #edd-purchase-button,
    .edd-button-primary,
    button[type="submit"],
    input[type="submit"]
  ) {
    transition: none;
  }
}

@media (forced-colors: active) {
  body:is(.page-id-596, .page-id-597, .page-id-598, .page-id-599, .page-id-600, .page-id-609, .page-id-622) .y-article-content :is(
    .edd-submit,
    #edd-purchase-button,
    .edd-button-primary,
    button[type="submit"],
    input[type="submit"]
  ) {
    border: 2px solid ButtonText;
  }
}

/* Native [download_checkout] cart table on narrow screens.
 * The shortcode renders a plain <table id="edd_checkout_cart"> with
 * .edd_cart_* cells, so it also picks up the article table rules: 1rem cell
 * padding plus overflow-wrap: anywhere. Below 48rem that leaves the price and
 * action columns too narrow and breaks "Actions" and "Remove" mid-word.
 * Give the price and action columns their own width, keep them on one line and
 * let only the product name wrap, on whole words. Scoped to the table itself,
 * not to a block wrapper, so the shortcode is covered wherever it is used. */
@media (max-width: 48rem) {
  #edd_checkout_cart,
  table.edd_cart,
  .edd_cart_table {
    width: 100%;
    table-layout: auto;
  }

  #edd_checkout_cart :is(th, td),
  table.edd_cart :is(th, td),
  .edd_cart_table :is(th, td) {
    padding: 10px 8px;
    overflow-wrap: break-word;
    hyphens: manual;
    vertical-align: top;
  }

  #edd_checkout_cart :is(th, td).edd_cart_item_name,
  table.edd_cart :is(th, td).edd_cart_item_name {
    width: auto;
    padding-left: 0;
  }

  #edd_checkout_cart :is(th, td):is(.edd_cart_item_price, .edd_cart_actions, .edd_cart_item_qty),
  table.edd_cart :is(th, td):is(.edd_cart_item_price, .edd_cart_actions, .edd_cart_item_qty) {
    width: 1%;
    white-space: nowrap;
    text-align: right;
  }

  #edd_checkout_cart :is(.edd_cart_header_row th, .edd_cart_footer_row th, .edd_cart_footer_row td) {
    padding-inline: 0;
  }

  #edd_checkout_cart .edd_cart_item_image {
    display: none;
  }
}
