/* The React header is fixed. The native WooCommerce pages begin beneath it. */
body.thunder-native #thunder-original-root { min-height: 0; }
body.thunder-native #thunder-native-content { padding-top: 110px; }
body.thunder-native.admin-bar:not(.thunder-checkout-stable) #thunder-original-root header { top: var(--wp-admin--admin-bar--height, 32px); }
body.thunder-native.admin-bar:not(.thunder-checkout-stable) #thunder-native-content { padding-top: 144px; }

body.thunder-checkout-stable #wc-stripe-express-checkout-button-separator { margin-bottom: 1em; }

body.thunder-checkout-stable #thunder-native-content {
  box-sizing: border-box;
  width: 100%;
  max-width: 1824px;
  padding-inline: clamp(16px, 3vw, 48px);
}
body.thunder-checkout-stable #thunder-native-content > .woocommerce,
body.thunder-checkout-stable #thunder-native-content form.checkout {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
}
body.thunder-checkout-stable #order_review .woocommerce-Price-amount { white-space: nowrap; }
#thunder-native-content #thunder-checkout-shipping { margin-bottom: 24px; }
#thunder-native-content #thunder-checkout-shipping > h2 { margin-bottom: 12px; }
#thunder-native-content #thunder-checkout-shipping table { margin: 0; }
#thunder-native-content #thunder-checkout-shipping .woocommerce-shipping-totals th { width: 32%; vertical-align: top; }
#thunder-native-content #thunder-checkout-shipping ul.woocommerce-shipping-methods { margin: 0; padding: 0; list-style: none; }
#thunder-native-content #thunder-checkout-shipping ul.woocommerce-shipping-methods li { margin: 0 0 10px; }
#thunder-native-content #thunder-checkout-shipping ul.woocommerce-shipping-methods li:last-child { margin-bottom: 0; }
#thunder-native-content #order_review .thunder-checkout-thumbnail {
  float: left;
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  margin: 0 9px 4px 0;
}
.cookieadmin_reconsent_wrap button.cookieadmin_re_consent {
  background-color: #ffce17 !important;
  border: 1px solid #141414;
  border-radius: 50%;
}
.cookieadmin_reconsent_wrap .cookieadmin_reconsent_img { filter: brightness(0); }
.thunder-cookie-settings { display: none; }
body:has(button.cookieadmin_re_consent, #cookieadmin_customize_button) .thunder-cookie-settings { display: inline; }
@media (max-width: 767px) {
  body:has(#thunder-original-root) .cookieadmin_reconsent_wrap {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

body.thunder-checkout-stable #thunder-native-content .woocommerce form.checkout {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px 30px;
}
body.thunder-checkout-stable #thunder-native-content .woocommerce form.checkout > * { grid-column: 1 / -1; }
body.thunder-checkout-stable #thunder-native-content .woocommerce form.checkout > #customer_details {
  grid-column: 1;
  grid-row: 1;
}
body.thunder-checkout-stable #thunder-native-content .woocommerce form.checkout > .thunder-order-summary {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  position: sticky;
  top: 105px;
  min-width: 0;
}
body.thunder-checkout-stable #thunder-native-content .woocommerce form.checkout > .thunder-checkout-payment {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--tn-border);
  border-radius: 18px;
  padding: 22px;
}
#thunder-native-content #thunder-stripe-notice:empty { display: none; }
#thunder-native-content #thunder-stripe-notice .ece-taxes-info { margin-bottom: 14px; }
#thunder-order-extras:empty { display: none; }
#thunder-order-extras .woocommerce-additional-fields { padding: 16px; }

