/* ==========================================================================
   No Recoil Isolated Checkout – scoped stylesheet
   --------------------------------------------------------------------------
   Root selector is the ID #nrec-checkout (ID-level specificity), so a theme
   rule such as `.woocommerce form .form-row input { background:#fff!important }`
   can never win. Every selector is scoped; nothing leaks to other pages.
   Colours are explicit + color-scheme:dark, so a theme light-mode class
   (body.nr-light) has no effect either.
   ========================================================================== */

/* ---------- 1. Design tokens (overridden by inline CSS from settings) ---- */
#nrec-checkout,
.nrec-shell,
body.nrec-body,
body.nrec-checkout-page {
  --nrec-primary: #ff7a00;
  --nrec-primary-rgb: 255, 122, 0;
  --nrec-primary-hover: #ff8c12;
  --nrec-primary-active: #e96400;
  --nrec-bg: #0b0b0d;
  --nrec-card: #141417;
  --nrec-card-2: #1d1d20;
  --nrec-text: #f4f4f5;
  --nrec-muted: #9ca3af;
  --nrec-border: #26262b;
  --nrec-input-bg: #0f0f12;
  --nrec-radius: 12px;
  --nrec-fs: 15px;
  --nrec-max: 1200px;
  --nrec-font: Vazirmatn, "Segoe UI", Tahoma, Arial, sans-serif;
  --nrec-error: #f87171;
  --nrec-success: #34d399;
  --nrec-info: #60a5fa;
  --nrec-shadow: 0 14px 34px -22px rgba(0, 0, 0, 0.9);
  --nrec-radius-sm: calc(var(--nrec-radius) - 3px);
}

/* ---------- 2. Full-page shell ------------------------------------------- */
html.nrec-html {
  background: #0b0b0d;
}

body.nrec-body {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
  background: var(--nrec-bg) !important;
  color: var(--nrec-text);
  color-scheme: dark;
  overflow-x: hidden;
}

.nrec-shell {
  all: initial;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  box-sizing: border-box;
  background: var(--nrec-bg);
  color: var(--nrec-text);
  color-scheme: dark;
  font-family: var(--nrec-font);
  font-size: var(--nrec-fs);
  line-height: 1.7;
  text-align: start;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body.admin-bar .nrec-shell {
  min-height: calc(100vh - 32px);
}

.nrec-shell.nrec-rtl { direction: rtl; }
.nrec-shell.nrec-ltr { direction: ltr; }

.nrec-shell *,
.nrec-shell *::before,
.nrec-shell *::after {
  box-sizing: border-box;
}

.nrec-shell__header {
  width: 100%;
  max-width: var(--nrec-max);
  margin: 0 auto;
  padding: 20px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nrec-shell__back,
.nrec-shell__secure {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92em;
  color: var(--nrec-muted);
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nrec-shell__back:hover {
  color: var(--nrec-primary);
}

.nrec-ltr .nrec-shell__icon--arrow {
  transform: scaleX(-1);
}

.nrec-shell__secure {
  padding: 7px 14px;
  border: 1px solid var(--nrec-border);
  border-radius: 999px;
  background: var(--nrec-card);
  color: var(--nrec-muted);
}

.nrec-shell__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.nrec-shell__brand a,
.nrec-shell__name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--nrec-text);
  font-weight: 800;
  font-size: 1.15em;
  text-decoration: none;
  line-height: 1;
}

.nrec-shell__brand img {
  display: block;
  max-height: 44px;
  width: auto;
  height: auto;
}

.nrec-shell__mark {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: var(--nrec-primary);
  transform: rotate(45deg);
  box-shadow: 0 0 0 3px rgba(var(--nrec-primary-rgb), 0.18);
}

.nrec-steps {
  list-style: none;
  width: 100%;
  max-width: var(--nrec-max);
  margin: 4px auto 22px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nrec-steps__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.9em;
  color: var(--nrec-muted);
}

.nrec-steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--nrec-border);
  background: var(--nrec-card);
  font-size: 0.82em;
  font-weight: 700;
  line-height: 1;
}

.nrec-steps__item.is-done .nrec-steps__num {
  color: var(--nrec-primary);
  border-color: rgba(var(--nrec-primary-rgb), 0.55);
  background: rgba(var(--nrec-primary-rgb), 0.12);
}

.nrec-steps__item.is-current {
  color: var(--nrec-text);
  font-weight: 700;
}

.nrec-steps__item.is-current .nrec-steps__num {
  color: #fff;
  border-color: var(--nrec-primary);
  background: var(--nrec-primary);
  box-shadow: 0 0 0 4px rgba(var(--nrec-primary-rgb), 0.18);
}

.nrec-steps__sep {
  width: 34px;
  height: 1px;
  background: var(--nrec-border);
}

.nrec-shell__main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--nrec-max);
  margin: 0 auto;
  padding: 0 20px 48px;
  overflow-x: clip;
}

.nrec-shell__footer {
  border-top: 1px solid var(--nrec-border);
  padding: 22px 20px 26px;
  text-align: center;
  color: var(--nrec-muted);
  font-size: 0.88em;
}

.nrec-shell__badges {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.nrec-shell__badges li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nrec-shell__badges li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--nrec-primary);
  box-shadow: 0 0 0 3px rgba(var(--nrec-primary-rgb), 0.18);
}

.nrec-shell__copy {
  margin: 0;
}

/* ---------- 3. Isolation root -------------------------------------------- */
#nrec-checkout {
  all: initial;
  display: block !important;
  box-sizing: border-box;
  position: relative;
  width: 100% !important;
  max-width: var(--nrec-max) !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 0;
  flex: 1 1 100%;
  color: var(--nrec-text) !important;
  color-scheme: dark;
  font-family: var(--nrec-font) !important;
  font-size: var(--nrec-fs) !important;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0;
  text-align: start;
  text-transform: none;
  overflow-x: clip;
  container-type: inline-size;
  container-name: nrec;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

#nrec-checkout.nrec-rtl { direction: rtl !important; }
#nrec-checkout.nrec-ltr { direction: ltr !important; }

#nrec-checkout.nrec-checkout--embedded {
  padding: 24px 0 40px;
}

#nrec-checkout *,
#nrec-checkout *::before,
#nrec-checkout *::after {
  box-sizing: border-box;
}

/* Structural WooCommerce wrappers: strip every theme layout rule (float, width, borders …) */
#nrec-checkout :is(.woocommerce, .checkout, .woocommerce-checkout, .col2-set, .col-1, .col-2,
  .woocommerce-checkout-review-order, .woocommerce-checkout-payment, .woocommerce-billing-fields,
  .woocommerce-shipping-fields, .woocommerce-additional-fields, .woocommerce-account-fields,
  .woocommerce-notices-wrapper, .woocommerce-NoticeGroup, .nrec-layout, .nrec-main, .nrec-side,
  .nrec-card, .nrec-customer, .nrec-summary, .nrec-payment),
