/**
 * Site UI: shared layout utilities, breadcrumbs, Premium subscription blocks,
 * and scoped age-verification page styles (see body.page-*).
 */

/* ---- Breadcrumbs (site-wide): divider, type scale, rhythm under Neo header ---- */
#main_wrapper nav.breadcrumb-nsm {
  --bs-breadcrumb-divider: "›";
  --bs-breadcrumb-divider-color: var(--bs-secondary-color);
  --bs-breadcrumb-item-padding-x: 0.35rem;

  margin-top: 1rem;
  margin-bottom: 1rem;

  font-size: 0.875rem;
  line-height: 1.35;
}

#main_wrapper nav.breadcrumb-nsm .breadcrumb {
  margin-bottom: 0;
}

#main_wrapper nav.breadcrumb-nsm .breadcrumb-item {
  font-size: inherit;
}

#main_wrapper nav.breadcrumb-nsm .breadcrumb-item.active {
  color: var(--bs-secondary-color);
}

#main_wrapper nav.breadcrumb-nsm .breadcrumb-item.non-clickable {
  cursor: default;
  pointer-events: none;
}

#main_wrapper nav.breadcrumb-nsm a {
  font-size: inherit;
}

/*
 * Wrapper already pads the top (e.g. py-3 on an outer column): do not add a second
 * band of space below the Neo site header before crumbs.
 */
#main_wrapper article.neo-content-page.py-3 > nav.breadcrumb-nsm:first-child,
#main_wrapper div.py-3 > nav.breadcrumb-nsm:first-child,
#main_wrapper div.py-4 > nav.breadcrumb-nsm:first-child {
  margin-top: 0 !important;
}

/* Error / nested layout: crumbs inside padded outer + .container */
#main_wrapper div.py-3 > .container > nav.breadcrumb-nsm:first-child,
#main_wrapper div.py-md-4 > .container > nav.breadcrumb-nsm:first-child,
#main_wrapper div.py-4 > .container > nav.breadcrumb-nsm:first-child {
  margin-top: 0 !important;
}

/* ---- Icon circles (hero rows, benefit cards) ---- */
.nsm-circle-32 {
  width: 32px;
  height: 32px;
}
.nsm-circle-40 {
  width: 40px;
  height: 40px;
}
.nsm-circle-48 {
  width: 48px;
  height: 48px;
}
.nsm-circle-50 {
  width: 50px;
  height: 50px;
}
.nsm-circle-56 {
  width: 56px;
  height: 56px;
}
.nsm-circle-60 {
  width: 60px;
  height: 60px;
}
.nsm-circle-64 {
  width: 64px;
  height: 64px;
}
.nsm-circle-80 {
  width: 80px;
  height: 80px;
}

.nsm-age-hero-icon {
  font-size: 4rem;
}

.nsm-text-micro {
  font-size: 0.75rem;
}

/* ---- Premium subscription (premium.php) ---- */
.nsm-premium-staff-perk-callout {
  border: 1px solid rgba(197, 160, 40, 0.45);
  background: linear-gradient(
    145deg,
    rgba(197, 160, 40, 0.16) 0%,
    rgba(197, 160, 40, 0.04) 100%
  );
  color: var(--bs-body-color);
}

.nsm-premium-billing-segmented.neo-segmented {
  display: flex;
  width: 100%;
  justify-content: stretch;
}

.nsm-premium-billing-segmented.neo-segmented .neo-segmented-btn {
  flex: 1;
  justify-content: center;
}

.nsm-premium-duration-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr));
  gap: 0.5rem;
}

.nsm-premium-duration-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 5.25rem;
  margin: 0;
  padding: 0.6rem 0.45rem;
  border: 1px solid rgba(var(--bs-primary-rgb), 0.4);
  border-radius: 0.75rem;
  background: rgba(var(--bs-body-bg-rgb), 1);
  color: var(--bs-body-color);
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
}

.nsm-premium-duration-option:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.65);
  background: rgba(var(--bs-primary-rgb), 0.08);
}

.nsm-premium-duration-option__term {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
}

.nsm-premium-duration-option__save {
  min-height: 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  color: #2f9d55;
}

[data-bs-theme='dark'] .nsm-premium-duration-option__save {
  color: #6ee7a0;
}

.nsm-premium-duration-option__save--placeholder {
  visibility: hidden;
}

.btn-check:focus-visible + .nsm-premium-duration-option {
  outline: 2px solid rgba(var(--bs-primary-rgb), 0.65);
  outline-offset: 2px;
}

.btn-check:checked + .nsm-premium-duration-option {
  border-color: var(--bs-primary);
  background: var(--bs-primary);
  color: #fff;
  box-shadow: 0 0.2rem 0.65rem rgba(var(--bs-primary-rgb), 0.35);
}

.btn-check:checked + .nsm-premium-duration-option .nsm-premium-duration-option__save {
  color: rgba(255, 255, 255, 0.95);
}

.nsm-premium-duration-option--staff {
  border-color: rgba(197, 160, 40, 0.55);
  background: linear-gradient(
    165deg,
    rgba(197, 160, 40, 0.14) 0%,
    rgba(var(--bs-body-bg-rgb), 1) 72%
  );
}

.nsm-premium-duration-option--staff:hover {
  border-color: rgba(212, 178, 58, 0.75);
  background: linear-gradient(
    165deg,
    rgba(197, 160, 40, 0.22) 0%,
    rgba(var(--bs-body-bg-rgb), 1) 72%
  );
}

.nsm-premium-duration-option__badge {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9a7b18;
  line-height: 1.1;
}

[data-bs-theme='dark'] .nsm-premium-duration-option__badge {
  color: #e8c96a;
}

.btn-check:checked + .nsm-premium-duration-option--staff {
  border-color: #c5a028;
  background: linear-gradient(
    165deg,
    #a8840f 0%,
    #c5a028 100%
  );
  color: #1a1508;
  box-shadow: 0 0.2rem 0.65rem rgba(197, 160, 40, 0.4);
}

.btn-check:checked + .nsm-premium-duration-option--staff .nsm-premium-duration-option__badge,
.btn-check:checked + .nsm-premium-duration-option--staff .nsm-premium-duration-option__save {
  color: rgba(26, 21, 8, 0.85);
}

.btn-check:checked + .nsm-premium-duration-option--staff .nsm-premium-duration-option__term {
  color: #1a1508;
}

