/**
 * Membership checkout — porcelain shell + clay accents over s2Member Pro forms.
 */

body.iawf-membership-checkout {
  --iawf-ck-porcelain: #f7efe6;
  --iawf-ck-surface: #fff9f3;
  --iawf-ck-ink: #1f130c;
  --iawf-ck-soft: #3f2e24;
  --iawf-ck-muted: #6f5c4f;
  --iawf-ck-border: #dcc9b6;
  --iawf-ck-input: #f3e8db;
  --iawf-ck-clay: #ff850d;
  --iawf-ck-flame: #ff4800;
  --iawf-ck-gradient: linear-gradient(120deg, #ff4800, #ff850d);
  --iawf-ck-font-display: "Lora", Georgia, serif;
  --iawf-ck-font-body: "Montserrat", system-ui, sans-serif;
}

body.iawf-membership-checkout .bg-porcelain {
  background:
    radial-gradient(1200px 480px at 12% -10%, rgba(255, 133, 13, 0.18), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(255, 72, 0, 0.1), transparent 50%),
    var(--iawf-ck-porcelain) !important;
  padding-top: 7.5rem;
  padding-bottom: 4.5rem;
}

@media (min-width: 1024px) {
  body.iawf-membership-checkout .bg-porcelain {
    padding-top: 8.5rem;
    padding-bottom: 5.5rem;
  }
}

.iawf-checkout {
  position: relative;
  font-family: var(--iawf-ck-font-body);
  color: var(--iawf-ck-ink);
}

.iawf-checkout__glow {
  pointer-events: none;
  position: absolute;
  inset: -2rem -1rem auto;
  height: 14rem;
  background: radial-gradient(ellipse at center, rgba(255, 133, 13, 0.16), transparent 70%);
  z-index: 0;
}

.iawf-checkout__shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.15rem;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
  animation: iawf-checkout-in 0.55s ease both;
}

/* Mobile: compact plan chip first, form is the main priority. */
.iawf-checkout__summary {
  order: 1;
}

.iawf-checkout__panel {
  order: 2;
}

@media (min-width: 900px) {
  .iawf-checkout__shell {
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.25fr);
    gap: 2rem;
  }

  .iawf-checkout__summary,
  .iawf-checkout__panel {
    order: initial;
  }
}

@keyframes iawf-checkout-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.iawf-checkout__summary {
  position: relative;
  border-radius: 1.25rem;
  padding: 1.15rem 1.2rem 1.1rem;
  color: #fff;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.08), transparent 40%),
    var(--iawf-ck-gradient);
  box-shadow: 0 18px 40px rgba(255, 72, 0, 0.22);
}

@media (min-width: 900px) {
  .iawf-checkout__summary {
    padding: 1.75rem 1.6rem 1.6rem;
    position: sticky;
    top: 6.25rem;
    z-index: 2;
    max-height: none;
    overflow: visible;
  }

  .admin-bar .iawf-checkout__summary {
    top: calc(6.25rem + 32px);
  }

  body.logged-in .iawf-checkout__panel {
    position: sticky;
    top: 6.25rem;
    z-index: 2;
  }

  body.logged-in.admin-bar .iawf-checkout__panel {
    top: calc(6.25rem + 32px);
  }
}

.iawf-checkout__summary-inner {
  position: relative;
  z-index: 1;
}

.iawf-checkout__summary-top {
  position: relative;
  z-index: 1;
}

.iawf-checkout__details-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.85rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: var(--iawf-ck-font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.iawf-checkout__details-toggle:hover,
.iawf-checkout__details-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.75);
  outline: none;
}

.iawf-checkout__details-toggle-hide {
  display: none;
}

.iawf-checkout__summary.is-details-open .iawf-checkout__details-toggle-show {
  display: none;
}

.iawf-checkout__summary.is-details-open .iawf-checkout__details-toggle-hide {
  display: inline;
}

.iawf-checkout__summary-details {
  position: relative;
  z-index: 1;
}