#nrec-checkout #order_review,
#nrec-checkout #payment {
  float: none !important;
  clear: both !important;
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  flex: none !important;
  grid-area: auto !important;
  columns: auto !important;
  overflow: visible !important;
  text-align: start !important;
  color: inherit;
}

#nrec-checkout :is(.col2-set, .woocommerce-checkout)::before,
#nrec-checkout :is(.col2-set, .woocommerce-checkout)::after {
  display: none !important;
  content: none !important;
}

#nrec-checkout a {
  color: var(--nrec-primary);
  text-decoration: none;
  background: transparent;
  transition: color 0.15s ease;
}

#nrec-checkout a:hover {
  color: var(--nrec-primary-hover);
  text-decoration: underline;
}

#nrec-checkout p {
  margin: 0 0 12px;
  padding: 0;
}

#nrec-checkout img {
  max-width: 100%;
  height: auto;
  border: 0;
}

#nrec-checkout strong {
  font-weight: 700;
}

#nrec-checkout .clear {
  clear: both;
}

#nrec-checkout .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- 4. Layout ------------------------------------------------------ */
#nrec-checkout .nrec-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 410px) !important;
  gap: 24px !important;
  align-items: start !important;
  width: 100% !important;
}

#nrec-checkout .nrec-layout--one {
  grid-template-columns: minmax(0, 1fr) !important;
  max-width: 800px !important;
  margin: 0 auto !important;
}

#nrec-checkout .nrec-main {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  min-width: 0 !important;
}

#nrec-checkout .nrec-side {
  position: sticky !important;
  top: 24px !important;
  min-width: 0 !important;
}

body.admin-bar #nrec-checkout .nrec-side {
  top: 56px !important;
}

#nrec-checkout .nrec-layout--one .nrec-side {
  position: static !important;
}

#nrec-checkout .nrec-card {
  display: block !important;
  background: var(--nrec-card) !important;
  border: 1px solid var(--nrec-border) !important;
  border-radius: var(--nrec-radius) !important;
  padding: 24px !important;
  box-shadow: var(--nrec-shadow) !important;
  color: var(--nrec-text) !important;
}

#nrec-checkout .nrec-card--message {
  text-align: center !important;
  color: var(--nrec-muted) !important;
}

/* Card titles (ours + WooCommerce h3s inside) */
#nrec-checkout :is(.nrec-card__title, h3, .woocommerce-order-details__title, .woocommerce-column__title,
  .wc-bacs-bank-details-heading, .woocommerce-order-downloads__title) {
  display: block !important;
  position: relative !important;
  float: none !important;
  width: auto !important;
  margin: 0 0 20px !important;
  padding: 0 0 12px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--nrec-border) !important;
  background: transparent !important;
  color: var(--nrec-text) !important;
  font-family: inherit !important;
  font-size: 1.12em !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-align: start !important;
}

#nrec-checkout :is(.nrec-card__title, h3, .woocommerce-order-details__title, .woocommerce-column__title,
  .wc-bacs-bank-details-heading, .woocommerce-order-downloads__title)::before {
  display: none !important;
  content: none !important;
}

#nrec-checkout :is(.nrec-card__title, h3, .woocommerce-order-details__title, .woocommerce-column__title,
  .wc-bacs-bank-details-heading, .woocommerce-order-downloads__title)::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  bottom: -1px !important;
  inset-inline-start: 0 !important;
  width: 52px !important;
  height: 2px !important;
  border-radius: 2px !important;
  background: var(--nrec-primary) !important;
}

#nrec-checkout .woocommerce-shipping-fields,
#nrec-checkout .woocommerce-additional-fields {
  margin-top: 10px !important;
}

#nrec-checkout .woocommerce-additional-fields > h3,
#nrec-checkout .shipping_address > h3 {
  margin-top: 26px !important;
}

/* ---------- 5. Form fields ------------------------------------------------ */
#nrec-checkout :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper,
  .woocommerce-additional-fields__field-wrapper, .woocommerce-account-fields) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

#nrec-checkout .form-row {
  display: block !important;
  position: relative !important;
  grid-column: 1 / -1;
  float: none !important;
  clear: none !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  overflow: visible !important;
  opacity: 1 !important;
  transform: none !important;
}

#nrec-checkout .form-row::before,
#nrec-checkout .form-row::after {
  display: none !important;
  content: none !important;
}

#nrec-checkout :is(.form-row-first, .form-row-last) {
  grid-column: span 1;
}

#nrec-checkout .create-account .form-row {
  margin-bottom: 14px !important;
}

#nrec-checkout .form-row > label,
#nrec-checkout label.nrec-label {
  display: block !important;
  position: static !important;
  float: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 0 7px !important;
  padding: 0 !important;
  background: transparent !important;
  color: var(--nrec-muted) !important;
  font-family: inherit !important;
  font-size: 0.9em !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  letter-spacing: 0 !important;
  text-align: start !important;
  text-transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
  cursor: default;
}

#nrec-checkout .form-row label :is(.required, abbr.required) {
  color: var(--nrec-primary) !important;
  text-decoration: none !important;
  border: 0 !important;
  margin-inline-start: 2px;
  font-weight: 700;
  visibility: visible !important;
}

#nrec-checkout .form-row label .optional {
  color: var(--nrec-muted) !important;
  font-size: 0.82em;
  font-weight: 400 !important;
  opacity: 0.75;
}

#nrec-checkout .woocommerce-input-wrapper {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#nrec-checkout .form-row .description {
  display: block;
  margin-top: 6px;
  color: var(--nrec-muted);
  font-size: 0.82em;
  line-height: 1.6;
}

/* Text-like controls: WooCommerce fields, gateway fields, coupon / login forms */
#nrec-checkout :is(.form-row input.input-text, .form-row textarea, .form-row select,
  input.nrec-input, textarea.nrec-input, select.nrec-input, .nrec-coupon__input,
  form.checkout_coupon input.input-text, form.woocommerce-form-login input.input-text,
  .payment_box input[type="text"], .payment_box input[type="tel"], .payment_box input[type="number"],
  .payment_box input[type="email"], .payment_box input[type="password"], .payment_box select, .payment_box textarea) {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  display: block !important;
  position: static !important;
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 11px 14px !important;
  background-color: var(--nrec-input-bg) !important;
  color: var(--nrec-text) !important;
  border: 1px solid var(--nrec-border) !important;
  border-radius: var(--nrec-radius-sm) !important;
  box-shadow: none !important;
  outline: none !important;
  font-family: inherit !important;
  font-size: var(--nrec-fs) !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  letter-spacing: 0 !important;
  text-align: start;
  text-indent: 0 !important;
  text-transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#nrec-checkout :is(.form-row input.input-text, .form-row textarea, input.nrec-input, textarea.nrec-input,
  .nrec-coupon__input, form.checkout_coupon input.input-text, form.woocommerce-form-login input.input-text,
  .payment_box input[type="text"], .payment_box input[type="tel"], .payment_box input[type="number"],
  .payment_box input[type="email"], .payment_box input[type="password"], .payment_box textarea) {
  background-image: none !important;
}