/* Benefit tiles: soft fade surface (Profile Cards settings vibe), no drop shadow. */
.nsm-premium-benefit-card {
  box-shadow: none !important;
  background-color: rgba(var(--bs-secondary-rgb), 0.06);
  background-image: linear-gradient(
    165deg,
    rgba(var(--bs-primary-rgb), 0.07) 0%,
    transparent 58%
  );
}

.nsm-premium-benefit-card__blurb {
  font-size: 0.8125rem;
  line-height: 1.38;
}

[data-bs-theme='dark'] .nsm-premium-benefit-card {
  background-color: rgba(var(--bs-secondary-rgb), 0.11);
  background-image: linear-gradient(
    165deg,
    rgba(var(--bs-primary-rgb), 0.1) 0%,
    transparent 58%
  );
}

/* CCBill 3DS challenge iframe inside bank-auth modal (card checkout). */
#nsmCcbillBankAuthModal .nsm-ccbill-threeds-mount,
#nsmCcbillPayModal .nsm-ccbill-threeds-mount {
  min-height: 0;
}

.nsm-ccbill-bank-auth__banner {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(var(--bs-primary-rgb), 0.22);
  background: linear-gradient(
    145deg,
    rgba(var(--bs-primary-rgb), 0.1) 0%,
    rgba(var(--bs-body-bg-rgb), 1) 72%
  );
}

.nsm-ccbill-bank-auth__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.12);
  font-size: 1.1rem;
}

.nsm-ccbill-bank-auth__title {
  font-weight: 700;
}

#nsmCcbillBankAuthModal .nsm-ccbill-threeds-mount iframe,
#nsmCcbillBankAuthModal iframe[id='nsmCcbillThreedsFrame'],
#nsmCcbillPayModal .nsm-ccbill-threeds-mount iframe,
#nsmCcbillPayModal iframe[id='nsmCcbillThreedsFrame'] {
  display: block;
  width: 100%;
  min-height: 420px;
  border: 0;
}

/* Neo soft primary fade surface (settings submenu strip; aligns with premium benefit tiles). */
.nsm-neo-bg-fade {
  background-color: rgba(var(--bs-secondary-rgb), 0.06);
  background-image: linear-gradient(
    165deg,
    rgba(var(--bs-primary-rgb), 0.07) 0%,
    transparent 58%
  );
}

[data-bs-theme='dark'] .nsm-neo-bg-fade {
  background-color: rgba(var(--bs-secondary-rgb), 0.11);
  background-image: linear-gradient(
    165deg,
    rgba(var(--bs-primary-rgb), 0.1) 0%,
    transparent 58%
  );
}

/* Settings submenu: plain nav strip (not Bootstrap .navbar) */
nav.nsm-settings-subnav.nsm-neo-bg-fade .nsm-settings-subnav__list {
  flex-wrap: wrap;
  gap: 0.25rem 0.125rem;
}

nav.nsm-settings-subnav.nsm-neo-bg-fade .nsm-settings-subnav-link {
  font-size: 0.8125rem;
  line-height: 1.15;
  font-weight: 600;
}

nav.nsm-settings-subnav.nsm-neo-bg-fade .nsm-settings-subnav__ic {
  font-size: 0.7rem;
  opacity: 0.92;
}

nav.nsm-settings-subnav.nsm-neo-bg-fade .nsm-settings-subnav-link.active {
  background-color: var(--bs-primary) !important;
  color: var(--bs-white) !important;
}

nav.nsm-settings-subnav.nsm-neo-bg-fade .nsm-settings-subnav-link.active .nsm-settings-subnav__ic {
  opacity: 1;
  color: inherit;
}

nav.nsm-settings-subnav.nsm-neo-bg-fade .nsm-settings-subnav-link:not(.active):hover {
  color: var(--bs-primary);
}

nav.nsm-settings-subnav.nsm-neo-bg-fade .nsm-settings-subnav-link:not(.active):hover .nsm-settings-subnav__ic {
  opacity: 1;
}

/* Vertical rhythm below submenu before page hero / forms */
.nsm-settings-subnav--strip + .nsm-settings-neo-hero {
  margin-top: 0;
}

.nsm-settings-body-stack {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.nsm-settings-body-stack > form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

@media (min-width: 992px) {
  .nsm-settings-body-stack {
    gap: 2.25rem;
  }

  .nsm-settings-body-stack > form {
    gap: 2.25rem;
  }
}

/* Settings overview dashboard tiles */
.nsm-settings-dash-welcome {
  border-radius: var(--bs-border-radius-xl);
}

.nsm-settings-dash-quick .nsm-settings-dash-quick-icon,
.nsm-settings-dash-welcome .nsm-settings-dash-quick-icon {
  width: 2.75rem;
  height: 2.75rem;
}

/* Metric grid: responsive inner dividers (Bootstrap lacks border-end-lg-style helpers here) */
.nsm-settings-dash-metrics .nsm-settings-dash-metric-cell {
  border-bottom: 1px solid rgba(var(--bs-secondary-rgb), 0.22);
}
@media (max-width: 991.98px) {
  .nsm-settings-dash-metrics .nsm-settings-dash-metric-cell:nth-child(odd) {
    border-right: 1px solid rgba(var(--bs-secondary-rgb), 0.22);
  }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .nsm-settings-dash-metrics .nsm-settings-dash-metric-cell:not(:nth-child(3n)) {
    border-right: 1px solid rgba(var(--bs-secondary-rgb), 0.22);
  }
}
@media (min-width: 1200px) {
  .nsm-settings-dash-metrics .nsm-settings-dash-metric-cell:not(:nth-child(6n)) {
    border-right: 1px solid rgba(var(--bs-secondary-rgb), 0.22);
  }
}

/* Settings subpages: consistent shell spacing + neo hero / panels */
.nsm-settings-page {
  padding-left: max(0.75rem, env(safe-area-inset-left));
  padding-right: max(0.75rem, env(safe-area-inset-right));
}

.nsm-settings-page > nav.breadcrumb-nsm {
  margin-bottom: 1rem;
}

.nsm-settings-neo-hero__icon {
  width: 2.625rem;
  height: 2.625rem;
}

@media (min-width: 576px) {
  .nsm-settings-neo-hero__icon {
    width: 2.875rem;
    height: 2.875rem;
  }
}

.nsm-settings-neo-panel {
  border-radius: var(--bs-border-radius-xl);
  overflow: hidden;
}

.nsm-interaction-disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.payment-option-card {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: none !important;
}
.payment-option-card:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.32) !important;
  box-shadow: none !important;
}