@media (max-width: 899px) {
  .iawf-checkout__summary::before,
  .iawf-checkout__summary::after {
    opacity: 0.55;
  }

  .iawf-checkout__eyebrow {
    margin-bottom: 0.4rem;
  }

  .iawf-checkout__plan {
    font-size: clamp(1.35rem, 5vw, 1.7rem);
  }

  .iawf-checkout__price {
    margin-top: 0.4rem;
    font-size: clamp(1.55rem, 5.5vw, 1.9rem);
  }

  .iawf-checkout__summary-details {
    display: none;
    margin-top: 0.95rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
  }

  .iawf-checkout__summary.is-details-open .iawf-checkout__summary-details {
    display: block;
  }

  .iawf-checkout__panel {
    padding: 1.2rem 1rem 1.4rem;
  }
}

@media (min-width: 900px) {
  .iawf-checkout__details-toggle {
    display: none;
  }

  .iawf-checkout__summary-details {
    display: block;
  }
}

.iawf-checkout__summary::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -48px;
  top: -56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.iawf-checkout__summary::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  left: -36px;
  bottom: -40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.iawf-checkout__eyebrow,
.iawf-checkout__plan,
.iawf-checkout__price,
.iawf-checkout__lede,
.iawf-checkout__features-label,
.iawf-checkout__features,
.iawf-checkout__perks,
.iawf-checkout__back-link {
  position: relative;
  z-index: 1;
}

.iawf-checkout__eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.92;
}

.iawf-checkout__plan {
  margin: 0;
  font-family: var(--iawf-ck-font-display);
  font-size: clamp(1.65rem, 2.4vw, 2.15rem);
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

.iawf-checkout__price {
  margin: 0.7rem 0 0;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.iawf-checkout__lede {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  max-width: 28ch;
}

.iawf-checkout__features-label {
  margin: 1.2rem 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.95;
}

.iawf-checkout__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.iawf-checkout__features li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.86rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.96);
}

.iawf-checkout__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
}

.iawf-checkout__perks {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 1rem 0 0;
  display: grid;
  gap: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.iawf-checkout__perks li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
}

.iawf-checkout__perks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.iawf-checkout__back-link {
  display: inline-flex;
  margin-top: 1.4rem;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.iawf-checkout__back-link:hover,
.iawf-checkout__back-link:focus-visible {
  border-bottom-color: #fff;
  opacity: 0.95;
}

.iawf-checkout__panel {
  border-radius: 1.35rem;
  background: #fff;
  border: 1px solid rgba(220, 201, 182, 0.85);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 14px 36px rgba(36, 20, 11, 0.06);
  padding: 1.35rem 1.15rem 1.6rem;
  animation: iawf-checkout-in 0.65s ease 0.08s both;
}

@media (min-width: 640px) {
  .iawf-checkout__panel {
    padding: 1.75rem 1.85rem 2rem;
  }
}

/* Hide redundant page headings — panel head + summary already show the plan. */
.iawf-checkout__panel > .wp-block-heading,
.iawf-checkout__panel > p.has-text-align-center:not(.has-small-font-size),
.iawf-checkout__panel > p.has-small-font-size {
  display: none;
}

/* Plan name above Create Profile (fills the space above the section border). */
.iawf-checkout__panel-head {
  margin: 0 0 0.15rem;
}

.iawf-checkout__panel-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--iawf-ck-muted);
}

.iawf-checkout__panel-plan {
  margin: 0;
  font-family: var(--iawf-ck-font-display);
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--iawf-ck-ink);
}

.iawf-checkout__panel-price {
  margin: 0.4rem 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--iawf-ck-flame);
}

/* On mobile the compact summary chip already shows plan/price — avoid duplicate. */
@media (max-width: 899px) {
  .iawf-checkout__panel-head {
    display: none;
  }
}

/* s2Member Pro PayPal form */
.iawf-checkout form.s2member-pro-paypal-form {
  margin: 0;
  color: var(--iawf-ck-ink);
}

/* Plan name/price already live in the sticky summary — hide s2Member's redundant strip. */
.iawf-checkout div.s2member-pro-paypal-form-description-section {
  display: none !important;
}

.iawf-checkout div.s2member-pro-paypal-form-section {
  margin: 1.65rem 0 0;
  padding: 0;
}

.iawf-checkout div.s2member-pro-paypal-form-section:first-child,
.iawf-checkout div.s2member-pro-paypal-form-response-section {
  margin-top: 0;
}

.iawf-checkout div.s2member-pro-paypal-form-registration-section,
.iawf-checkout div.s2member-pro-paypal-form-custom-fields-section,
.iawf-checkout div.s2member-pro-paypal-form-billing-method-section,
.iawf-checkout div.s2member-pro-paypal-form-billing-address-section {
  margin-top: 1.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(220, 201, 182, 0.65);
}

