/* =====================================================
   CONTACT MODAL
   ===================================================== */

html.nx-modal-lock,
html.nx-modal-lock body {
  overflow: hidden;
}

/* Overlay */
.nx-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}
.nx-modal.is-open {
  display: block;
}

.nx-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.nx-modal-panel {
  position: absolute;
  inset: 0;
}

/* Fullscreen Panel */
.nx-modal-stage {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
}

/* Card - full viewport */
.nx-modal-card {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 30, 30, 0.75);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Theme Adaptive Colors */
.nx-modal.is-light .nx-modal-card {
  background: rgba(245, 245, 245, 0.75);
  color: #000;
}
.nx-modal.is-dark .nx-modal-card {
  background: rgba(30, 30, 30, 0.75);
  color: #fff;
}

/* Background Watermark */
.nx-cardBg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
}
.nx-cardBgImg {
  width: min(980px, 88vw);
  opacity: 0.1;
  filter: blur(2px);
  transform: translateY(10px);
}

/* Close Button */
.nx-closeBtn {
  position: absolute;
  top: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  border: 0;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.4s ease, transform 0.2s ease, filter 0.4s ease;
}
.nx-closeBtn:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}
.nx-modal.is-dark .nx-closeBtn {
  background: rgba(255, 255, 255, 0.15);
  filter: none;
}
.nx-modal.is-dark .nx-closeBtn img {
  filter: invert(1);
}
.nx-closeBtn img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Content Area */
.nx-cardInner {
  position: relative;
  z-index: 2;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 100px 90px; /* Standard desktop padding */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 0; /* Allow container to shrink */
}

/* Screens */
.nx-screen {
  display: none;
  width: 100%;
  animation: nxFadeIn 0.4s ease forwards;
}
@keyframes nxFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.nx-screen.is-active {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Layout blocks */
.nx-leftBlock {
  width: 560px;
  max-width: 100%;
}
.nx-leftBlockWide {
  width: 900px;
  max-width: 100%;
}

.nx-screen.is-active > .nx-leftBlock,
.nx-screen.is-active > .nx-leftBlockWide,
.nx-screen.is-active > .nx-successBlock {
  margin-left: 0;
}

/* Form Fields */
.nx-field {
  margin-bottom: 22px;
}
.nx-labelRow {
  margin-bottom: 6px;
}
.nx-label {
  font-size: var(--font-size-sm);
  color: #000;
  transition: color 0.4s ease;
}
.nx-modal.is-dark .nx-label {
  color: #fff;
}
.nx-labelMuted {
  color: #666;
  transition: color 0.4s ease;
}
.nx-modal.is-dark .nx-labelMuted {
  color: #aaa;
}

.nx-inputLine {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: var(--font-size-sm);
  color: #000;
  padding: 2px 0 8px 0;
  transition: color 0.4s ease;
}
.nx-modal.is-dark .nx-inputLine {
  color: #fff;
}

.nx-inputLine::placeholder {
  color: #999;
  font-size: var(--font-size-sm);
}

.nx-line {
  height: 2px;
  width: 100%;
  background: rgba(0, 0, 0, 1);
  transition: background 0.4s ease;
}
.nx-modal.is-dark .nx-line {
  background: rgba(255, 255, 255, 1);
}
.nx-lineStrong {
  height: 2px;
  background: rgba(0, 0, 0, 1);
  transition: background 0.4s ease;
}
.nx-modal.is-dark .nx-lineStrong {
  background: rgba(255, 255, 255, 1);
}

/* Phone grid */
.nx-phoneGrid {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 14px;
  align-items: end;
}

.nx-prefixWrap {
  position: relative;
  max-width: 50px;
}
.nx-prefixSelect {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: #000;
  padding: 2px 26px 8px 0;
  cursor: pointer;
  appearance: none;
  transition: color 0.4s ease;
}
.nx-modal.is-dark .nx-prefixSelect {
  color: #fff;
}

.nx-prefixChevron {
  position: absolute;
  right: 6px;
  top: 40%;
  width: 8px;
  height: 8px;
  transform: translateY(-50%) rotate(45deg);
  border-right: 2px solid #333;
  border-bottom: 2px solid #333;
  pointer-events: none;
  transition: border-color 0.4s ease;
}
.nx-modal.is-dark .nx-prefixChevron {
  border-color: #fff;
}

/* Pills */
.nx-group {
  margin-bottom: 18px;
}
.nx-groupTitle {
  font-size: var(--font-size-sm);
  color: rgba(0, 0, 0, 0.65);
  margin-bottom: 10px;
}
.nx-groupLine {
  height: 1px;
  width: 100%;
  background: rgba(0, 0, 0, 0.1);
  margin-top: 14px;
}

.nx-pillRow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.nx-pill {
  border: 0;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: var(--font-size-sm);
  color: rgba(0, 0, 0, 0.85);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.4s ease, color 0.4s ease;
}
.nx-modal.is-dark .nx-pill {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}
.nx-pillCheck {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  position: relative;
  flex: 0 0 16px;
  transition: border-color 0.4s ease;
}
.nx-modal.is-dark .nx-pillCheck {
  border-color: rgba(255, 255, 255, 0.4);
}
.nx-pill.is-selected {
  background: rgba(0, 0, 0, 0.1);
}
.nx-modal.is-dark .nx-pill.is-selected {
  background: rgba(255, 255, 255, 0.2);
}
.nx-pill.is-selected .nx-pillCheck::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.75);
}
.nx-modal.is-dark .nx-pill.is-selected .nx-pillCheck::after {
  background: rgba(255, 255, 255, 0.9);
}