.bank-details {
  border: 1px solid var(--bs-border-color);
  background: var(--bs-secondary-bg);
}

[data-bs-theme="dark"] .alert-warning {
  background-color: rgba(255, 193, 7, 0.15) !important;
  border-color: rgba(255, 193, 7, 0.3) !important;
}
[data-bs-theme="dark"] .alert-info {
  background-color: rgba(13, 202, 240, 0.15) !important;
  border-color: rgba(13, 202, 240, 0.3) !important;
}
[data-bs-theme="dark"] .bank-details {
  background-color: var(--bs-secondary-bg) !important;
  border-color: var(--bs-border-color) !important;
}

/* ---- Misc utilities ---- */
.nsm-pre-wrap {
  white-space: pre-wrap;
}

/* Activity / comment lines (updates feed, messages) */
.nsm-pre-wrap-lh {
  white-space: pre-wrap;
  line-height: 1.4;
}

/* Narrow icon column in activity rows */
.nsm-feed-icon-col {
  width: 20px;
  text-align: center;
}

/*
 * Initial hide for elements toggled via element.style.display in legacy JS.
 * Not !important, so inline display from JS still wins when shown.
 */
.nsm-js-hidden {
  display: none;
}

.nsm-avatar-edit {
  width: 140px;
  height: 140px;
  object-fit: cover;
}

/* Photo stack on edit-profile: match 9.5rem avatar column (140px cramped button labels). */
.nsm-grid-max-140 {
  max-width: 9.5rem;
  margin-left: auto;
  margin-right: auto;
}

.nsm-maxw-140 {
  max-width: 140px;
}

.nsm-bg-white-10 {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Panels matching Bootstrap tertiary surface (settings, map options, etc.) */
.nsm-bg-body-tertiary {
  background: var(--bs-body-tertiary);
}

/* Updates feed media thumb (functions.php updates_feed_media_thumb_markup) */
.nsm-updates-feed-thumb-wrap {
  width: 56px;
  height: 56px;
}

.nsm-updates-feed-thumb-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  display: block;
}

.nsm-video-play-overlay {
  font-size: 1.25rem;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.85);
  z-index: 2;
}

.nsm-inherit-font {
  font-size: inherit;
  color: inherit;
}

.nsm-object-cover {
  object-fit: cover;
}

/* Incomplete profile banner (blades/complete_profile.php) */
.nsm-incomplete-profile-nag {
  background: linear-gradient(
    135deg,
    rgba(255, 193, 7, 0.1) 0%,
    rgba(255, 152, 0, 0.1) 100%
  );
}

.nsm-letter-spacing-label {
  letter-spacing: 0.06em;
}

.nsm-letter-spacing-index {
  letter-spacing: 0.05em;
}

.nsm-minw-220 {
  min-width: 220px;
}

/* ---- Age verification: liveness page (was inline <style>) ---- */
body.page-liveness .min-vh-100 {
  min-height: 100vh;
}

body.page-liveness .card {
  backdrop-filter: blur(10px);
  background-color: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
}

body.page-liveness .bg-primary.bg-gradient {
  background: linear-gradient(
    135deg,
    var(--bs-primary) 0%,
    var(--bs-primary-dark, #6610f2) 100%
  );
}

body.page-liveness .record-area,
body.page-liveness .upload-area {
  transition: all 0.3s ease;
  cursor: pointer;
}

body.page-liveness .upload-area:hover {
  border-color: var(--bs-success) !important;
  background-color: var(--bs-success-bg-subtle) !important;
}

body.page-liveness .upload-area.border-success {
  border-color: var(--bs-success) !important;
  background-color: var(--bs-success-bg-subtle) !important;
}

body.page-liveness .record-area:hover {
  border-color: var(--bs-success) !important;
  background-color: var(--bs-success-bg-subtle) !important;
}

body.page-liveness .progress {
  border-radius: 3px;
}

body.page-liveness .progress-bar {
  border-radius: 3px;
}

body.page-liveness .btn {
  border-radius: 0.5rem;
  font-weight: 500;
}

body.page-liveness .card-body {
  border-radius: 1rem;
}

body.page-liveness .recording-indicator {
  animation: nsm-pulse 1.5s ease-in-out infinite alternate;
}

@keyframes nsm-pulse {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 1;
  }
}

[data-bs-theme="dark"] body.page-liveness .card {
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] body.page-liveness .upload-area,
[data-bs-theme="dark"] body.page-liveness .record-area {
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] body.page-liveness .upload-area:hover,
[data-bs-theme="dark"] body.page-liveness .record-area:hover {
  background-color: var(--bs-success-bg-subtle) !important;
  border-color: var(--bs-success) !important;
}

@media (max-width: 768px) {
  body.page-liveness .display-6 {
    font-size: 1.75rem;
  }

  body.page-liveness .card-body {
    padding: 2rem !important;
  }

  body.page-liveness .d-flex.gap-3 {
    flex-direction: column;
  }

  body.page-liveness .d-flex.gap-3 .btn {
    width: 100%;
  }
}

/* ---- Age verification: facial (was inline <style>) ---- */
body.page-facial .min-vh-100 {
  min-height: 100vh;
}

body.page-facial .card {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

body.page-facial .bg-primary.bg-gradient {
  background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
}

body.page-facial .camera-preview {
  transition: all 0.3s ease;
  cursor: pointer;
}

body.page-facial .camera-preview:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%) !important;
  border-color: var(--bs-warning) !important;
}

body.page-facial .progress,
body.page-facial .progress-bar {
  border-radius: 3px;
}

body.page-facial .form-check-input:checked {
  background-color: var(--bs-warning);
  border-color: var(--bs-warning);
}

body.page-facial .btn {
  border-radius: 0.5rem;
  font-weight: 500;
}

body.page-facial .card-body {
  border-radius: 1rem;
}

body.page-facial video,
body.page-facial canvas {
  border-radius: 0.75rem;
}

.nsm-facial-video {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: none;
}

.nsm-facial-camera-box {
  width: 100%;
  max-width: 400px;
  height: 300px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px dashed #dee2e6;
}