/* Tighter gap: panel plan name sits directly above the Create Profile divider. */
.iawf-checkout__panel:has(.iawf-checkout__panel-head) div.s2member-pro-paypal-form-registration-section {
  margin-top: 1.15rem;
}

.iawf-checkout div.s2member-pro-paypal-form-section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--iawf-ck-font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--iawf-ck-ink);
  border: 0 !important;
  border-image: none !important;
  margin: 0 0 1.1rem;
  padding: 0;
  min-height: 0;
  background: none !important;
  background-image: none !important;
}

.iawf-checkout div.s2member-pro-paypal-form-section-title::before {
  content: "";
  flex: 0 0 auto;
  width: 0.35rem;
  height: 1.15rem;
  border-radius: 999px;
  background: var(--iawf-ck-gradient);
}

/* Profile: name fields side-by-side on wider panels */
.iawf-checkout #s2member-pro-paypal-checkout-form-registration-section,
.iawf-checkout #s2member-pro-paypal-registration-form-registration-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 0.9rem;
}

@media (min-width: 640px) {
  .iawf-checkout #s2member-pro-paypal-checkout-form-registration-section,
  .iawf-checkout #s2member-pro-paypal-registration-form-registration-section {
    grid-template-columns: 1fr 1fr;
  }

  .iawf-checkout #s2member-pro-paypal-checkout-form-registration-section-title,
  .iawf-checkout #s2member-pro-paypal-checkout-form-email-div,
  .iawf-checkout #s2member-pro-paypal-checkout-form-username-div,
  .iawf-checkout #s2member-pro-paypal-checkout-form-password-div,
  .iawf-checkout #s2member-pro-paypal-registration-form-registration-section-title,
  .iawf-checkout #s2member-pro-paypal-registration-form-email-div,
  .iawf-checkout #s2member-pro-paypal-registration-form-username-div,
  .iawf-checkout #s2member-pro-paypal-registration-form-password-div {
    grid-column: 1 / -1;
  }
}

.iawf-checkout div.s2member-pro-paypal-form-div {
  margin: 0 0 1.05rem;
}

.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div > label:not(.iawf-choice),
.iawf-checkout div.s2member-pro-paypal-form-div label:not(.iawf-choice),
.iawf-checkout label.s2member-pro-paypal-form-first-name-label,
.iawf-checkout label.s2member-pro-paypal-form-last-name-label,
.iawf-checkout label.s2member-pro-paypal-form-email-label,
.iawf-checkout label.s2member-pro-paypal-form-username-label,
.iawf-checkout label.s2member-pro-paypal-form-password-label,
.iawf-checkout .s2member-pro-paypal-form-div > label:not(.iawf-choice) {
  display: block;
  width: 100%;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--iawf-ck-muted);
  margin: 0 0 0.5rem;
  line-height: 1.3;
  background: none !important;
  padding: 0 !important;
}

