/* Summit Notes checkout modal — premium order form */

#sn-checkout-modal[hidden] { display: none !important; }

#sn-checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 20px;
}

.sn-checkout-backdrop {
  position: absolute;
  inset: 0;
  /* Heavier scrim so sales-page type never ghosts through the form */
  background:
    radial-gradient(ellipse at 30% 20%, rgba(212, 170, 79, 0.14), transparent 50%),
    rgba(4, 18, 28, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sn-checkout-dialog {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: min(980px, 100%);
  max-height: min(94vh, 900px);
  overflow: auto;
  color: #0b2739;
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(230, 194, 119, 0.28),
    0 28px 80px rgba(0, 0, 0, 0.45);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  background: #ffffff;
  background-color: #ffffff;
}

.sn-checkout-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(11, 39, 57, 0.12);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.92);
  color: #0b2739;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sn-checkout-close:hover {
  background: #fff;
  border-color: rgba(212, 170, 79, 0.55);
}

.sn-checkout-left {
  position: relative;
  background:
    linear-gradient(165deg, #0a2233 0%, #071f2f 48%, #051821 100%);
  color: #fff;
  padding: 40px 34px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  min-height: min-content;
}

.sn-checkout-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 0%, rgba(212, 170, 79, 0.18), transparent 55%);
  pointer-events: none;
}

.sn-checkout-left > * { position: relative; z-index: 1; }

.sn-checkout-brand {
  font-family: Antonio, "Antonio Fallback", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e6c277;
  font-weight: 600;
}

.sn-checkout-left img {
  width: 100%;
  max-width: 340px;
  height: auto;
  margin: 4px auto 0;
  display: block;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.45));
}

.sn-checkout-left h2 {
  margin: 0;
  font-family: Antonio, "Antonio Fallback", sans-serif;
  font-weight: 700;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sn-checkout-left p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.86);
  max-width: 34ch;
}

.sn-checkout-left .sn-price {
  margin-top: auto;
  padding-top: 8px;
  font-family: Antonio, "Antonio Fallback", sans-serif;
  font-size: 1.55rem;
  color: #e6c277;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sn-checkout-left .sn-price span {
  display: block;
  margin-top: 4px;
  font-family: Lato, "Lato Fallback", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.sn-checkout-right {
  position: relative;
  z-index: 1;
  isolation: isolate;
  padding: 40px 36px 32px;
  /* Solid base first so page copy never bleeds through the form */
  background-color: #ffffff;
  background-image: linear-gradient(180deg, #ffffff 0%, #f7f9fb 100%);
}

.sn-checkout-right h3 {
  margin: 0 0 6px;
  font-family: Antonio, "Antonio Fallback", sans-serif;
  font-size: 1.55rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0b2739;
}

.sn-checkout-kicker {
  margin: 0 0 20px;
  font-size: 0.86rem;
  color: #5a6b7c;
  line-height: 1.4;
}

.sn-checkout-form label:not(.sn-bump-label) {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: #3a4d5c;
}

.sn-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
  width: 100%;
}

.sn-field-row > * {
  min-width: 0;
  width: 100%;
}

.sn-field {
  margin-top: 12px;
  width: 100%;
}

.sn-checkout-form input[data-cf-element] {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  border: 1px solid #d5dde6;
  border-radius: 2px;
  padding: 11px 12px;
  font-size: 14px !important; /* px: CF page rem base is inflated */
  line-height: 1.35;
  background: #fff;
  color: #0b2739;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sn-checkout-form input[data-cf-element]:focus {
  outline: none;
  border-color: #c9a24a;
  box-shadow: 0 0 0 3px rgba(212, 170, 79, 0.22);
}

/* CF SDK payment / address mounts */
.sn-checkout-form [data-cf-element="payment-method"] {
  margin-top: 14px;
}

.sn-checkout-form [data-cf-element="shipping"],
.sn-checkout-form [data-cf-element="billing"] {
  margin-top: 16px;
}

/* SDK toggles hidden attr; force truly collapsed when hidden */
.sn-checkout-form [data-cf-element="shipping"][hidden],
.sn-checkout-form [data-cf-element="billing"][hidden] {
  display: none !important;
}

.sn-checkout-form {
  --cfsdk-checkout-border-color: #d5dde6;
  --cfsdk-checkout-border-radius: 2px;
  --cfsdk-checkout-font-size: 14px;
  --cfsdk-checkout-font-family: Lato, "Lato Fallback", system-ui, sans-serif;
  --cfsdk-checkout-focus-border-color: #c9a24a;
  --cfsdk-checkout-background: #ffffff;
  --cfsdk-checkout-color: #0b2739;
  --cfsdk-checkout-color-text: #0b2739;
  --cfsdk-checkout-color-border: #d5dde6;
  --cfsdk-checkout-color-background: #ffffff;
  --cfsdk-checkout-color-primary: #c9a24a;
  --cfsdk-checkout-color-placeholder: #8a9aab;
}

/* Shipping / billing address fields — match email & name inputs */
.sn-checkout-form .cf-sdk-address-form {
  display: grid;
  gap: 12px;
  width: 100%;
  position: relative;
  z-index: 2;
  padding: 14px;
  border: 1px solid #e4ebf1;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(11, 39, 57, 0.04);
}

.sn-checkout-form .cf-sdk-address-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  background: #ffffff;
}