html[data-bs-theme="dark"] .nsm-facial-camera-box {
  background: linear-gradient(
    135deg,
    var(--bs-secondary-bg) 0%,
    var(--bs-body-bg) 100%
  );
  border-color: var(--bs-border-color);
}

.nsm-facial-capture-img {
  width: 100%;
  max-width: 400px;
  height: auto;
}

@media (max-width: 768px) {
  body.page-facial .display-6 {
    font-size: 1.75rem;
  }

  body.page-facial .card-body {
    padding: 2rem !important;
  }

  body.page-facial .d-flex.gap-3 {
    flex-direction: column;
  }

  body.page-facial .d-flex.gap-3 .btn {
    width: 100%;
  }

  body.page-facial .camera-container {
    width: 100% !important;
  }

  body.page-facial .camera-preview {
    height: 250px !important;
  }
}

/* ---- Age verification: credit-card (was inline <style>) ---- */
body.page-credit-card .min-vh-100 {
  min-height: 100vh;
}

body.page-credit-card .card {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

body.page-credit-card .bg-primary.bg-gradient {
  background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
}

body.page-credit-card .progress,
body.page-credit-card .progress-bar {
  border-radius: 3px;
}

body.page-credit-card .form-check-input:checked {
  background-color: var(--bs-success);
  border-color: var(--bs-success);
}

body.page-credit-card .btn {
  border-radius: 0.5rem;
  font-weight: 500;
}

body.page-credit-card .card-body {
  border-radius: 1rem;
}

body.page-credit-card .input-group-text {
  background-color: var(--bs-light);
  border-color: var(--bs-border-color);
}

body.page-credit-card .form-control:focus,
body.page-credit-card .form-select:focus {
  border-color: var(--bs-success);
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

@media (max-width: 768px) {
  body.page-credit-card .display-6 {
    font-size: 1.75rem;
  }

  body.page-credit-card .card-body {
    padding: 2rem !important;
  }

  body.page-credit-card .d-flex.gap-3 {
    flex-direction: column;
  }

  body.page-credit-card .d-flex.gap-3 .btn {
    width: 100%;
  }
}

/* ---- Age verification shared helpers ---- */
.nsm-mb-step {
  margin-bottom: 2rem !important;
}

.nsm-maxh-300 {
  max-height: 300px;
}

.nsm-progress-h-6 {
  height: 6px;
}

.nsm-progress-h-8 {
  height: 8px;
}

.nsm-spinner-3 {
  width: 3rem;
  height: 3rem;
}

.nsm-text-meta {
  font-size: 0.8rem;
}

.nsm-verify-stepper-track {
  min-height: 4.75rem;
}

.nsm-verify-stepper-track > .nsm-verify-stepper__cell:not(:last-child) {
  border-bottom: 1px solid var(--bs-border-color);
}

@media (min-width: 576px) {
  .nsm-verify-stepper-track > .nsm-verify-stepper__cell:not(:last-child) {
    border-bottom: none;
    border-right: 1px solid var(--bs-border-color);
  }
}

.nsm-verify-stepper__pill {
  border: none;
  background-color: transparent;
  color: var(--bs-secondary-color);
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.nsm-verify-stepper__pill.is-pending {
  opacity: 0.88;
}

.nsm-verify-stepper__pill.is-active {
  background-color: rgba(var(--bs-primary-rgb), 0.14);
  color: var(--bs-primary);
  box-shadow: inset 0 -3px 0 0 rgba(var(--bs-primary-rgb), 0.85);
  opacity: 1;
}

.nsm-verify-stepper__pill.is-done {
  background-color: rgba(var(--bs-success-rgb), 0.08);
  color: var(--bs-success);
  opacity: 1;
}

.nsm-verify-stepper__pill.is-done .nsm-verify-stepper__num {
  font-size: 0;
  line-height: 0;
}

.nsm-verify-stepper__pill.is-done .nsm-verify-stepper__num::before {
  content: "\f00c";
  display: inline-block;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.875rem;
  line-height: 1;
  vertical-align: middle;
}

.nsm-verify-stepper__num {
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

.nsm-verify-stepper__title {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
}

/* ---- Media tags: composer shell + bordered type slot (readable text field) ---- */
.nsm-media-tags-composer {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background-color: var(--bs-secondary-bg);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.nsm-media-tags-composer:focus-within {
  border-color: rgba(var(--bs-primary-rgb), 0.25);
  box-shadow: none;
}

.nsm-media-tags-type-slot {
  display: flex;
  align-items: center;
  align-self: stretch;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-body-bg);
  padding: 0 0.5rem;
  min-height: 2.4rem;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.nsm-media-tags-type-slot:focus-within {
  border-color: rgba(var(--bs-primary-rgb), 0.65);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.18);
}

.nsm-media-tags-chips-flex {
  flex: 1 1 auto;
  min-width: 0;
}

.nsm-media-tags-suggest-wrap {
  flex: 1 1 11rem;
  min-width: min(100%, 9rem);
}

input.nsm-media-tags-inline-input,
.nsm-media-tags-inline-input {
  display: block;
  width: 100%;
  border: 0 !important;
  outline: none;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--bs-body-color);
  caret-color: var(--bs-primary);
  padding: 0.3rem 0.1rem;
  min-height: 2rem;
  font-size: 0.9375rem;
  line-height: 1.4;
}

input.nsm-media-tags-inline-input::placeholder {
  color: var(--bs-secondary-color);
  opacity: 0.95;
}

input.nsm-media-tags-inline-input:focus {
  outline: none;
}

.media-tags-suggest-dropdown {
  max-height: 12rem;
  overflow-y: auto;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-body-bg);
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .media-tags-suggest-dropdown {
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.35);
}

.media-tags-suggest-item {
  cursor: pointer;
}

.media-tags-suggest-item.active,
.media-tags-suggest-item:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.12);
}

[data-bs-theme="dark"] .nsm-media-tags-composer {
  background-color: rgba(255, 255, 255, 0.04);
}

[data-bs-theme="dark"] .nsm-media-tags-type-slot {
  background-color: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.14);
}

/* view-profile and modals */
.nsm-vr-thin {
  width: 2px;
}

.nsm-textarea-report-reason {
  resize: vertical;
  min-height: 120px;
}

.nsm-textarea-no-resize {
  resize: none;
}