#nrec-checkout :is(.form-row textarea, textarea.nrec-input, .payment_box textarea) {
  min-height: 118px !important;
  line-height: 1.65 !important;
  resize: vertical;
}

#nrec-checkout :is(input[type="email"].input-text, input[type="tel"].input-text, input[type="number"].input-text,
  input#billing_postcode, input#shipping_postcode, .nrec-coupon__input) {
  unicode-bidi: plaintext;
  text-align: start;
}

#nrec-checkout :is(.form-row select, select.nrec-input, .payment_box select) {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-size: 16px 16px !important;
  background-position: left 14px center !important;
  padding-inline-end: 14px !important;
  padding-inline-start: 40px !important;
  cursor: pointer;
}

#nrec-checkout.nrec-ltr :is(.form-row select, select.nrec-input, .payment_box select) {
  background-position: right 14px center !important;
}

/* Native selects replaced by selectWoo must stay hidden (select2's own rule has lower specificity) */
#nrec-checkout select.select2-hidden-accessible.select2-hidden-accessible {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  min-width: 0 !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  opacity: 0 !important;
}

#nrec-checkout select option {
  background: var(--nrec-card);
  color: var(--nrec-text);
}

#nrec-checkout *::placeholder {
  color: var(--nrec-muted) !important;
  opacity: 0.7 !important;
}

#nrec-checkout :is(.form-row input.input-text, .form-row textarea, .form-row select,
  input.nrec-input, textarea.nrec-input, select.nrec-input, .nrec-coupon__input,
  form.checkout_coupon input.input-text, form.woocommerce-form-login input.input-text,
  .payment_box input[type="text"], .payment_box input[type="tel"], .payment_box input[type="number"],
  .payment_box input[type="email"], .payment_box input[type="password"], .payment_box select, .payment_box textarea):focus {
  border-color: var(--nrec-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--nrec-primary-rgb), 0.18) !important;
  outline: none !important;
}

#nrec-checkout .form-row.woocommerce-invalid :is(input.input-text, select, textarea),
#nrec-checkout .form-row.woocommerce-invalid .select2-container--default .select2-selection--single {
  border-color: var(--nrec-error) !important;
}

#nrec-checkout .form-row.woocommerce-validated :is(input.input-text, select, textarea),
#nrec-checkout .form-row.woocommerce-validated .select2-container--default .select2-selection--single {
  border-color: rgba(52, 211, 153, 0.55) !important;
}

#nrec-checkout .form-row.woocommerce-invalid > label {
  color: var(--nrec-error) !important;
}

#nrec-checkout input:-webkit-autofill,
#nrec-checkout input:-webkit-autofill:hover,
#nrec-checkout input:-webkit-autofill:focus,
#nrec-checkout textarea:-webkit-autofill,
#nrec-checkout select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--nrec-input-bg) inset !important;
  -webkit-text-fill-color: var(--nrec-text) !important;
  caret-color: var(--nrec-text);
  border-color: var(--nrec-border) !important;
  transition: background-color 9999s ease-out 0s;
}

/* Checkboxes & radios (kill theme custom-checkbox tricks) */
#nrec-checkout input[type="checkbox"],
#nrec-checkout input[type="radio"] {
  -webkit-appearance: auto !important;
  appearance: auto !important;
  accent-color: var(--nrec-primary);
  display: inline-block !important;
  position: static !important;
  width: 18px !important;
  height: 18px !important;
  min-height: 0 !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  clip: auto !important;
  clip-path: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  flex: none;
  cursor: pointer;
  vertical-align: middle;
}

#nrec-checkout :is(label.checkbox, label.woocommerce-form__label-for-checkbox) {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  position: static !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--nrec-text) !important;
  font-size: 0.95em !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  cursor: pointer;
}

#nrec-checkout :is(label.checkbox, label.woocommerce-form__label-for-checkbox) :is(span, input)::before,
#nrec-checkout :is(label.checkbox, label.woocommerce-form__label-for-checkbox) :is(span, input)::after {
  display: none !important;
  content: none !important;
}

#nrec-checkout :is(label.checkbox, label.woocommerce-form__label-for-checkbox) > span {
  flex: 1 1 auto;
  padding: 0 !important;
  margin: 0 !important;
}

#nrec-checkout h3#ship-to-different-address {
  margin: 22px 0 14px !important;
  padding: 14px 16px !important;
  border: 1px solid var(--nrec-border) !important;
  border-radius: var(--nrec-radius-sm) !important;
  background: var(--nrec-card-2) !important;
  font-size: 1em !important;
}

#nrec-checkout h3#ship-to-different-address::after {
  display: none !important;
  content: none !important;
}

#nrec-checkout .woocommerce-account-fields {
  margin-top: 16px !important;
}

#nrec-checkout .woocommerce-account-fields .form-row,
#nrec-checkout .create-account .form-row {
  grid-column: 1 / -1;
}

/* WooCommerce default coupon / login toggles above the layout */
#nrec-checkout .woocommerce-form-login-toggle,
#nrec-checkout .woocommerce-form-coupon-toggle {
  margin: 0 0 16px !important;
}

#nrec-checkout form.woocommerce-form-login,
#nrec-checkout form.checkout_coupon {
  width: auto !important;
  margin: 0 0 18px !important;
  padding: 18px 20px !important;
  border: 1px solid var(--nrec-border) !important;
  border-radius: var(--nrec-radius) !important;
  background: var(--nrec-card) !important;
}

#nrec-checkout form.woocommerce-form-login p:first-child,
#nrec-checkout form.checkout_coupon p:first-child {
  color: var(--nrec-muted);
  font-size: 0.92em;
}

#nrec-checkout form.woocommerce-form-login .form-row {
  margin: 0 0 12px !important;
}

#nrec-checkout form.checkout_coupon .form-row-first {
  display: inline-block !important;
  width: calc(100% - 160px) !important;
  vertical-align: middle;
}

#nrec-checkout form.checkout_coupon .form-row-last {
  display: inline-block !important;
  width: 150px !important;
  margin-inline-start: 6px !important;
  vertical-align: middle;
}

#nrec-checkout .woocommerce-privacy-policy-text p,
#nrec-checkout .lost_password {
  font-size: 0.85em;
  color: var(--nrec-muted);
}

/* ---------- 6. Buttons ----------------------------------------------------- */
#nrec-checkout :is(.button, button.button, input.button, a.button, .nrec-coupon__btn) {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: static !important;
  min-height: 48px;
  height: auto !important;
  margin: 0 !important;
  padding: 10px 18px !important;
  background: var(--nrec-card-2) !important;
  background-image: none !important;
  color: var(--nrec-text) !important;
  border: 1px solid var(--nrec-border) !important;
  border-radius: var(--nrec-radius-sm) !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-size: 0.95em !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  text-transform: none !important;
  text-shadow: none !important;
  white-space: nowrap;
  cursor: pointer;
  float: none !important;
  opacity: 1;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