body.thunder-native.woocommerce-account.logged-in #thunder-native-content > .woocommerce {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(0, 3fr);
  gap: 22px;
  align-items: start;
}
#thunder-native-content .woocommerce-MyAccount-navigation,
#thunder-native-content .woocommerce-MyAccount-content {
  float: none;
  width: 100%;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--tn-border);
  border-radius: 16px;
  background: var(--tn-card);
}
#thunder-native-content .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; }
#thunder-native-content .woocommerce-MyAccount-navigation a { display: block; padding: 10px; border-radius: 8px; }
#thunder-native-content .woocommerce-MyAccount-navigation .is-active a { background: #facc15; color: #111827; font-weight: 700; }
.thunder-account-shortcuts { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 28px; }
.thunder-account-shortcuts a { border: 1px solid var(--tn-border); border-radius: 10px; padding: 10px 14px; }
#thunder-favorites { scroll-margin-top: 110px; }
.thunder-favorites-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.thunder-favorite-card { display: grid; align-content: start; gap: 8px; padding: 12px; border: 1px solid var(--tn-border); border-radius: 12px; }
.thunder-favorite-card a { display: grid; gap: 8px; }
.thunder-favorite-card img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 8px; background: #fff; }
.thunder-favorite-card button { border: 1px solid var(--tn-border); padding: 7px; border-radius: 8px; }
[data-thunder-favorite].is-favorite svg { fill: #f43f5e; color: #f43f5e; }
[data-thunder-favorite]:disabled { opacity: .65; cursor: wait; }

#thunder-auth-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(470px, calc(100% - 28px));
  max-height: 88dvh;
  overflow: auto;
  border: 1px solid #d5aa0d;
  border-radius: 18px;
  padding: 23px;
  background: #10141d;
  color: #f8fafc;
  color-scheme: dark;
  box-shadow: 0 18px 72px #0008;
}
html.light #thunder-auth-dialog { background: #fff; color: #111827; color-scheme: light; }
#thunder-auth-dialog::backdrop { background: #030712a6; backdrop-filter: blur(9px); }
#thunder-auth-dialog [hidden], .thunder-favorites-empty[hidden], #thunder-customer-status[hidden] { display: none !important; }
.thunder-auth-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.thunder-auth-header h2 { font-size: 22px; font-weight: 750; }
.thunder-auth-header button { border: 1px solid #64748b; border-radius: 8px; width: 35px; height: 35px; font-size: 22px; }
#thunder-auth-reason { margin-top: 8px; font-size: 14px; }
.thunder-auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.thunder-auth-tabs button, #thunder-auth-dialog button[type="submit"] { border: 1px solid #64748b; border-radius: 8px; padding: 8px 12px; }
.thunder-auth-tabs button[aria-pressed="true"], #thunder-auth-dialog button[type="submit"] { background: #facc15; color: #111827; font-weight: 700; }
#thunder-auth-dialog .col-1, #thunder-auth-dialog .col-2 { float: none; width: 100%; }
#thunder-auth-dialog .woocommerce form { margin: 0; padding: 0; border: 0; }
#thunder-auth-dialog .woocommerce h2 { display: none; }
#thunder-auth-dialog .form-row { margin: 0 0 12px; }
#thunder-auth-dialog label { display: block; margin-bottom: 4px; }
#thunder-auth-dialog .input-text { border: 1px solid #64748b; border-radius: 8px; background: transparent; padding: 9px 11px; width: 100%; }
#thunder-auth-dialog .input-text:focus-visible { outline: 2px solid #facc15; }
#thunder-auth-dialog a { color: #d5aa0d; text-decoration: underline; }
#thunder-customer-status { position: fixed; bottom: 76px; right: 16px; z-index: 150; background: #111827; color: #fff; border: 1px solid #facc15; border-radius: 10px; padding: 10px 14px; }
@media (max-width: 980px) {
  body.thunder-checkout-stable #thunder-native-content .woocommerce form.checkout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  body.thunder-checkout-stable #thunder-native-content .woocommerce form.checkout > #customer_details,
  body.thunder-checkout-stable #thunder-native-content .woocommerce form.checkout > .thunder-order-summary,
  body.thunder-checkout-stable #thunder-native-content .woocommerce form.checkout > .thunder-checkout-payment { grid-column: 1; grid-row: auto; position: static; }
}
@media (max-width: 650px) {
  body.thunder-native #thunder-native-content { padding: 78px 14px 60px; }
  body.thunder-native.admin-bar:not(.thunder-checkout-stable) #thunder-native-content { padding-top: 126px; }
  body.thunder-native.woocommerce-account.logged-in #thunder-native-content > .woocommerce { grid-template-columns: 1fr; }
  #thunder-native-content .woocommerce-MyAccount-navigation,
  #thunder-native-content .woocommerce-MyAccount-content { padding: 14px; }
}
@media (min-width: 981px) {
  /* Woo inserts validation notices directly into the form after a failed submit. */
  body.thunder-checkout-stable #thunder-native-content form.checkout:has(> .woocommerce-NoticeGroup-checkout) > .woocommerce-NoticeGroup-checkout { grid-row: 1; }
  body.thunder-checkout-stable #thunder-native-content form.checkout:has(> .woocommerce-NoticeGroup-checkout) > #customer_details { grid-row: 2; }
  body.thunder-checkout-stable #thunder-native-content form.checkout:has(> .woocommerce-NoticeGroup-checkout) > .thunder-order-summary { grid-row: 2 / span 2; }
  body.thunder-checkout-stable #thunder-native-content form.checkout:has(> .woocommerce-NoticeGroup-checkout) > .thunder-checkout-payment { grid-row: 3; }
}

#thunder-order-submit:empty { display: none; }
#thunder-order-submit:not(:empty) { margin-top: 16px; padding: 16px; background: #fff; border: 1px solid var(--tn-border); border-radius: 16px; }
#thunder-order-submit .place-order { margin: 0; padding: 0; }
#thunder-order-submit .woocommerce-terms-and-conditions-wrapper { margin-bottom: 12px; font-size: .87rem; }
#thunder-order-submit .woocommerce-privacy-policy-text a { color: #765300; text-decoration: underline; }
#thunder-order-submit :is(#place_order, .thunder-order-paused) { width: 100%; }

body.thunder-native.woocommerce-account:not(.logged-in) #thunder-native-content { max-width: 1110px; }
#thunder-native-content #customer_login { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: none; }
/* WooCommerce's float clearfix creates extra grid items unless removed here. */
#thunder-native-content #customer_login::before,
#thunder-native-content #customer_login::after { content: none; display: none; }
#thunder-native-content #customer_login > div { float: none; width: 100%; min-width: 0; }
#thunder-native-content #customer_login form { margin: 0; }
#thunder-native-content #customer_login h2 { margin: 0 0 12px; }
#thunder-auth-dialog { width: min(470px, calc(100% - 28px)); padding: clamp(18px, 5vw, 29px); }
#thunder-auth-dialog .woocommerce .form-row { font-size: .94rem; }
#thunder-auth-dialog .woocommerce .button { min-height: 42px; }
.thunder-social-auth { padding: 12px 16px; margin: 12px 0 20px; border: 1px solid var(--tn-border, #64748b); border-radius: 14px; }
.thunder-social-auth > p { margin: 0 0 .55rem; font-size: .9rem; font-weight: 650; }
.thunder-social-auth .nsl-container { display: inline-block; vertical-align: top; }

.thunder-contact { max-width: 1050px; }
.thunder-contact-intro { margin: .5rem 0 1.75rem; color: var(--tn-muted); line-height: 1.55; }
.thunder-contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; align-items: start; gap: 16px; }
.thunder-contact-grid section { padding: clamp(15px, 3vw, 26px); border-radius: 16px; border: 1px solid var(--tn-border); background: var(--tn-card); }
.thunder-contact-grid h2 { margin: 0 0 12px; }
.thunder-contact-grid p { margin: .65em 0; }
.thunder-contact-grid a { text-decoration: underline; }
.thunder-contact-grid details { padding: .65rem 0; border-top: 1px solid var(--tn-border); scroll-margin-top: 115px; }
.thunder-contact-grid summary { cursor: pointer; font-weight: 650; }
.thunder-chat-open { margin: .5em 0; }
@media (max-width: 650px) {
  #thunder-native-content #customer_login, .thunder-contact-grid { grid-template-columns: 1fr; }
}
#thunder-native-content .thunder-contact .thunder-chat-open { padding: .65em 1.05em; border-radius: 999px; background: #ffcf17; color: #111827; font-weight: 750; }
#thunder-native-content .thunder-contact .thunder-chat-open:disabled { opacity: .65; }
/* The moved controls follow Woo's submit lock and Stripe's payment visibility. */
form.checkout.processing #thunder-order-submit { pointer-events: none; opacity: .65; }
form.checkout:has(#payment[hidden], #payment[style*="display: none"]) #thunder-order-submit { visibility: hidden; }

/* 0.4.15 – dialog-only accessibility and provider fallback; no checkout styling. */
#thunder-auth-dialog .thunder-auth-form-error:not([hidden]) {
  display: block !important; margin: 12px 0 0; padding: 10px 12px;
  border: 1px solid #f87171; border-radius: 10px;
  color: #fecaca; background: #450a0a; font-size: 13px; line-height: 1.4;
}
#thunder-auth-dialog .thunder-social-auth {
  margin-top: 14px; padding: 14px 0 0; border: 0;
  border-top: 1px solid rgba(148,163,184,.25); border-radius: 0;
}
#thunder-auth-dialog .thunder-social-separator {
  display: block; text-align: center; font-size: 11px; letter-spacing: .13em;
  color: #b0b8c7; margin-bottom: 11px;
}
#thunder-auth-dialog .thunder-google-fallback {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; padding: 7px 12px; border: 1px solid #5e7187;
  border-radius: 12px; background: rgba(255,255,255,.08);
  color: inherit; text-decoration: none; text-align: left; font-size: 13px;
  transition: border-color .2s, background-color .2s;
}
#thunder-auth-dialog .thunder-google-fallback:hover,
#thunder-auth-dialog .thunder-google-fallback:focus-visible {
  border-color: #ffcb05; background: rgba(255,203,5,.1); color: inherit;
}
#thunder-auth-dialog .thunder-google-mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  flex: none; border-radius: 8px; background: #fff; color: #4285f4;
  font: 800 20px/1 Arial,sans-serif;
}
#thunder-auth-dialog .thunder-google-fallback small {
  display: block; font-size: 11px; font-weight: 400; opacity: .75;
}
#thunder-auth-dialog .thunder-social-auth .nsl-container { max-width: 100%; }
#thunder-auth-dialog .thunder-social-auth .nsl-button { border-radius: 10px !important; overflow: hidden; }
html.light #thunder-auth-dialog .thunder-auth-form-error:not([hidden]) { color: #991b1b; background: #fff1f2; }
html.light #thunder-auth-dialog .thunder-google-fallback { border-color: #94a3b8; background: #f8fafc; }

/* 0.4.16: the modal Google button starts provider OAuth on its first click. */
#thunder-auth-dialog .thunder-google-direct {
  width:100%; min-height:48px; display:flex; align-items:center;
  justify-content:center; gap:12px; box-sizing:border-box;
  border:1px solid #8091a5; border-radius:12px; text-decoration:none!important;
  transition:border-color .18s ease,box-shadow .18s ease;
}
#thunder-auth-dialog .thunder-google-direct:hover,
#thunder-auth-dialog .thunder-google-direct:focus-visible {
  border-color:#ffcc05; box-shadow:0 0 0 2px rgba(255,204,5,.17);
}
#thunder-auth-dialog .thunder-google-direct .thunder-google-mark {
  background:#fff; font-size:23px; font-weight:800;
  color:#4285f4; flex:none; display:grid; place-items:center;
  width:34px; height:34px; border-radius:9px;
}
#thunder-auth-dialog .thunder-google-direct > span:last-child {
  line-height:1.3; text-align:left; font-weight:750;
}
#thunder-auth-dialog .thunder-google-direct small { font-weight:450; }