.nsm-avatar-32 {
  width: 32px;
  height: 32px;
  object-fit: cover;
}

.nsm-avatar-40 {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.nsm-avatar-50 {
  width: 50px;
  height: 50px;
  object-fit: cover;
}

.nsm-avatar-48 {
  width: 48px;
  height: 48px;
  object-fit: cover;
}

.nsm-avatar-56 {
  width: 56px;
  height: 56px;
  object-fit: cover;
}

/* Homepage / cards */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Site header (templates/header.php) */
.nsm-header-logo {
  height: 40px;
  width: auto;
}

/*
 * Site chrome stacking (member pages):
 * staff bar (1060) > header dropdowns (1055) > main nav (1050) > in-page sticky panels.
 */
#staff-admin-bar:not([data-admin-layout]) {
  z-index: 1060;
}

body > header {
  position: relative;
  z-index: 1055;
}

#mainNavBar,
#mobileNav {
  z-index: 1050;
}

body > header .dropdown-menu.show {
  z-index: 1055;
}

.nsm-badge-xs {
  font-size: 0.65rem;
}

.nsm-circle-36 {
  width: 36px;
  height: 36px;
}

.nsm-z-10 {
  z-index: 10;
}

.nsm-nav-pill-minw {
  min-width: 220px;
  color: #ffffff !important;
}

/* Compatibility match bars (dynamic widths via --nsm-w / --nsm-l) */
.nsm-compat-track {
  height: 12px;
}
.nsm-compat-fill {
  position: absolute;
  top: 0;
  height: 100%;
}
.nsm-compat-fill-w {
  width: var(--nsm-w);
}
.nsm-compat-fill-left {
  left: var(--nsm-l);
}
.nsm-compat-endcap {
  position: absolute;
  top: 0;
  width: 4px;
  height: 100%;
  left: var(--nsm-l);
  transform: translateX(-50%);
  z-index: 10;
}

/* Notifications dropdown (header): fixed width, wrapped copy */
.notifications-dropdown.notification-dropdown {
  max-width: 400px;
  width: min(100vw - 2rem, 400px);
}

/*
 * Tablet + mobile (≤767px): same behaviour as the former ≤575px fixes.
 * Toggles use data-bs-display="static" so menus follow dropdown-menu-end + these rules
 * instead of Popper drifting the panel at mid widths.
 */
@media (max-width: 767.98px) {
  .notifications-dropdown.notification-dropdown,
  .nsm-header-account-dropdown > .dropdown-menu {
    width: min(100vw - 1.5rem, 400px) !important;
    max-width: min(100vw - 1.5rem, 400px) !important;
  }

  .notifications-dropdown-wrapper,
  .nsm-header-account-dropdown {
    position: relative;
  }

  .notifications-dropdown-wrapper > .dropdown-menu.dropdown-menu-end,
  .nsm-header-account-dropdown > .dropdown-menu.dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
    margin-top: 0.35rem !important;
  }

  .nsm-header-account-dropdown .header-capsule-profile.dropdown-toggle {
    overflow: visible;
  }
}

.notifications-list .dropdown-item {
  white-space: normal;
}

.notifications-list .notification-item-body {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.notifications-list .notification-action-link {
  color: var(--bs-link-color);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.notifications-list .notification-action-link:hover {
  color: var(--bs-link-hover-color);
}

.notifications-list .notification-action-link__icon {
  display: inline-block;
  margin-left: 0.35rem;
  opacity: 0.85;
  vertical-align: 0.05em;
}

/* Homepage: unread partner health advisory banner */
.homepage-partner-health-banner__icon-wrap {
  width: 44px;
  height: 44px;
}

[data-bs-theme="dark"] .homepage-partner-health-banner {
  --bs-alert-bg: rgba(220, 53, 69, 0.15);
  --bs-alert-border-color: rgba(220, 53, 69, 0.45);
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .homepage-partner-health-banner .text-body-secondary {
  color: var(--bs-secondary-color) !important;
}

/* Cookie consent banner (see templates/header.php, assets/js/cookie-consent.js) */
.nsm-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1080;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nsm-cookie-banner[hidden] {
  display: none !important;
}

.nsm-cookie-banner__inner {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Neo Scrollview: homepage dashboard widgets (.nsm-homepage-widget-scroll), kinks, advanced search filters ---- */
.neo-scrollview {
  max-height: 280px;
  /* scroll: reserve vertical scrollbar so it stays visible (not overlay-only) where supported */
  overflow-y: scroll;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(var(--bs-secondary-rgb), 0.55) rgba(var(--bs-secondary-rgb), 0.12);
}

.neo-scrollview.nsm-edit-profile-kinks-tight {
  max-height: 220px;
}

.neo-scrollview.nsm-homepage-widget-scroll {
  max-height: 300px;
  /* Classic scrollbar lane; styled WebKit bars avoid macOS overlay-only hiding */
  overflow-y: scroll;
  overflow-x: hidden;
  touch-action: pan-y;
  overscroll-behavior-x: none;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: rgba(var(--bs-secondary-rgb), 0.65) rgba(var(--bs-secondary-rgb), 0.22);
}

/* WebKit: styled scrollbar renders as a persistent track (not macOS overlay-only) */
.neo-scrollview::-webkit-scrollbar {
  width: 10px;
}

.neo-scrollview::-webkit-scrollbar-track {
  background: rgba(var(--bs-secondary-rgb), 0.12);
  border-radius: 5px;
}

.neo-scrollview::-webkit-scrollbar-thumb {
  background: rgba(var(--bs-secondary-rgb), 0.45);
  border-radius: 5px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.neo-scrollview::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--bs-secondary-rgb), 0.65);
  background-clip: padding-box;
}

/* Homepage: stronger WebKit styling so scrollbars stay visible (incl. macOS Safari/Chrome) */
.neo-scrollview.nsm-homepage-widget-scroll::-webkit-scrollbar {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
}

.neo-scrollview.nsm-homepage-widget-scroll::-webkit-scrollbar-track {
  background: rgba(var(--bs-secondary-rgb), 0.22);
  border-radius: 6px;
}

.neo-scrollview.nsm-homepage-widget-scroll::-webkit-scrollbar-thumb {
  background: rgba(var(--bs-secondary-rgb), 0.52);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
  min-height: 48px;
}

.neo-scrollview.nsm-homepage-widget-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--bs-secondary-rgb), 0.72);
  background-clip: padding-box;
}