#nrec-checkout :is(.button, button.button, input.button, a.button, .nrec-coupon__btn):hover {
  border-color: var(--nrec-primary) !important;
  color: var(--nrec-primary) !important;
  background: var(--nrec-card-2) !important;
}

#nrec-checkout :is(.button, button.button, .nrec-coupon__btn):focus-visible {
  outline: 2px solid var(--nrec-primary) !important;
  outline-offset: 2px;
}

#nrec-checkout :is(.button, button.button, .nrec-coupon__btn):disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Primary: place order (ID inside ID – nothing beats it) */
#nrec-checkout #place_order {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px;
  position: relative !important;
  width: 100% !important;
  min-height: 56px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 14px 22px !important;
  background: var(--nrec-primary) !important;
  background-image: none !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: var(--nrec-radius) !important;
  box-shadow: 0 14px 30px -14px rgba(var(--nrec-primary-rgb), 0.75) !important;
  font-family: inherit !important;
  font-size: 1.06em !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  text-transform: none !important;
  text-shadow: none !important;
  cursor: pointer;
  float: none !important;
  overflow: hidden;
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

#nrec-checkout #place_order:hover {
  background: var(--nrec-primary-hover) !important;
  color: #fff !important;
  box-shadow: 0 16px 34px -14px rgba(var(--nrec-primary-rgb), 0.85) !important;
}

#nrec-checkout #place_order:active {
  background: var(--nrec-primary-active) !important;
  transform: translateY(1px);
}

#nrec-checkout #place_order:focus-visible {
  outline: 2px solid var(--nrec-text) !important;
  outline-offset: 3px;
}

#nrec-checkout #place_order:disabled,
#nrec-checkout #place_order.nrec-loading {
  cursor: progress;
  opacity: 0.88 !important;
  transform: none;
}

#nrec-checkout #place_order.nrec-loading::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: nrec-spin 0.8s linear infinite;
}

@keyframes nrec-spin {
  to { transform: rotate(360deg); }
}

/* ---------- 7. Payment methods -------------------------------------------- */
#nrec-checkout ul.wc_payment_methods,
#nrec-checkout ul.payment_methods {
  list-style: none !important;
  display: grid !important;
  gap: 10px !important;
  width: auto !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

#nrec-checkout li.wc_payment_method,
#nrec-checkout ul.payment_methods > li {
  position: relative !important;
  list-style: none !important;
  display: block !important;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--nrec-border) !important;
  border-radius: var(--nrec-radius-sm) !important;
  background: var(--nrec-card-2) !important;
  box-shadow: none !important;
  overflow: hidden !important;
  text-indent: 0 !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#nrec-checkout li.wc_payment_method::before,
#nrec-checkout li.wc_payment_method::after {
  display: none !important;
  content: none !important;
}

#nrec-checkout li.wc_payment_method.nrec-selected {
  border-color: var(--nrec-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--nrec-primary-rgb), 0.15) !important;
}

#nrec-checkout li.wc_payment_method:has(> input[name="payment_method"]:checked) {
  border-color: var(--nrec-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--nrec-primary-rgb), 0.15) !important;
}

#nrec-checkout li.wc_payment_method > label {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap;
  gap: 12px;
  position: relative !important;
  width: auto !important;
  margin: 0 !important;
  padding: 14px 16px !important;
  padding-inline-start: 46px !important;
  background: transparent !important;
  color: var(--nrec-text) !important;
  font-family: inherit !important;
  font-size: 1em !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  text-align: start !important;
  cursor: pointer;
}

#nrec-checkout li.wc_payment_method > label::after {
  display: none !important;
  content: none !important;
}

/* Native radio (fallback for browsers without :has) */
#nrec-checkout li.wc_payment_method > input[name="payment_method"] {
  position: absolute !important;
  inset-inline-start: 16px !important;
  top: 50% !important;
  margin: -9px 0 0 !important;
  z-index: 1;
}

/* Modern browsers: hide the native radio and draw our own indicator */
#nrec-checkout li.wc_payment_method:has(> input[name="payment_method"] + label) > input[name="payment_method"] {
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  pointer-events: none !important;
}

#nrec-checkout li.wc_payment_method:has(> input[name="payment_method"] + label) > label::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset-inline-start: 16px !important;
  top: 50% !important;
  width: 20px !important;
  height: 20px !important;
  margin-top: -10px !important;
  border-radius: 50% !important;
  border: 2px solid var(--nrec-border) !important;
  background: var(--nrec-input-bg) !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#nrec-checkout li.wc_payment_method:has(> input[name="payment_method"]:checked + label) > label::before {
  border-color: var(--nrec-primary) !important;
  box-shadow: inset 0 0 0 5px var(--nrec-primary) !important;
}

#nrec-checkout li.wc_payment_method > input[name="payment_method"]:focus-visible + label {
  outline: 2px solid var(--nrec-primary) !important;
  outline-offset: -2px;
}

#nrec-checkout li.wc_payment_method > label img {
  display: inline-block !important;
  max-height: 28px !important;
  max-width: 120px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain;
  vertical-align: middle;
  float: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#nrec-checkout li.wc_payment_method > label img:first-of-type {
  margin-inline-start: auto !important;
}

#nrec-checkout li.wc_payment_method > label img + img {
  margin-inline-start: 6px !important;
}

#nrec-checkout li.wc_payment_method > label a.about_paypal {
  font-size: 0.8em;
  font-weight: 400;
}

#nrec-checkout div.payment_box {
  position: static !important;
  width: auto !important;
  margin: 0 !important;
  padding: 12px 16px 16px !important;
  border: 0 !important;
  border-top: 1px solid var(--nrec-border) !important;
  border-radius: 0 !important;
  background: rgba(255, 255, 255, 0.025) !important;
  color: var(--nrec-muted) !important;
  font-size: 0.92em !important;
  line-height: 1.75 !important;
  text-align: start !important;
}

#nrec-checkout div.payment_box::before,
#nrec-checkout div.payment_box::after {
  display: none !important;
  content: none !important;
}

#nrec-checkout div.payment_box p {
  margin: 0 0 8px !important;
  color: inherit !important;
}

#nrec-checkout div.payment_box p:last-child {
  margin-bottom: 0 !important;
}

#nrec-checkout div.payment_box fieldset {
  margin: 8px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

#nrec-checkout div.payment_box label {
  display: block;
  margin: 0 0 6px;
  color: var(--nrec-muted);
  font-size: 0.92em;
}

#nrec-checkout div.payment_box .form-row {
  margin: 0 0 10px !important;
}

#nrec-checkout ul.wc_payment_methods > li > :is(.woocommerce-notice, .woocommerce-info, .woocommerce-error) {
  margin: 0 !important;
}

#nrec-checkout ul.wc_payment_methods > li:has(> :is(.woocommerce-notice, .woocommerce-info, .woocommerce-error)) {
  border: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