.sn-checkout-form .cf-sdk-address-field {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
  background: #ffffff;
}

.sn-checkout-form .cf-sdk-address-field--address {
  z-index: 5; /* keep Places dropdown above neighboring fields */
}

.sn-checkout-form .cf-sdk-address-field--address,
.sn-checkout-form .cf-sdk-address-field--address_2 {
  grid-column: 1 / -1;
}

.sn-checkout-form .cf-sdk-address-field--city {
  grid-column: 1 / -1;
}

.sn-checkout-form .cf-sdk-address-field--state,
.sn-checkout-form .cf-sdk-address-field--zip {
  grid-column: auto;
}

.sn-checkout-form .cf-sdk-address-label {
  display: block;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: #3a4d5c;
  background: transparent;
}

.sn-checkout-form .cf-sdk-address-required {
  color: #916f25;
}

.sn-checkout-form .cf-sdk-address-input {
  display: block;
  position: relative;
  z-index: 1;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  border: 1px solid #d5dde6 !important;
  border-radius: 2px !important;
  padding: 11px 12px !important;
  min-height: 42px;
  font-size: 14px !important; /* px: CF page rem base is inflated */
  line-height: 1.35;
  font-family: inherit;
  background-color: #ffffff !important;
  background-image: none !important;
  color: #0b2739 !important;
  caret-color: #0b2739;
  opacity: 1 !important;
  -webkit-text-fill-color: #0b2739;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sn-checkout-form .cf-sdk-address-input::placeholder {
  color: #8a9aab !important;
  opacity: 1;
  -webkit-text-fill-color: #8a9aab;
}

.sn-checkout-form select.cf-sdk-address-input {
  background-color: #ffffff !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #5a6b7c 50%),
    linear-gradient(135deg, #5a6b7c 50%, transparent 50%) !important;
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px) !important;
  background-size: 5px 5px, 5px 5px !important;
  background-repeat: no-repeat !important;
  padding-right: 32px !important;
}

.sn-checkout-form .cf-sdk-address-input:disabled,
.sn-checkout-form .cf-sdk-address-input[readonly] {
  opacity: 1 !important;
  background-color: #f4f7fa !important;
  color: #3a4d5c !important;
  -webkit-text-fill-color: #3a4d5c;
  cursor: wait;
}

.sn-checkout-form .cf-sdk-address-input:focus {
  outline: none;
  border-color: #c9a24a !important;
  box-shadow: 0 0 0 3px rgba(212, 170, 79, 0.22);
  background-color: #ffffff !important;
}

.sn-checkout-form .cf-sdk-address-status,
.sn-checkout-form .cf-sdk-address-error:empty {
  display: none !important;
}

.sn-checkout-form .cf-sdk-address-error:not(:empty) {
  margin-top: 4px;
  font-size: 0.78rem;
  color: #8a1528;
}

/* Address autocomplete — solid panel so sales-page copy never shows through */
.sn-checkout-form .cf-places-dropdown,
.cf-places-dropdown {
  position: absolute !important;
  left: 0;
  right: 0;
  top: calc(100% - 2px);
  z-index: 50 !important;
  margin: 0;
  padding: 6px 0;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #d5dde6 !important;
  border-radius: 2px;
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #0b2739 !important;
  box-shadow: 0 14px 32px rgba(7, 31, 47, 0.18);
}

.sn-checkout-form .cf-places-dropdown[hidden],
.cf-places-dropdown[hidden] {
  display: none !important;
}