/* Step Footer (Dynamic) */
.nx-stepFooter {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Footer Fixed Bottom (Breadcrumbs & Logo only) */
.nx-cardFooter {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 90px 44px 90px;
  background: transparent;
  flex-shrink: 0;
}

.nx-footerLeft {
  display: none; /* Navigation moved to steps */
}
.nx-footerRight {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 24px;
  font-size: var(--font-size-sm) !important;
}

.nx-footerImg {
  height: 24px;
  width: auto;
  transition: filter 0.4s ease;
}
.nx-modal.is-dark .nx-footerImg {
  filter: invert(1);
}

.nx-navBtn {
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: #000;
  padding: 12px 0;
  transition: color 0.4s ease;
}
.nx-modal.is-dark .nx-navBtn {
  color: rgba(255, 255, 255, 0.85);
}
.nx-navArrow {
  font-size: var(--font-size-sm);
  line-height: 1;
}
.nx-navText {
  font-size: var(--font-size-sm);
}

.nx-ctaBtn {
  border: 0;
  cursor: pointer;
  background: #e35b2f;
  color: #fff;
  font-size: var(--font-size-sm);
  font-weight: 300;
  padding: 14px 32px;
  border-radius: 12px;
  transition: opacity 0.2s, transform 0.2s;
}
.nx-ctaBtn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Breadcrumb */
.nx-breadcrumb {
  font-size: 11px;
  white-space: nowrap;
  color: rgba(0, 0, 0, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nx-bcSep {
  opacity: 0.6;
}
.nx-bc.active {
  color: rgba(0, 0, 0, 0.75);
}
.nx-modal.is-dark .nx-bc.active {
  color: rgba(255, 255, 255, 0.9);
}
.nx-bc {
  color: rgba(0, 0, 0, 0.35);
  transition: color 0.4s ease;
}
.nx-modal.is-dark .nx-bc {
  color: rgba(255, 255, 255, 0.4);
}

/* Success State */
.nx-successBlock {
  max-width: 100%;
}
.nx-successTitle {
  font-family: "BPdots", monospace !important;
  font-weight: 700;
  font-size: 160px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: rgba(0, 0, 0, 0.95);
  transition: color 0.4s ease;
}
.nx-modal.is-dark .nx-successTitle {
  color: #fff;
}
.nx-successSub {
  margin-top: 12px;
  font-size: var(--font-size-lg);
  color: rgba(0, 0, 0, 0.85);
  transition: color 0.4s ease;
}
.nx-modal.is-dark .nx-successSub {
  color: rgba(255, 255, 255, 0.9);
}

/* Errors & Loading */
.nx-fieldError {
  display: none;
  font-size: 11px;
  color: #e35b2f;
  margin-top: 6px;
  font-weight: 400;
}
.nx-fieldError.is-visible {
  display: block;
}

.nx-error {
  display: none;
  position: absolute;
  left: 90px;
  bottom: 18px;
  z-index: 6;
  font-size: 12px;
  color: #c23;
}
.nx-error.is-visible {
  display: block;
}

/* Toast Notification (Snackbar) */
.nx-toast {
  position: absolute;
  top: 30px;
  right: 30px;
  z-index: 1000;
  background: #e35b2f;
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: var(--font-size-sm);
  font-weight: 400;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.nx-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.nx-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  margin-left: 10px;
  vertical-align: middle;
}
.is-loading .nx-spinner {
  display: inline-block;
}

/* EXIT button */
.nx-exitOnly {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .nx-cardInner {
    padding: 80px 60px;
  }
  .nx-cardFooter {
    padding: 0 60px 40px 60px;
  }
}

@media (max-width: 768px) {
  .nx-closeBtn {
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    padding: 10px;
  }
  .nx-cardInner {
    padding: 60px 0;
    justify-content: flex-start;
    align-items: center;
    padding-top: 100px;
  }
  .nx-screen {
    width: 80vw;
  }
  .nx-cardFooter {
    padding: 24px;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 32px;
  }
  .nx-footerRight {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .nx-breadcrumb {
    font-size: 10px;
  }
  .nx-successTitle {
    font-size: 80px;
  }
  .nx-leftBlock,
  .nx-leftBlockWide {
    width: 100%;
  }
  .nx-stepFooter {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .nx-ctaBtn {
    width: 100%;
    text-align: center;
  }
  .nx-toast {
    top: auto;
    bottom: 20px;
    right: 20px;
    left: 20px;
    text-align: center;
    transform: translateY(20px);
  }
  .nx-toast.is-visible {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .nx-successTitle {
    font-size: 56px;
  }
  .nx-breadcrumb {
    display: none; /* Hide on very small screens to save space */
  }
}

.nx-srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