#nrec-checkout .place-order,
#nrec-checkout .form-row.place-order {
  display: block !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

#nrec-checkout .woocommerce-terms-and-conditions-wrapper {
  margin: 0 0 16px !important;
}

#nrec-checkout .woocommerce-terms-and-conditions-wrapper .form-row {
  margin: 0 0 10px !important;
}

#nrec-checkout .woocommerce-terms-and-conditions {
  margin: 0 0 12px !important;
  padding: 14px 16px !important;
  max-height: 220px;
  overflow: auto !important;
  border: 1px solid var(--nrec-border) !important;
  border-radius: var(--nrec-radius-sm) !important;
  background: var(--nrec-card-2) !important;
  color: var(--nrec-muted) !important;
  font-size: 0.88em;
}

#nrec-checkout .woocommerce-terms-and-conditions-checkbox-text {
  font-weight: 500;
}

#nrec-checkout .woocommerce-terms-and-conditions-link {
  color: var(--nrec-primary) !important;
  text-decoration: underline;
}

#nrec-checkout .nrec-summary #payment {
  margin-top: 20px !important;
  padding-top: 20px !important;
  border-top: 1px solid var(--nrec-border) !important;
}

/* ---------- 8. Order review table ----------------------------------------- */
#nrec-checkout table.woocommerce-checkout-review-order-table {
  display: table !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  border-radius: 0 !important;
  table-layout: fixed !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.95em !important;
  color: var(--nrec-text) !important;
}

#nrec-checkout table.woocommerce-checkout-review-order-table thead {
  display: none !important;
}

#nrec-checkout table.woocommerce-checkout-review-order-table :is(tbody, tfoot) {
  display: table-row-group !important;
  width: auto !important;
}

#nrec-checkout table.woocommerce-checkout-review-order-table tr {
  display: table-row !important;
  background: transparent !important;
}

#nrec-checkout table.woocommerce-checkout-review-order-table :is(th, td) {
  display: table-cell !important;
  padding: 12px 0 !important;
  border: 0 !important;
  border-bottom: 1px dashed var(--nrec-border) !important;
  background: transparent !important;
  color: var(--nrec-text) !important;
  font-family: inherit !important;
  font-size: 1em !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
  letter-spacing: 0 !important;
  text-align: start !important;
  vertical-align: middle !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  hyphens: manual !important;
  writing-mode: horizontal-tb !important;
}

#nrec-checkout table.woocommerce-checkout-review-order-table td.product-name {
  width: 58% !important;
  padding-inline-end: 10px !important;
}

#nrec-checkout table.woocommerce-checkout-review-order-table td.product-total {
  width: 42% !important;
  text-align: end !important;
  font-weight: 700 !important;
}

#nrec-checkout table.woocommerce-checkout-review-order-table tbody tr:last-child :is(th, td) {
  border-bottom: 1px solid var(--nrec-border) !important;
}

#nrec-checkout .nrec-item {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

#nrec-checkout .nrec-item__thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--nrec-border);
  background: var(--nrec-card-2);
}

#nrec-checkout .nrec-item__thumb img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: cover;
}

#nrec-checkout .nrec-item__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#nrec-checkout .nrec-item__title {
  display: block;
  color: var(--nrec-text) !important;
  font-size: 0.98em;
  font-weight: 700;
  line-height: 1.5;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  letter-spacing: 0 !important;
}

#nrec-checkout .nrec-item__title a {
  color: inherit;
}

#nrec-checkout .nrec-item__qty,
#nrec-checkout .product-quantity {
  color: var(--nrec-muted) !important;
  font-size: 0.85em;
  font-weight: 500 !important;
}

#nrec-checkout dl.variation {
  display: flex !important;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  color: var(--nrec-muted) !important;
  font-size: 0.82em;
  line-height: 1.6;
}

#nrec-checkout dl.variation :is(dt, dd) {
  display: inline !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  font-weight: 500 !important;
}

#nrec-checkout dl.variation dd p {
  display: inline;
  margin: 0;
}

#nrec-checkout dl.variation dd::after {
  content: "،";
  margin-inline-start: 1px;
}

#nrec-checkout dl.variation dd:last-child::after {
  content: none;
}

#nrec-checkout table.woocommerce-checkout-review-order-table tfoot th {
  color: var(--nrec-muted) !important;
  font-weight: 500 !important;
  font-size: 0.95em !important;
}

#nrec-checkout table.woocommerce-checkout-review-order-table tfoot td {
  text-align: end !important;
  font-weight: 600 !important;
}

#nrec-checkout table.woocommerce-checkout-review-order-table tr.order-total :is(th, td) {
  border-bottom: 0 !important;
  padding-top: 16px !important;
  padding-bottom: 4px !important;
}

#nrec-checkout table.woocommerce-checkout-review-order-table tr.order-total th {
  color: var(--nrec-text) !important;
  font-size: 1.05em !important;
  font-weight: 800 !important;
}

#nrec-checkout table.woocommerce-checkout-review-order-table tr.order-total td,
#nrec-checkout table.woocommerce-checkout-review-order-table tr.order-total td .woocommerce-Price-amount,
#nrec-checkout table.woocommerce-checkout-review-order-table tr.order-total td .woocommerce-Price-amount bdi {
  color: var(--nrec-primary) !important;
  font-size: 1.22em !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
}

#nrec-checkout table.woocommerce-checkout-review-order-table tr.order-total td .woocommerce-Price-amount {
  font-size: 1em !important;
}

#nrec-checkout .woocommerce-Price-amount bdi {
  unicode-bidi: isolate;
}

#nrec-checkout .woocommerce-Price-currencySymbol {
  font-size: 0.82em;
  font-weight: 500;
  margin-inline-start: 2px;
}

#nrec-checkout small.includes_tax,
#nrec-checkout small.tax_label,
#nrec-checkout .woocommerce-price-suffix {
  display: block !important;
  margin-top: 2px;
  color: var(--nrec-muted) !important;
  font-size: 0.74em !important;
  font-weight: 400 !important;
  line-height: 1.5;
}

#nrec-checkout small.includes_tax .woocommerce-Price-amount,
#nrec-checkout small.includes_tax .woocommerce-Price-amount bdi,
#nrec-checkout .woocommerce-price-suffix .woocommerce-Price-amount {
  color: var(--nrec-muted) !important;
  font-size: 1em !important;
  font-weight: 500 !important;
}

#nrec-checkout tr.cart-discount td,
#nrec-checkout tr.cart-discount td .woocommerce-Price-amount {
  color: var(--nrec-success) !important;
}

#nrec-checkout a.woocommerce-remove-coupon {
  display: inline-block;
  margin-inline-start: 6px;
  color: var(--nrec-error) !important;
  font-size: 0.8em;
  font-weight: 500;
}

#nrec-checkout tr.woocommerce-shipping-totals {
  display: block !important;
  padding: 4px 0 6px !important;
  border-bottom: 1px dashed var(--nrec-border) !important;
}