/*
 * Beat s2Member: div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div input
 * (inputs often sit inside labels).
 */
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div input[type="text"],
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div input[type="email"],
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div input[type="password"],
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div input[type="tel"],
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div input[type="number"],
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div select,
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div textarea,
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div label input[type="text"],
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div label input[type="email"],
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div label input[type="password"],
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div label input[type="tel"],
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div label select,
.iawf-checkout .s2member-pro-paypal-form input.form-control,
.iawf-checkout .s2member-pro-paypal-form select.form-control,
.iawf-checkout .s2member-pro-paypal-form textarea.form-control {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 3.15rem !important;
  height: auto !important;
  box-sizing: border-box !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 1.5px solid #d7c4b0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  background-image: none !important;
  color: var(--iawf-ck-ink) !important;
  font-family: var(--iawf-ck-font-body) !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  padding: 0.9rem 1.05rem !important;
  margin: 0.45rem 0 0 !important;
  box-shadow: 0 1px 0 rgba(36, 20, 11, 0.03) !important;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div select,
.iawf-checkout .s2member-pro-paypal-form select.form-control {
  padding-right: 2.4rem !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%236f5c4f' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.9rem center !important;
  background-size: 1rem !important;
  cursor: pointer;
}

.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div input::placeholder,
.iawf-checkout .s2member-pro-paypal-form input.form-control::placeholder {
  color: #9a8574 !important;
  font-weight: 400 !important;
  opacity: 1;
}

.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div input[type="password"] + input[type="password"],
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div label input[type="password"] + input[type="password"] {
  margin-top: 0.65rem !important;
}

.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div input:hover,
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div select:hover,
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div label input:hover,
.iawf-checkout .s2member-pro-paypal-form input.form-control:hover,
.iawf-checkout .s2member-pro-paypal-form select.form-control:hover {
  border-color: #c4a88e !important;
}

.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div input:focus,
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div select:focus,
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div textarea:focus,
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div label input:focus,
.iawf-checkout .s2member-pro-paypal-form input.form-control:focus,
.iawf-checkout .s2member-pro-paypal-form select.form-control:focus {
  outline: none !important;
  border-color: var(--iawf-ck-flame) !important;
  background-color: #fffcf8 !important;
  box-shadow: 0 0 0 3px rgba(255, 72, 0, 0.14) !important;
}

.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div input:disabled,
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div input[readonly],
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div label input:disabled,
.iawf-checkout div.s2member-pro-paypal-form-section > div.s2member-pro-paypal-form-div label input[readonly],
.iawf-checkout .s2member-pro-paypal-form input.form-control:disabled,
.iawf-checkout .s2member-pro-paypal-form input.form-control[readonly] {
  background: #f6efe7 !important;
  color: var(--iawf-ck-soft) !important;
  border-color: #e2d2c2 !important;
  cursor: default;
  opacity: 1 !important;
}

.iawf-checkout div.s2member-pro-paypal-form-response-error,
.iawf-checkout div.s2member-pro-paypal-form-response-info {
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
  background-image: none !important;
}

.iawf-checkout div.s2member-pro-paypal-form-response-error {
  border: 1px solid #f0b0b0;
  background: #fff1f1;
  color: #7a1f1f;
}

.iawf-checkout div.s2member-pro-paypal-form-response-info {
  border: 1px solid #c9e4b5;
  background: #eef8e6;
  color: #214218;
}

.iawf-checkout div.s2member-pro-paypal-form-password-strength,
.iawf-checkout .ws-plugin--s2member-password-strength {
  margin-top: 0.55rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.55rem;
  background: #f3ebe2;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--iawf-ck-muted);
}

.iawf-checkout .ws-plugin--s2member-password-strength em {
  font-style: normal;
}

/* Password show / hide */
.iawf-checkout .iawf-pw-field {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 0.45rem;
}

.iawf-checkout .iawf-pw-field + .iawf-pw-field {
  margin-top: 0.65rem;
}

.iawf-checkout label .iawf-pw-field {
  margin-top: 0.45rem;
}

.iawf-checkout .iawf-pw-field input[type="password"],
.iawf-checkout .iawf-pw-field input[type="text"] {
  width: 100% !important;
  padding-right: 3rem !important;
  margin-top: 0 !important;
}

.iawf-checkout .iawf-pw-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--iawf-ck-muted);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.iawf-checkout .iawf-pw-toggle:hover,
.iawf-checkout .iawf-pw-toggle:focus-visible {
  color: var(--iawf-ck-flame);
  background: rgba(255, 72, 0, 0.08);
  outline: none;
}

.iawf-checkout .iawf-pw-toggle.is-visible {
  color: var(--iawf-ck-flame);
}

.iawf-checkout .iawf-pw-toggle svg {
  display: block;
  pointer-events: none;
}

.iawf-checkout label.s2member-pro-paypal-form-card-type-label {
  width: auto !important;
  min-width: 4.25rem;
  margin: 0 0.35rem 0.5rem 0;
  padding: 0.55rem 0.45rem 0.35rem;
  border-radius: 0.7rem;
  border: 1px solid #e2d2c2;
  background: #fff;
  vertical-align: top;
}

.iawf-checkout label.s2member-pro-paypal-form-card-type-label input[type="radio"] {
  margin-top: 0.35rem !important;
}

.iawf-checkout #s2member-pro-paypal-checkout-form-submit-div,
.iawf-checkout #s2member-pro-paypal-registration-form-submit-div,
.iawf-checkout div.s2member-pro-paypal-form-submit-div {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0.35rem 0 0;
}