.sn-checkout-form .cf-places-dropdown [role="option"],
.cf-places-dropdown [role="option"],
.sn-checkout-form .cf-places-option,
.cf-places-option {
  display: block;
  padding: 10px 12px;
  font-size: 14px !important;
  line-height: 1.35;
  color: #0b2739 !important;
  background: #ffffff !important;
  cursor: pointer;
}

.sn-checkout-form .cf-places-dropdown [role="option"]:hover,
.sn-checkout-form .cf-places-dropdown [role="option"][aria-selected="true"],
.cf-places-dropdown [role="option"]:hover,
.cf-places-dropdown [role="option"][aria-selected="true"],
.sn-checkout-form .cf-places-option:hover,
.cf-places-option:hover {
  background: #f7f4ec !important;
  color: #0b2739 !important;
}

.sn-checkout-form .cf-places-status,
.cf-places-status {
  /* Keep SR-only; never paint live status over the input */
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  background: transparent !important;
  color: transparent !important;
}

/* Card layout: number full-width, exp + CVV half-and-half */
.sn-checkout-form [data-cf-element="payment-method"] {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.sn-checkout-form [data-cf-element="payment-method"] .cf-sdk-card-number {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.sn-checkout-form [data-cf-element="payment-method"] .cf-sdk-card-expiration,
.sn-checkout-form [data-cf-element="payment-method"] .cf-sdk-card-cvv {
  grid-column: auto;
  min-width: 0;
}

.sn-checkout-form [data-cf-element="payment-method"] .cf-sdk-card-field {
  margin: 0;
}

.sn-checkout-form [data-cf-element="payment-method"] .rebilly-framepay.rebilly-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 4px 12px;
  border: 1px solid #d5dde6;
  border-radius: 2px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sn-checkout-form [data-cf-element="payment-method"] .rebilly-framepay.rebilly-input:focus-within {
  border-color: #c9a24a;
  box-shadow: 0 0 0 3px rgba(212, 170, 79, 0.22);
}

.sn-checkout-form [data-cf-element="payment-method"] .rebilly-framepay.rebilly-input iframe {
  display: block;
  width: 100% !important;
  min-height: 40px;
  height: 40px !important;
}

#sn-bump {
  margin: 18px 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
}

#sn-bump[hidden] {
  display: none !important;
}

#sn-bump.sn-bump-enter {
  animation: sn-bump-pop 0.45s ease-out both;
}

@keyframes sn-bump-pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sn-bump-card {
  display: block;
  border: 1px solid #e6c277;
  border-radius: 2px;
  background:
    linear-gradient(135deg, #fffdf7 0%, #fff8e8 55%, #fff 100%);
  box-shadow: 0 10px 28px rgba(145, 111, 37, 0.12);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.sn-bump-card:hover,
.sn-bump-card.is-selected {
  border-color: #c9a24a;
  box-shadow: 0 14px 34px rgba(145, 111, 37, 0.2);
}

.sn-bump-label {
  display: grid;
  grid-template-columns: 18px minmax(120px, 168px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 14px 14px 12px;
  font-size: 0.92rem;
  line-height: 1.35;
  cursor: pointer;
  margin: 0;
}

.sn-bump-label input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #c9a24a;
  flex-shrink: 0;
}

.sn-bump-thumb {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: contain;
  object-position: center;
  border-radius: 2px;
  background: #071f2f;
  box-shadow: 0 6px 16px rgba(7, 31, 47, 0.25);
}

.sn-bump-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sn-bump-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #916f25;
}

.sn-bump-title {
  font-family: Antonio, "Antonio Fallback", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #0b2739;
  line-height: 1.15;
}

.sn-bump-desc {
  margin: 0;
  font-size: 0.82rem;
  color: #5a6b7c;
  line-height: 1.35;
}

.sn-bump-price {
  margin-top: 4px;
  font-family: Antonio, "Antonio Fallback", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #916f25;
}

.sn-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 18px 0 12px;
  padding-top: 14px;
  border-top: 1px solid #e4ebf1;
  font-family: Antonio, "Antonio Fallback", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sn-total-row #sn-total {
  color: #0b2739;
  font-size: 1.35rem;
}

#checkout-errors {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 2px;
  border: 1px solid #f0c4cb;
  background: #fdf2f4;
  color: #8a1528;
  font-size: 0.9rem;
}