#nrec-checkout tr.woocommerce-shipping-totals :is(th, td) {
  display: block !important;
  width: auto !important;
  padding: 6px 0 !important;
  border-bottom: 0 !important;
  text-align: start !important;
}

#nrec-checkout ul#shipping_method,
#nrec-checkout ul.woocommerce-shipping-methods {
  list-style: none !important;
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  margin: 0 !important;
  padding: 0 !important;
}

#nrec-checkout ul.woocommerce-shipping-methods li {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin: 0 !important;
  padding: 10px 12px !important;
  list-style: none !important;
  border: 1px solid var(--nrec-border) !important;
  border-radius: var(--nrec-radius-sm) !important;
  background: var(--nrec-card-2) !important;
  text-indent: 0 !important;
}

#nrec-checkout ul.woocommerce-shipping-methods li:has(input:checked) {
  border-color: var(--nrec-primary) !important;
}

#nrec-checkout ul.woocommerce-shipping-methods li input[type="radio"] {
  margin-top: 3px !important;
}

#nrec-checkout ul.woocommerce-shipping-methods label {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--nrec-text) !important;
  font-size: 0.9em !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  cursor: pointer;
}

#nrec-checkout ul.woocommerce-shipping-methods label .woocommerce-Price-amount {
  color: var(--nrec-primary);
  font-weight: 700;
}

#nrec-checkout p.woocommerce-shipping-destination,
#nrec-checkout .woocommerce-shipping-contents {
  margin: 8px 0 0 !important;
  color: var(--nrec-muted) !important;
  font-size: 0.8em;
}

/* Inline coupon */
#nrec-checkout .nrec-coupon {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--nrec-border);
}

#nrec-checkout .nrec-coupon__label {
  display: block;
  margin: 0 0 8px;
  color: var(--nrec-muted);
  font-size: 0.9em;
  font-weight: 600;
}

#nrec-checkout .nrec-coupon__row {
  display: flex !important;
  gap: 8px;
}

#nrec-checkout .nrec-coupon__row .nrec-coupon__input {
  flex: 1 1 auto;
  min-width: 0 !important;
  width: auto !important;
}

#nrec-checkout .nrec-coupon__row .nrec-coupon__btn {
  flex: 0 0 auto;
  color: var(--nrec-primary) !important;
  border-color: rgba(var(--nrec-primary-rgb), 0.5) !important;
}

#nrec-checkout .nrec-coupon__row .nrec-coupon__btn:hover {
  background: rgba(var(--nrec-primary-rgb), 0.1) !important;
  border-color: var(--nrec-primary) !important;
}

#nrec-checkout .nrec-coupon--busy {
  opacity: 0.6;
  pointer-events: none;
}

#nrec-checkout .nrec-coupon__notice:empty {
  display: none;
}

#nrec-checkout .nrec-coupon__notice :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) {
  margin: 10px 0 0 !important;
  padding: 9px 12px !important;
  font-size: 0.85em;
}

/* ---------- 9. Notices & blockUI ------------------------------------------ */
#nrec-checkout .woocommerce-NoticeGroup {
  margin: 0 0 4px !important;
}

#nrec-checkout :is(.woocommerce-error, .woocommerce-message, .woocommerce-info, .woocommerce-notice, .wc-block-components-notice-banner) {
  display: block !important;
  position: relative !important;
  width: auto !important;
  list-style: none !important;
  margin: 0 0 18px !important;
  padding: 12px 16px !important;
  border: 1px solid var(--nrec-border) !important;
  border-inline-start: 4px solid var(--nrec-info) !important;
  border-radius: var(--nrec-radius-sm) !important;
  background: var(--nrec-card) !important;
  color: var(--nrec-text) !important;
  font-family: inherit !important;
  font-size: 0.95em !important;
  line-height: 1.7 !important;
  text-align: start !important;
  box-shadow: none !important;
}

#nrec-checkout .woocommerce-error,
#nrec-checkout .wc-block-components-notice-banner.is-error {
  border-inline-start-color: var(--nrec-error) !important;
  background: rgba(248, 113, 113, 0.08) !important;
}

#nrec-checkout .woocommerce-message,
#nrec-checkout .wc-block-components-notice-banner.is-success {
  border-inline-start-color: var(--nrec-success) !important;
  background: rgba(52, 211, 153, 0.08) !important;
}

#nrec-checkout :is(.woocommerce-error, .woocommerce-message, .woocommerce-info, .woocommerce-notice)::before,
#nrec-checkout :is(.woocommerce-error, .woocommerce-message, .woocommerce-info, .woocommerce-notice)::after {
  display: none !important;
  content: none !important;
}

#nrec-checkout :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) li {
  list-style: none !important;
  margin: 3px 0 !important;
  padding: 0 !important;
  color: inherit !important;
}

#nrec-checkout :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) a {
  color: var(--nrec-primary) !important;
  font-weight: 600;
}

#nrec-checkout :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) .button {
  margin-inline-start: 10px !important;
  min-height: 36px;
  padding: 6px 12px !important;
  font-size: 0.85em !important;
}

#nrec-checkout .woocommerce-form-coupon-toggle .woocommerce-info,
#nrec-checkout .woocommerce-form-login-toggle .woocommerce-info {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--nrec-muted) !important;
}

#nrec-checkout .blockUI.blockOverlay {
  background: rgba(11, 11, 13, 0.62) !important;
  opacity: 1 !important;
  cursor: wait !important;
  border-radius: inherit;
}

#nrec-checkout .blockUI.blockOverlay::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--nrec-primary);
  background: none !important;
  animation: nrec-spin 0.8s linear infinite;
}

#nrec-checkout form.checkout.processing {
  position: relative !important;
}

/* ---------- 10. Select2 / selectWoo ---------------------------------------- */
#nrec-checkout .select2-container {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  font-family: inherit !important;
}

#nrec-checkout .select2-container .select2-selection--single {
  display: flex !important;
  align-items: center;
  height: auto !important;
  min-height: 48px !important;
  padding: 0 14px !important;
  border: 1px solid var(--nrec-border) !important;
  border-radius: var(--nrec-radius-sm) !important;
  background: var(--nrec-input-bg) !important;
  box-shadow: none !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#nrec-checkout .select2-container .select2-selection--single .select2-selection__rendered {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 !important;
  padding-inline-end: 24px !important;
  color: var(--nrec-text) !important;
  font-size: var(--nrec-fs) !important;
  line-height: 1.5 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#nrec-checkout .select2-container .select2-selection--single .select2-selection__placeholder {
  color: var(--nrec-muted) !important;
  opacity: 0.8;
}

#nrec-checkout .select2-container .select2-selection--single .select2-selection__arrow {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  height: 100% !important;
  width: 22px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  left: 12px !important;
  right: auto !important;
}

#nrec-checkout.nrec-ltr .select2-container .select2-selection--single .select2-selection__arrow {
  right: 12px !important;
  left: auto !important;
}