.neo-scrollview.nsm-homepage-widget-scroll::-webkit-scrollbar-corner {
  background: transparent;
}

/* Homepage dashboard: edge fades when list overflows vertically */
.nsm-homepage-scroll-mask {
  position: relative;
  display: block;
}

.nsm-homepage-scroll-mask::before,
.nsm-homepage-scroll-mask::after {
  content: '';
  position: absolute;
  left: 0;
  right: 12px;
  height: 1.25rem;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nsm-homepage-scroll-mask::before {
  top: 0;
  background: linear-gradient(to bottom, var(--bs-body-bg), transparent);
}

.nsm-homepage-scroll-mask::after {
  bottom: 0;
  background: linear-gradient(to top, var(--bs-body-bg), transparent);
}

.nsm-homepage-scroll-mask.nsm-scroll-mask--fade-top::before {
  opacity: 1;
}

.nsm-homepage-scroll-mask.nsm-scroll-mask--fade-bottom::after {
  opacity: 1;
}

.advanced-filter-multi-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--bs-border-color);
  background: rgba(var(--bs-secondary-rgb), 0.06);
  cursor: pointer;
  margin: 0;
  min-height: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.advanced-filter-multi-tile:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.35);
}

.advanced-filter-multi-tile-label {
  font-size: 0.9rem;
  line-height: 1.3;
  padding-top: 0.08rem;
}

.advanced-filter-multi-tile:has(.form-check-input:checked) {
  border-color: rgba(var(--bs-primary-rgb), 0.55);
  background: rgba(var(--bs-primary-rgb), 0.08);
  box-shadow: inset 0 0 0 1px rgba(var(--bs-primary-rgb), 0.1);
}

.advanced-filter-chip-grid .advanced-filter-multi-tile .form-check-input {
  margin-top: 0.2rem;
}

/* Contact page — Neo flat shells (no drop shadows) */
.nsm-neo-contact-panel {
  border-radius: 1rem;
  background: var(--bs-body-tertiary);
  border: 1px solid var(--bs-border-color);
  box-shadow: none !important;
}

.nsm-neo-contact-panel-head {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--bs-border-color);
  font-weight: 600;
  font-size: 0.9375rem;
}

.nsm-contact-neo-channel-row {
  transition: background-color 0.15s ease;
  outline: none;
}

@media (hover: hover) and (pointer: fine) {
  .nsm-contact-neo-channel-row:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.06);
  }
}

.nsm-contact-neo-channel-row:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: -2px;
  position: relative;
  z-index: 1;
}

.nsm-contact-neo-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-primary);
}

.nsm-neo-contact-eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
}

@media (prefers-reduced-motion: reduce) {
  .nsm-contact-neo-channel-row {
    transition: none;
  }
}

/* Settings → Account: contact verification PIN (neo shell, sectioned) */
.nsm-neo-support-pin-panel {
  border-radius: 1rem;
  background: var(--bs-body-tertiary);
  border: 1px solid var(--bs-border-color);
  box-shadow: none !important;
  overflow: hidden;
}

.nsm-neo-support-pin-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--bs-border-color);
}

@media (min-width: 768px) {
  .nsm-neo-support-pin-panel__head {
    padding: 1.125rem 1.5rem;
  }
}

.nsm-neo-support-pin-panel__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
  font-size: 1.1rem;
}

.nsm-neo-support-pin-panel__channels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nsm-neo-support-pin-channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color);
  background: rgba(var(--bs-body-bg-rgb), 0.45);
  color: var(--bs-secondary-color);
}

.nsm-neo-support-pin-channel-pill__ic {
  font-size: 0.8125rem;
  line-height: 1;
  opacity: 0.92;
}

.nsm-neo-support-pin-panel__body {
  padding: 1rem 1.25rem 1.25rem;
}

@media (min-width: 768px) {
  .nsm-neo-support-pin-panel__body {
    padding: 1.25rem 1.5rem 1.5rem;
  }
}

/* No empty strip while waiting for support to arm the PIN */
.nsm-neo-support-pin-panel__body:has(#nsmSupportPinLiveWrap.d-none):has(#nsmSupportPinAckBanner.d-none) {
  display: none;
}

.nsm-neo-support-pin-live-well {
  border-radius: 0.75rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--bs-border-color);
  background-color: var(--bs-body-bg);
}

/* Active channel while PIN is live (matches staff selection in Firestore session.channel) */
.nsm-support-pin-channel-strip {
  --nsm-sp-ch-br: var(--bs-border-color);
  --nsm-sp-ch-bg: var(--bs-body-bg);
  --nsm-sp-ch-sh: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --nsm-sp-ch-badge-bg: rgba(var(--bs-secondary-rgb), 0.15);
  --nsm-sp-ch-badge-fg: var(--bs-secondary-color);
  --nsm-sp-ch-badge-br: rgba(var(--bs-secondary-rgb), 0.22);

  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid var(--nsm-sp-ch-br);
  background: var(--nsm-sp-ch-bg);
  box-shadow: var(--nsm-sp-ch-sh);
}

.nsm-support-pin-channel-strip__badge {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--nsm-sp-ch-badge-bg);
  color: var(--nsm-sp-ch-badge-fg);
  border: 1px solid var(--nsm-sp-ch-badge-br);
}

.nsm-support-pin-channel-strip__ic {
  font-size: 1.15rem;
  line-height: 1;
}

.nsm-support-pin-channel-strip__title {
  font-weight: 650;
  font-size: 0.9375rem;
  letter-spacing: -0.012em;
  line-height: 1.25;
  margin-bottom: 0.2rem;
  color: var(--bs-emphasis-color);
}

.nsm-support-pin-channel-strip__sub {
  color: var(--bs-secondary-color);
  line-height: 1.45;
}

.nsm-support-pin-channel-strip--landline {
  --nsm-sp-ch-br: rgba(var(--bs-primary-rgb), 0.3);
  --nsm-sp-ch-bg: linear-gradient(
    142deg,
    rgba(var(--bs-primary-rgb), 0.1) 0%,
    rgba(var(--bs-primary-rgb), 0.03) 52%,
    transparent 100%
  );
  --nsm-sp-ch-badge-bg: rgba(var(--bs-primary-rgb), 0.16);
  --nsm-sp-ch-badge-fg: var(--bs-primary);
  --nsm-sp-ch-badge-br: rgba(var(--bs-primary-rgb), 0.26);
}