.sn-pay {
  width: 100%;
  border: 0;
  border-radius: 2px;
  padding: 17px 18px;
  font-family: Antonio, "Antonio Fallback", sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(90deg, #8a681f 0%, #d4aa4f 55%, #e6c277 100%);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(145, 111, 37, 0.32);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.sn-pay:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.sn-pay:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.sn-secure {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a8a99;
}

@media (max-width: 820px) {
  #sn-checkout-modal {
    padding: 0;
    place-items: stretch;
  }

  .sn-checkout-dialog {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    width: 100%;
    height: auto;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sn-checkout-close {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.96);
  }

  .sn-checkout-left {
    flex: 0 0 auto;
    padding: 22px 20px 18px;
    gap: 10px;
    overflow: visible;
    min-height: 0;
  }

  .sn-checkout-left img {
    max-width: 180px;
    margin-top: 0;
  }

  .sn-checkout-left h2 {
    font-size: 1.35rem;
  }

  .sn-checkout-left p {
    max-width: none;
    font-size: 0.9rem;
  }

  .sn-checkout-left .sn-price {
    margin-top: 4px;
    padding-top: 0;
    font-size: 1.35rem;
  }

  .sn-checkout-right {
    flex: 1 0 auto;
    padding: 22px 18px 28px;
  }

  .sn-checkout-right h3 {
    font-size: 1.35rem;
    padding-right: 44px;
  }

  .sn-checkout-kicker {
    margin-bottom: 14px;
    font-size: 0.84rem;
  }

  /* First / last name stack full-width on single-column modal */
  .sn-field-row {
    grid-template-columns: 1fr !important;
    gap: 12px;
    width: 100%;
  }

  .sn-field-row > * {
    width: 100% !important;
    max-width: 100% !important;
  }

  .sn-field,
  .sn-field-row {
    margin-top: 12px;
  }

  .sn-checkout-form input[data-cf-element],
  .sn-checkout-form .cf-sdk-address-input {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 12px !important;
    font-size: 16px !important; /* prevent iOS zoom */
    min-height: 46px;
  }

  .sn-checkout-form .cf-sdk-address-body {
    grid-template-columns: 1fr;
  }

  .sn-checkout-form .cf-sdk-address-field--state,
  .sn-checkout-form .cf-sdk-address-field--zip {
    grid-column: 1 / -1;
  }

  .sn-checkout-form [data-cf-element="payment-method"] {
    gap: 14px 12px !important;
    width: 100%;
    margin-top: 16px;
  }

  .sn-checkout-form [data-cf-element="payment-method"] .cf-sdk-card-field {
    width: 100%;
    min-width: 0;
  }

  .sn-checkout-form [data-cf-element="payment-method"] .cf-sdk-card-number {
    margin-bottom: 0;
  }

  .sn-checkout-form [data-cf-element="payment-method"] .rebilly-framepay.rebilly-input {
    min-height: 50px;
    width: 100% !important;
  }

  #sn-bump {
    margin: 18px 0 0;
  }

  /* Bump: checkbox + copy on top, product image below with padding */
  .sn-bump-label {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    grid-template-areas:
      "check copy"
      "thumb thumb";
    gap: 12px;
    align-items: start;
    padding: 14px;
  }

  .sn-bump-label input {
    grid-area: check;
    width: 20px;
    height: 20px;
    margin-top: 2px;
  }

  .sn-bump-thumb {
    grid-area: thumb;
    width: 100%;
    max-width: none;
    margin: 0;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 2px;
  }

  .sn-bump-copy {
    grid-area: copy;
    gap: 3px;
  }

  .sn-bump-title {
    font-size: 1rem;
  }

  .sn-bump-desc {
    font-size: 0.8rem;
  }

  .sn-bump-price {
    font-size: 1.1rem;
  }

  .sn-total-row {
    margin-top: 16px;
    font-size: 1.1rem;
  }

  .sn-pay {
    padding: 16px 16px;
    font-size: 1.08rem;
  }
}

@media (max-width: 420px) {
  .sn-checkout-left {
    padding: 18px 16px 14px;
  }

  .sn-checkout-left img {
    max-width: 150px;
  }

  .sn-checkout-right {
    padding: 18px 14px 24px;
  }

  .sn-bump-label {
    padding: 12px;
    gap: 8px 10px;
  }

  /* Keep exp + CVV side-by-side even on narrow phones */
  .sn-checkout-form [data-cf-element="payment-method"] {
    gap: 10px;
  }
}