#nrec-checkout .select2-container .select2-selection--single .select2-selection__arrow b {
  position: static !important;
  margin: 0 !important;
  border-color: var(--nrec-muted) transparent transparent transparent !important;
  border-width: 6px 5px 0 5px !important;
}

#nrec-checkout .select2-container.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent var(--nrec-muted) transparent !important;
  border-width: 0 5px 6px 5px !important;
}

#nrec-checkout .select2-container.select2-container--focus .select2-selection--single,
#nrec-checkout .select2-container.select2-container--open .select2-selection--single {
  border-color: var(--nrec-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--nrec-primary-rgb), 0.18) !important;
}

#nrec-checkout .select2-container .select2-selection--single .select2-selection__clear {
  color: var(--nrec-muted);
  margin-inline-end: 8px;
}

/* Dropdown is appended to <body>; body class only exists on the checkout page */
body.nrec-checkout-page .select2-dropdown {
  z-index: 100000;
  border: 1px solid var(--nrec-border) !important;
  border-radius: var(--nrec-radius-sm) !important;
  background: var(--nrec-card) !important;
  color: var(--nrec-text) !important;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9) !important;
  overflow: hidden;
  font-family: var(--nrec-font) !important;
  font-size: var(--nrec-fs) !important;
  color-scheme: dark;
}

body.nrec-checkout-page .select2-search--dropdown {
  padding: 8px !important;
}

body.nrec-checkout-page .select2-search--dropdown .select2-search__field {
  -webkit-appearance: none;
  appearance: none;
  width: 100% !important;
  min-height: 40px !important;
  padding: 8px 12px !important;
  border: 1px solid var(--nrec-border) !important;
  border-radius: 8px !important;
  background: var(--nrec-input-bg) !important;
  color: var(--nrec-text) !important;
  font-family: inherit !important;
  font-size: 0.95em !important;
  outline: none !important;
  box-shadow: none !important;
}

body.nrec-checkout-page .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--nrec-primary) !important;
}

body.nrec-checkout-page .select2-results__option {
  padding: 10px 14px !important;
  margin: 0 !important;
  color: var(--nrec-text) !important;
  background: transparent !important;
  font-size: 0.95em !important;
  line-height: 1.5 !important;
}

body.nrec-checkout-page .select2-results__option--highlighted,
body.nrec-checkout-page .select2-results__option--highlighted[aria-selected],
body.nrec-checkout-page .select2-results__option--highlighted[data-selected] {
  background: var(--nrec-primary) !important;
  color: #fff !important;
}

body.nrec-checkout-page .select2-results__option[aria-selected="true"]:not(.select2-results__option--highlighted),
body.nrec-checkout-page .select2-results__option[data-selected="true"]:not(.select2-results__option--highlighted) {
  background: rgba(var(--nrec-primary-rgb), 0.16) !important;
  color: var(--nrec-text) !important;
}

body.nrec-checkout-page .select2-results__message,
body.nrec-checkout-page .select2-results__option[role="alert"] {
  color: var(--nrec-muted) !important;
}

body.nrec-checkout-page .select2-results > .select2-results__options {
  max-height: 260px;
  scrollbar-width: thin;
  scrollbar-color: var(--nrec-border) transparent;
}

/* ---------- 11. Order-pay & thank-you ------------------------------------- */
#nrec-checkout.nrec-checkout--pay > .woocommerce,
#nrec-checkout.nrec-checkout--received > .woocommerce {
  max-width: 860px !important;
  margin: 0 auto !important;
}

#nrec-checkout.nrec-checkout--pay form#order_review {
  display: block !important;
  padding: 24px !important;
  border: 1px solid var(--nrec-border) !important;
  border-radius: var(--nrec-radius) !important;
  background: var(--nrec-card) !important;
}

#nrec-checkout.nrec-checkout--pay #payment {
  margin-top: 20px !important;
}

#nrec-checkout .woocommerce-order {
  display: flex !important;
  flex-direction: column;
  gap: 20px;
}

#nrec-checkout .woocommerce-thankyou-order-received {
  margin: 0 !important;
  padding: 18px 20px !important;
  border: 1px solid rgba(52, 211, 153, 0.4) !important;
  border-radius: var(--nrec-radius) !important;
  background: rgba(52, 211, 153, 0.08) !important;
  color: var(--nrec-text) !important;
  font-size: 1.12em !important;
  font-weight: 700 !important;
  text-align: center !important;
}

#nrec-checkout .woocommerce-thankyou-order-failed {
  margin: 0 !important;
  padding: 18px 20px !important;
  border: 1px solid rgba(248, 113, 113, 0.45) !important;
  border-radius: var(--nrec-radius) !important;
  background: rgba(248, 113, 113, 0.08) !important;
  color: var(--nrec-text) !important;
  font-weight: 600 !important;
}

#nrec-checkout .woocommerce-thankyou-order-failed-actions {
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px;
}

#nrec-checkout ul.woocommerce-order-overview {
  list-style: none !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 0 !important;
  padding: 0 !important;
}

#nrec-checkout ul.woocommerce-order-overview li {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid var(--nrec-border) !important;
  border-radius: var(--nrec-radius-sm) !important;
  background: var(--nrec-card) !important;
  color: var(--nrec-muted) !important;
  font-size: 0.85em !important;
  line-height: 1.6 !important;
  text-transform: none !important;
}

#nrec-checkout ul.woocommerce-order-overview li strong {
  display: block !important;
  margin-top: 4px;
  color: var(--nrec-text) !important;
  font-size: 1.12em !important;
  font-weight: 700 !important;
}

#nrec-checkout ul.woocommerce-order-overview li.total strong,
#nrec-checkout ul.woocommerce-order-overview li.total .woocommerce-Price-amount {
  color: var(--nrec-primary) !important;
}

#nrec-checkout :is(.woocommerce-order-details, .woocommerce-customer-details, .woocommerce-bacs-bank-details, .woocommerce-order-downloads) {
  margin: 0 !important;
  padding: 22px 24px !important;
  border: 1px solid var(--nrec-border) !important;
  border-radius: var(--nrec-radius) !important;
  background: var(--nrec-card) !important;
}

#nrec-checkout table.shop_table:not(.woocommerce-checkout-review-order-table) {
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.95em !important;
}

#nrec-checkout table.shop_table:not(.woocommerce-checkout-review-order-table) :is(th, td) {
  padding: 11px 0 !important;
  border: 0 !important;
  border-bottom: 1px dashed var(--nrec-border) !important;
  background: transparent !important;
  color: var(--nrec-text) !important;
  font-family: inherit !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
  text-align: start !important;
  vertical-align: middle !important;
  overflow-wrap: anywhere !important;
}

#nrec-checkout table.shop_table:not(.woocommerce-checkout-review-order-table) thead th {
  color: var(--nrec-muted) !important;
  font-size: 0.85em !important;
  font-weight: 600 !important;
}

#nrec-checkout table.shop_table:not(.woocommerce-checkout-review-order-table) :is(th, td):last-child {
  text-align: end !important;
}