.nsm-support-pin-channel-strip--whatsapp {
  --nsm-sp-ch-br: rgba(37, 211, 102, 0.38);
  --nsm-sp-ch-bg: linear-gradient(
    142deg,
    rgba(37, 211, 102, 0.13) 0%,
    rgba(37, 211, 102, 0.04) 55%,
    transparent 100%
  );
  --nsm-sp-ch-badge-bg: rgba(37, 211, 102, 0.2);
  --nsm-sp-ch-badge-fg: #128c7e;
  --nsm-sp-ch-badge-br: rgba(37, 211, 102, 0.36);
}

[data-bs-theme='dark'] .nsm-support-pin-channel-strip--whatsapp {
  --nsm-sp-ch-badge-fg: #5fe89f;
}

.nsm-support-pin-channel-strip--x {
  --nsm-sp-ch-br: rgba(15, 20, 25, 0.14);
  --nsm-sp-ch-bg: linear-gradient(
    142deg,
    rgba(15, 20, 25, 0.07) 0%,
    rgba(15, 20, 25, 0.025) 100%
  );
  --nsm-sp-ch-badge-bg: rgba(15, 20, 25, 0.9);
  --nsm-sp-ch-badge-fg: #f7f8f8;
  --nsm-sp-ch-badge-br: rgba(15, 20, 25, 0.35);
}

[data-bs-theme='dark'] .nsm-support-pin-channel-strip--x {
  --nsm-sp-ch-br: rgba(231, 233, 234, 0.16);
  --nsm-sp-ch-bg: linear-gradient(
    142deg,
    rgba(231, 233, 234, 0.07) 0%,
    rgba(231, 233, 234, 0.02) 100%
  );
  --nsm-sp-ch-badge-bg: rgba(231, 233, 234, 0.12);
  --nsm-sp-ch-badge-fg: #e7e9ea;
  --nsm-sp-ch-badge-br: rgba(231, 233, 234, 0.22);
}

.nsm-neo-support-pin-ack {
  border-radius: 0.75rem;
  padding: 1rem 1.125rem;
  border: 1px solid rgba(var(--bs-success-rgb), 0.35);
  background: rgba(var(--bs-success-rgb), 0.08);
  color: var(--bs-body-color);
}

.nsm-neo-support-pin-ack__count {
  color: rgba(var(--bs-success-rgb), 0.95);
  opacity: 0.95;
}

/* Investor billing email template preview: frame stays on white in dark mode */
.nsm-investor-email-preview-frame {
  background: #fff;
  color-scheme: light;
}

[data-bs-theme="dark"] .nsm-investor-email-preview-frame {
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.2);
}

.nsm-investor-email-preview-frame iframe {
  background: #fff;
}

/* Subject row: fixed colours so contrast stays correct on white while site is in dark mode */
.nsm-investor-email-preview-frame .nsm-investor-email-preview-subject-label {
  color: #6c757d;
  font-size: 0.875rem;
}

.nsm-investor-email-preview-frame .nsm-investor-email-preview-subject-text {
  color: #212529;
  font-size: 0.875rem;
}

.nsm-investor-email-preview-inner {
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
}

.nsm-investor-billing-preview-viewport {
  border: 1px solid rgba(0, 0, 0, 0.1);
  max-height: 680px;
  transition: max-height 0.42s ease;
}

.nsm-investor-billing-preview-viewport .nsm-investor-email-preview-inner {
  border: none;
}

.nsm-investor-billing-preview-viewport .nsm-investor-billing-preview-loading {
  display: none;
}

.nsm-investor-billing-preview-viewport.is-collapsed-loading {
  max-height: 5.75rem;
}

.nsm-investor-billing-preview-viewport.is-collapsed-loading .nsm-investor-billing-preview-loading {
  display: flex;
}

.nsm-investor-billing-preview-viewport.is-collapsed-loading .nsm-investor-email-preview-inner {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .nsm-investor-billing-preview-viewport {
    transition: none;
  }
}

/* Settings → Account: live support PIN (warn pulse last ~7s before refresh) */
.nsm-support-pin-display {
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nsm-support-pin-display.nsm-support-pin-display--warn {
  animation: nsm-support-pin-warn-pulse 0.75s ease-in-out infinite;
}

@keyframes nsm-support-pin-warn-pulse {
  0%,
  100% {
    background-color: transparent;
    color: inherit;
    box-shadow: none;
  }

  50% {
    background-color: rgba(220, 53, 69, 0.92);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nsm-support-pin-display.nsm-support-pin-display--warn {
    animation: none;
    background-color: rgba(220, 53, 69, 0.85);
    color: #fff;
  }
}

/* reCAPTCHA Enterprise: hide floating badge when required legal notice is shown (see footer). */
.grecaptcha-badge {
  visibility: hidden;
}

.nsm-recaptcha-notice {
  font-size: 0.6875rem;
  opacity: 0.85;
}

/* Site admins only: WAN IP differs from sandbox allowlist value (Neo attention / danger) */
.nsm-neo-ccbill-ip-alert {
  position: sticky;
  top: 0;
  z-index: 1070;
  margin: 0;
  background: var(--bs-body-bg);
  border-bottom: 1px solid rgba(var(--bs-danger-rgb), 0.22);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.nsm-neo-ccbill-ip-alert__surface {
  background: linear-gradient(
    135deg,
    rgba(var(--bs-danger-rgb), 0.09) 0%,
    var(--bs-danger-bg-subtle) 48%,
    var(--bs-body-bg) 100%
  );
  border: 1px solid rgba(var(--bs-danger-rgb), 0.28);
  border-left-width: 4px;
  border-left-color: var(--bs-danger);
}

.nsm-neo-ccbill-ip-alert__title {
  color: var(--bs-danger-text-emphasis);
  letter-spacing: 0.01em;
}

.nsm-neo-ccbill-ip-alert__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--bs-danger-text-emphasis);
  background: rgba(var(--bs-danger-rgb), 0.14);
  border: 1px solid rgba(var(--bs-danger-rgb), 0.25);
}

[data-bs-theme='dark'] .nsm-neo-ccbill-ip-alert__surface {
  background: linear-gradient(
    135deg,
    rgba(var(--bs-danger-rgb), 0.16) 0%,
    rgba(var(--bs-danger-rgb), 0.08) 42%,
    var(--bs-body-bg) 100%
  );
  border-color: rgba(var(--bs-danger-rgb), 0.4);
}

[data-bs-theme='dark'] .nsm-neo-ccbill-ip-alert__icon {
  background: rgba(var(--bs-danger-rgb), 0.22);
  border-color: rgba(var(--bs-danger-rgb), 0.35);
}

@media (prefers-reduced-motion: no-preference) {
  .nsm-neo-ccbill-ip-alert__surface {
    animation: nsm-neo-ccbill-ip-alert-in 0.35s ease-out;
  }
}

@keyframes nsm-neo-ccbill-ip-alert-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nsm-neo-ccbill-ip-alert__surface {
    animation: none;
  }
}