.iawf-checkout .s2member-pro-paypal-form input[type="submit"],
.iawf-checkout .s2member-pro-paypal-form input[type="button"].btn,
.iawf-checkout .s2member-pro-paypal-form button[type="submit"],
.iawf-checkout button#s2member-pro-paypal-checkout-submit,
.iawf-checkout input#s2member-pro-paypal-checkout-submit,
.iawf-checkout #s2member-pro-paypal-checkout-submit,
.iawf-checkout button#s2member-pro-paypal-registration-submit,
.iawf-checkout input#s2member-pro-paypal-registration-submit,
.iawf-checkout #s2member-pro-paypal-registration-submit,
.iawf-checkout input.s2member-pro-paypal-submit,
.iawf-checkout button.s2member-pro-paypal-submit {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 3.35rem !important;
  height: auto !important;
  margin: 0.35rem 0 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 1.05rem 1.5rem !important;
  font-family: var(--iawf-ck-font-body) !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: #fff !important;
  background: var(--iawf-ck-gradient) !important;
  background-color: var(--iawf-ck-flame) !important;
  background-image: var(--iawf-ck-gradient) !important;
  box-shadow: 0 12px 24px rgba(255, 72, 0, 0.26) !important;
  cursor: pointer !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

/* Fallback if the GIF input is still rendered: hide graphic, keep click target. */
.iawf-checkout #s2member-pro-paypal-checkout-form-submit-div {
  position: relative;
  width: 100%;
}

.iawf-checkout input#s2member-pro-paypal-checkout-submit[type="image"] {
  position: relative;
  z-index: 2;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 3.35rem !important;
  height: 3.35rem !important;
  margin: 0.35rem 0 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  cursor: pointer !important;
  object-fit: cover;
}

.iawf-checkout #s2member-pro-paypal-checkout-form-submit-div:has(input[type="image"])::after {
  content: "Complete Secure Checkout";
  position: absolute;
  left: 0;
  right: 0;
  top: 0.35rem;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-family: var(--iawf-ck-font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background-image: var(--iawf-ck-gradient);
  background-color: var(--iawf-ck-flame);
  box-shadow: 0 12px 24px rgba(255, 72, 0, 0.26);
  pointer-events: none;
}

.iawf-checkout .s2member-pro-paypal-form input[type="submit"]:hover,
.iawf-checkout .s2member-pro-paypal-form button[type="submit"]:hover,
.iawf-checkout #s2member-pro-paypal-checkout-submit[type="submit"]:hover,
.iawf-checkout input.s2member-pro-paypal-submit[type="submit"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 14px 26px rgba(255, 72, 0, 0.34) !important;
}

.iawf-checkout .s2member-pro-paypal-form input[type="button"].s2member-pro-paypal-coupon-apply {
  width: auto;
  margin-top: 0;
  margin-left: 0.5rem;
  padding: 0.75rem 1.05rem;
  border-radius: 12px;
  text-transform: none;
  letter-spacing: 0.02em;
  box-shadow: none;
}

.iawf-checkout .s2member-pro-paypal-form-submission-section,
.iawf-checkout .s2member-pro-paypal-checkout-form-submission-section,
.iawf-checkout .s2member-pro-paypal-registration-form-submission-section {
  margin-top: 1.5rem;
  padding-top: 0.25rem;
}

/* Free registration Pro-Form polish */
.iawf-checkout--free #s2member-pro-paypal-registration-form-options-section,
.iawf-checkout--free #s2member-pro-paypal-registration-form-description-section {
  display: none !important;
}

.iawf-checkout--free #s2member-pro-paypal-registration-form-submission-section-title {
  display: none !important;
}

.iawf-checkout button#s2member-pro-paypal-registration-submit,
.iawf-checkout input#s2member-pro-paypal-registration-submit {
  width: 100% !important;
}

.iawf-checkout div.s2member-pro-paypal-form-custom-fields-section,
.iawf-checkout #s2member-pro-paypal-registration-form-custom-fields-section,
.iawf-checkout #s2member-pro-paypal-checkout-form-custom-fields-section {
  margin-top: 1.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(220, 201, 182, 0.65);
}

/* s2Member inserts <br> between custom-field labels and inputs — collapse that gap. */
.iawf-checkout .s2member-pro-paypal-form-custom-fields-section .s2member-pro-paypal-form-div > br {
  display: none !important;
}