#nrec-checkout table.shop_table:not(.woocommerce-checkout-review-order-table) tfoot th {
  color: var(--nrec-muted) !important;
  font-weight: 500 !important;
}

#nrec-checkout table.shop_table:not(.woocommerce-checkout-review-order-table) tfoot tr:last-child :is(th, td) {
  border-bottom: 0 !important;
  padding-top: 14px !important;
  font-weight: 800 !important;
}

#nrec-checkout table.shop_table:not(.woocommerce-checkout-review-order-table) tfoot tr:last-child td,
#nrec-checkout table.shop_table:not(.woocommerce-checkout-review-order-table) tfoot tr:last-child td .woocommerce-Price-amount {
  color: var(--nrec-primary) !important;
  font-size: 1.1em !important;
}

#nrec-checkout .woocommerce-table__product-name a {
  color: var(--nrec-text) !important;
  font-weight: 700;
}

#nrec-checkout .woocommerce-columns--addresses {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

#nrec-checkout .woocommerce-column {
  float: none !important;
  width: auto !important;
  max-width: none !important;
}

#nrec-checkout address {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--nrec-text) !important;
  font-style: normal !important;
  line-height: 1.9;
}

#nrec-checkout .woocommerce-customer-details--phone,
#nrec-checkout .woocommerce-customer-details--email {
  margin: 6px 0 0 !important;
  padding: 0 !important;
  color: var(--nrec-muted) !important;
}

#nrec-checkout .woocommerce-customer-details--phone::before,
#nrec-checkout .woocommerce-customer-details--email::before {
  display: none !important;
  content: none !important;
}

#nrec-checkout .wc-bacs-bank-details {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#nrec-checkout .wc-bacs-bank-details li {
  padding: 8px 0 !important;
  border-bottom: 1px dashed var(--nrec-border) !important;
  color: var(--nrec-muted) !important;
}

#nrec-checkout .wc-bacs-bank-details li strong {
  color: var(--nrec-text) !important;
}

#nrec-checkout .order_details .download-file .button,
#nrec-checkout .woocommerce-order-downloads .button {
  min-height: 38px;
  padding: 6px 14px !important;
  font-size: 0.85em !important;
}

/* ---------- 12. Responsive (viewport + container queries) ----------------- */
@media (max-width: 1100px) {
  #nrec-checkout .nrec-layout {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 360px) !important;
    gap: 18px !important;
  }

  #nrec-checkout .nrec-card {
    padding: 20px !important;
  }
}

@media (max-width: 860px) {
  #nrec-checkout .nrec-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
  }

  #nrec-checkout .nrec-side {
    position: static !important;
    order: -1;
  }

  #nrec-checkout .nrec-card {
    padding: 18px 16px !important;
    border-radius: calc(var(--nrec-radius) - 1px) !important;
  }

  #nrec-checkout.nrec-checkout--embedded {
    padding: 12px 0 28px;
  }

  #nrec-checkout :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper,
    .woocommerce-additional-fields__field-wrapper, .woocommerce-account-fields) {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  #nrec-checkout :is(.form-row-first, .form-row-last) {
    grid-column: 1 / -1;
  }

  #nrec-checkout form.checkout_coupon .form-row-first,
  #nrec-checkout form.checkout_coupon .form-row-last {
    display: block !important;
    width: 100% !important;
    margin: 0 0 10px !important;
  }

  #nrec-checkout form.checkout_coupon button,
  #nrec-checkout form.woocommerce-form-login button {
    width: 100% !important;
  }

  #nrec-checkout table.woocommerce-checkout-review-order-table td.product-name {
    width: 60% !important;
  }

  #nrec-checkout table.woocommerce-checkout-review-order-table td.product-total {
    width: 40% !important;
  }

  #nrec-checkout .nrec-item__thumb {
    flex-basis: 50px;
    width: 50px;
    height: 50px;
  }

  #nrec-checkout li.wc_payment_method > label {
    padding: 13px 14px !important;
    padding-inline-start: 44px !important;
    font-size: 0.97em !important;
  }

  #nrec-checkout li.wc_payment_method:has(> input[name="payment_method"] + label) > label::before,
  #nrec-checkout li.wc_payment_method > input[name="payment_method"] {
    inset-inline-start: 14px !important;
  }

  .nrec-shell__header {
    padding: 14px 16px 6px;
    gap: 10px;
  }

  .nrec-shell__main {
    padding: 0 14px 36px;
  }

  .nrec-shell__brand img {
    max-height: 36px;
  }

  .nrec-shell__secure span,
  .nrec-shell__back span {
    display: none;
  }

  .nrec-shell__secure {
    padding: 8px;
  }

  .nrec-steps {
    margin: 4px auto 16px;
    padding: 0 14px;
    gap: 4px;
  }

  .nrec-steps__sep {
    width: 18px;
  }

  .nrec-steps__item {
    padding: 4px 6px;
    font-size: 0.85em;
  }

  .nrec-shell__footer {
    padding: 18px 14px 22px;
  }

  .nrec-shell__badges {
    gap: 6px 18px;
  }
}

@media (max-width: 782px) {
  body.admin-bar .nrec-shell {
    min-height: calc(100vh - 46px);
  }
}

@media (max-width: 480px) {
  .nrec-steps__item:not(.is-current) .nrec-steps__label {
    display: none;
  }

  #nrec-checkout .nrec-card {
    padding: 16px 14px !important;
  }

  #nrec-checkout #place_order {
    min-height: 54px !important;
    font-size: 1em !important;
  }

  #nrec-checkout li.wc_payment_method > label img {
    max-width: 90px !important;
    max-height: 24px !important;
  }
}

/* Same breakpoints measured against the checkout container itself (narrow theme containers) */
@container nrec (max-width: 1100px) {
  #nrec-checkout .nrec-layout {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 360px) !important;
    gap: 18px !important;
  }
}

@container nrec (max-width: 860px) {
  #nrec-checkout .nrec-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
  }

  #nrec-checkout .nrec-side {
    position: static !important;
    order: -1;
  }

  #nrec-checkout :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper,
    .woocommerce-additional-fields__field-wrapper, .woocommerce-account-fields) {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  #nrec-checkout :is(.form-row-first, .form-row-last) {
    grid-column: 1 / -1;
  }

  #nrec-checkout form.checkout_coupon .form-row-first,
  #nrec-checkout form.checkout_coupon .form-row-last {
    display: block !important;
    width: 100% !important;
    margin: 0 0 10px !important;
  }
}

/* ---------- 13. Motion & print ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  #nrec-checkout *,
  .nrec-shell * {
    transition: none !important;
  }
}

@media print {
  .nrec-shell__header,
  .nrec-shell__footer,
  .nrec-steps,
  #nrec-checkout #place_order {
    display: none !important;
  }

  #nrec-checkout,
  .nrec-shell,
  body.nrec-body {
    background: #fff !important;
    color: #000 !important;
  }
}