/* Premium page: FAQ column beside checkout (lg+) */
@media (min-width: 992px) {
  .nsm-premium-page-faq-sidebar {
    position: sticky;
    top: 0.75rem;
  }
}

/* Premium FAQ: subdued Neo sidebar (muted chrome, icons, softer than billing column) */
.nsm-premium-faq {
  background: var(--bs-body-bg);
  box-shadow: none;
}

[data-bs-theme='dark'] .nsm-premium-faq {
  background: rgba(255, 255, 255, 0.02);
}

.nsm-premium-faq .nsm-premium-faq__accordion {
  padding-top: 0.15rem;
}

.nsm-premium-faq__eyebrow {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  opacity: 0.92;
}

.nsm-premium-faq .nsm-premium-faq__header {
  margin-bottom: 0;
}

.nsm-premium-faq .nsm-premium-faq__trigger {
  padding: 0.5rem 0.85rem;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--bs-secondary);
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  align-items: flex-start;
}

.nsm-premium-faq .nsm-premium-faq__trigger.collapsed:hover {
  color: var(--bs-body-color);
  background: rgba(var(--bs-secondary-rgb), 0.06) !important;
}

.nsm-premium-faq .nsm-premium-faq__trigger:not(.collapsed) {
  color: var(--bs-body-color);
  background: rgba(var(--bs-primary-rgb), 0.06) !important;
}

.nsm-premium-faq .nsm-premium-faq__ico {
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-size: 0.82rem;
  opacity: 0.38;
}

.nsm-premium-faq .nsm-premium-faq__trigger:not(.collapsed) .nsm-premium-faq__ico {
  opacity: 0.52;
}

.nsm-premium-faq .nsm-premium-faq__q {
  flex: 1 1 auto;
  text-align: left;
}

.nsm-premium-faq .nsm-premium-faq__trigger::after {
  flex-shrink: 0;
  width: 0.65rem;
  height: 0.65rem;
  margin-left: auto;
  margin-top: 0.2rem;
  background-size: 0.65rem;
  opacity: 0.32;
}

.nsm-premium-faq .nsm-premium-faq__answer {
  padding: 0.85rem 0.85rem 1.05rem calc(1rem + 0.85rem + 0.5rem);
  font-size: 0.8125rem;
  line-height: 1.52;
  color: var(--bs-secondary-color);
  border-top: 1px dashed rgba(var(--bs-secondary-rgb), 0.22);
}

.nsm-premium-faq .nsm-premium-faq__accordion .accordion-item + .accordion-item {
  border-top: 1px solid rgba(var(--bs-secondary-rgb), 0.12) !important;
}

/* Member Settings hub cards */
.nsm-settings-hub-card {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

a:hover .nsm-settings-hub-card {
  transform: translateY(-2px);
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.08);
}

/* ---- OAuth provider buttons (login / signup) ---- */
.btn-nsm-oauth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  font-weight: 600;
  border-width: 1px;
  border-style: solid;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-nsm-oauth:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

.btn-nsm-oauth:disabled {
  opacity: 0.72;
}

.btn-nsm-oauth.nsm-oauth-suggested {
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-success-rgb), 0.35);
  border-color: var(--bs-success);
}

.btn-nsm-oauth.nsm-oauth-pending {
  opacity: 0.88;
  pointer-events: none;
}

.nsm-auth-oauth-pending input:not([type="hidden"]),
.nsm-auth-oauth-pending button[type="submit"] {
  opacity: 0.72;
}

#loginOAuthMessage:empty,
#loginEmailMessage:empty,
#signupOAuthMessage:empty,
#signupEmailMessage:empty {
  margin-bottom: 0 !important;
}

.btn-nsm-oauth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  font-size: 1.15rem;
  line-height: 1;
}

.btn-nsm-oauth-icon-google {
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z'/%3E%3Cpath fill='%23FBBC05' d='M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3C/svg%3E");
}

.btn-nsm-oauth-google {
  background-color: #fff;
  border-color: #747775;
  color: #1f1f1f;
}

.btn-nsm-oauth-google:hover,
.btn-nsm-oauth-google:focus {
  background-color: #f7f8f8;
  border-color: #747775;
  color: #1f1f1f;
}

.btn-nsm-oauth-facebook {
  background-color: #1877f2;
  border-color: #1877f2;
  color: #fff;
}

.btn-nsm-oauth-facebook:hover,
.btn-nsm-oauth-facebook:focus {
  background-color: #166fe5;
  border-color: #166fe5;
  color: #fff;
}

.btn-nsm-oauth-facebook:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(24, 119, 242, 0.35);
}

[data-bs-theme='dark'] .btn-nsm-oauth-google {
  background-color: #131314;
  border-color: #8e918f;
  color: #e3e3e3;
}

[data-bs-theme='dark'] .btn-nsm-oauth-google:hover,
[data-bs-theme='dark'] .btn-nsm-oauth-google:focus {
  background-color: #1e1f20;
  border-color: #8e918f;
  color: #e3e3e3;
}

.nsm-oauth-badge {
  font-weight: 600;
  border: 1px solid transparent;
}

.nsm-oauth-badge-google {
  background-color: #fff;
  border-color: #747775;
  color: #1f1f1f;
}

.nsm-oauth-badge-facebook {
  background-color: #1877f2;
  border-color: #1877f2;
  color: #fff;
}

[data-bs-theme='dark'] .nsm-oauth-badge-google {
  background-color: #131314;
  border-color: #8e918f;
  color: #e3e3e3;
}