.iawf-checkout .s2member-pro-paypal-form-custom-fields-section .s2member-pro-paypal-form-div {
  margin: 0 0 0.85rem;
}

.iawf-checkout .s2member-pro-paypal-form-custom-fields-section .s2member-pro-paypal-form-div > label {
  display: block;
  width: 100%;
  margin: 0 0 0.35rem !important;
  padding: 0 !important;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--iawf-ck-muted);
  line-height: 1.3;
}

.iawf-checkout .s2member-pro-paypal-form-custom-fields-section .s2member-pro-paypal-form-div > input.form-control,
.iawf-checkout .s2member-pro-paypal-form-custom-fields-section .s2member-pro-paypal-form-div > select.form-control,
.iawf-checkout .s2member-pro-paypal-form-custom-fields-section .s2member-pro-paypal-form-div > textarea {
  margin-top: 0 !important;
}

/* City + State side-by-side when space allows */
@media (min-width: 640px) {
  .iawf-checkout .s2member-pro-paypal-form-custom-fields-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 0.9rem;
    align-items: start;
  }

  .iawf-checkout .s2member-pro-paypal-form-custom-fields-section > .s2member-pro-paypal-form-section-title,
  .iawf-checkout .s2member-pro-paypal-form-custom-fields-section > [id*="volunteer"],
  .iawf-checkout .s2member-pro-paypal-form-custom-fields-section > [class*="volunteer"] {
    grid-column: 1 / -1;
  }
}

/* Volunteer Yes/No segmented control (built by membership-checkout.js) */
.iawf-checkout .iawf-choice-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 0.45rem;
  width: 100%;
  max-width: 20rem;
}

.iawf-checkout .iawf-choice {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 !important;
  padding: 0.95rem 1.1rem !important;
  min-height: 3.25rem;
  width: auto !important;
  border: 1.5px solid #d7c4b0 !important;
  border-radius: 0.95rem !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  cursor: pointer;
  user-select: none;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
  text-transform: none !important;
  letter-spacing: 0.01em !important;
  font-size: 0.98rem !important;
  font-weight: 700 !important;
  color: var(--iawf-ck-ink) !important;
  line-height: 1.2 !important;
}

.iawf-checkout .iawf-choice:hover {
  border-color: #c9ae95 !important;
  background: #fffaf5 !important;
}

.iawf-checkout .iawf-choice:focus-within {
  outline: none;
  border-color: var(--iawf-ck-clay) !important;
  box-shadow: 0 0 0 3px rgba(255, 133, 13, 0.18);
}

.iawf-checkout .iawf-choice.is-selected {
  border-color: var(--iawf-ck-flame) !important;
  background: #fff3e8 !important;
  background-image: none !important;
  box-shadow:
    0 0 0 3px rgba(255, 72, 0, 0.12),
    0 8px 18px rgba(255, 72, 0, 0.08);
  color: var(--iawf-ck-flame) !important;
  transform: translateY(-1px);
}

.iawf-checkout .iawf-choice__text {
  position: relative;
  z-index: 1;
}

.iawf-checkout .iawf-choice::before {
  content: "";
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 1.5px solid #cbb59f;
  background: #fff;
  box-shadow: inset 0 0 0 0 var(--iawf-ck-flame);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.iawf-checkout .iawf-choice.is-selected::before {
  border-color: var(--iawf-ck-flame);
  background: var(--iawf-ck-flame);
  box-shadow: inset 0 0 0 3px #fff;
}

.iawf-checkout .iawf-choice input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  clip: rect(0, 0, 0, 0);
}

/* Fallback if JS has not wrapped yet */
.iawf-checkout .s2member-pro-paypal-form-custom-fields-section input[type="radio"]:not(.iawf-choice input),
.iawf-checkout .s2member-pro-paypal-form-div input[type="radio"]:not(.iawf-choice input) {
  position: absolute;
  opacity: 0;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  pointer-events: none;
}

/* Free-tier / non-form checkout pages still get the shell. */
.iawf-checkout__panel .wp-block-buttons {
  margin-top: 0.25rem;
}

.iawf-checkout__panel .wp-block-button__link {
  border-radius: 999px !important;
  background-image: var(--iawf-ck-gradient) !important;
  background-color: var(--iawf-ck-flame) !important;
  border: 0 !important;
  font-weight: 700;
  padding: 0.85rem 1.4rem !important;
}
