/**
 * Nexus Extension – Overrides (load after custom.css to beat WHMCS/theme specificity)
 * Moved from header.tpl <style> block — do not add inline <style> in TPLs.
 */

/* Kill WHMCS brand background on body */
html body,
html body.primary-bg-color,
body.primary-bg-color,
body.nx-light,
body.nx-light.primary-bg-color,
html[data-theme="light"] body,
html[data-theme="light"] body.primary-bg-color {
  background: #f8fafc !important;
  background-color: #f8fafc !important;
  color: #0f172a !important;
}
body.nx-dark,
body.nx-dark.primary-bg-color,
body[data-theme="dark"],
body[data-theme="dark"].primary-bg-color,
html[data-theme="dark"] body,
html[data-theme="dark"] body.primary-bg-color {
  background: #0a0f1d !important;
  background-color: #0a0f1d !important;
  color: #f1f5f9 !important;
}

/* Kill WHMCS .primary-bg-color on non-body elements */
*:not(body).primary-bg-color:not(.btn-primary):not(.btn) {
  background: transparent !important;
  background-color: transparent !important;
}

/* WHMCS header/navbar — remove all WHMCS styling */
.header,
#header,
.header .navbar,
.header .main-navbar-wrapper,
.main-navbar-wrapper,
.navbar-default,
.navbar-light {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

header.header,
header#header {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Ensure .nx-pub-nav shows correctly */
.nx-pub-nav {
  display: block !important;
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
html[data-theme="dark"] .nx-pub-nav,
body.nx-dark .nx-pub-nav {
  background: rgba(10, 15, 29, 0.8) !important;
  border-bottom-color: #1e293b !important;
}
.nx-pub-links a {
  color: #334155 !important;
}
html[data-theme="dark"] .nx-pub-links a,
body.nx-dark .nx-pub-links a {
  color: #cbd5e1 !important;
}
.nx-pub-links a:hover {
  color: #135bec !important;
}
.nx-pub-support-link {
  color: #334155 !important;
}
html[data-theme="dark"] .nx-pub-support-link,
body.nx-dark .nx-pub-support-link {
  color: #cbd5e1 !important;
}

/* Domain search input */
.nx-domain-search .nx-search-field input {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .nx-domain-search .nx-search-field input,
body.nx-dark .nx-domain-search .nx-search-field input {
  background-color: rgba(15, 23, 42, 0.5) !important;
  color: #f1f5f9 !important;
  border-color: rgba(51, 65, 85, 0.5) !important;
}

/* Hero with background image + gradient overlay */
.nx-hero-enhanced {
  background-color: #1e3a8a !important;
  background-image: url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1920&h=1080&fit=crop") !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
.nx-hero-enhanced::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(
    135deg,
    rgba(19, 91, 236, 0.75) 0%,
    rgba(88, 28, 135, 0.7) 50%,
    rgba(30, 58, 138, 0.8) 100%
  ) !important;
  z-index: 0 !important;
  pointer-events: none !important;
}
.nx-hero-enhanced .container,
.nx-hero-enhanced h1,
.nx-hero-enhanced p {
  position: relative !important;
  z-index: 1 !important;
}
.nx-hero-enhanced h1,
.nx-hero-enhanced h1 .nx-accent {
  color: #fff !important;
}
.nx-hero-enhanced h1 .nx-accent {
  color: #c7d2fe !important;
}
.nx-hero-enhanced p {
  color: rgba(255, 255, 255, 0.9) !important;
}
.nx-hero-enhanced .nx-domain-search {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}
/* Fix all section backgrounds — light */
.nx-hero {
  background-color: transparent !important;
}
.nx-pricing-section,
.nx-promo-section {
  background-color: #f8fafc !important;
}
.nx-features-section {
  background-color: #f8fafc !important;
}
.nx-footer {
  background-color: #ffffff !important;
}
.nx-testimonials-section {
  background-color: #f8fafc !important;
}
.nx-pricing-card,
.nx-integration-card,
.nx-testimonial-card,
.nx-promo-card {
  background-color: #ffffff !important;
}
.nx-domain-search {
  background-color: #ffffff !important;
}
.nx-mini-feature {
  background-color: #f8fafc !important;
}
.nx-footer-col h4 {
  color: #0f172a !important;
}
.nx-footer-col ul li a {
  color: #64748b !important;
}

/* Fix all section backgrounds — dark */
html[data-theme="dark"] .nx-pricing-section,
html[data-theme="dark"] .nx-promo-section,
body.nx-dark .nx-pricing-section,
body.nx-dark .nx-promo-section {
  background-color: #0a0f1d !important;
}
html[data-theme="dark"] .nx-features-section,
body.nx-dark .nx-features-section {
  background-color: #0d1425 !important;
}
html[data-theme="dark"] .nx-footer,
body.nx-dark .nx-footer {
  background-color: #0a0f1d !important;
}
html[data-theme="dark"] .nx-testimonials-section,
body.nx-dark .nx-testimonials-section {
  background-color: #0a0f1d !important;
}
html[data-theme="dark"] .nx-pricing-card,
html[data-theme="dark"] .nx-integration-card,
html[data-theme="dark"] .nx-testimonial-card,
html[data-theme="dark"] .nx-promo-card,
body.nx-dark .nx-pricing-card,
body.nx-dark .nx-integration-card,
body.nx-dark .nx-testimonial-card,
body.nx-dark .nx-promo-card {
  background-color: #161e2e !important;
}
html[data-theme="dark"] .nx-domain-search,
body.nx-dark .nx-domain-search {
  background-color: #0d1425 !important;
}
html[data-theme="dark"] .nx-mini-feature,
body.nx-dark .nx-mini-feature {
  background-color: #0f172a !important;
}
html[data-theme="dark"] .nx-footer-col h4,
body.nx-dark .nx-footer-col h4 {
  color: #f1f5f9 !important;
}

/* Text colors dark mode */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
body.nx-dark h1,
body.nx-dark h2,
body.nx-dark h3,
body.nx-dark h4,
body.nx-dark h5,
body.nx-dark h6 {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .nx-pub-brand-text,
body.nx-dark .nx-pub-brand-text {
  color: #fff !important;
}

#main-body {
  background: transparent !important;
  background-color: transparent !important;
}

#main-body .primary-content > p:last-child {
  display: none !important;
}

.master-breadcrumb {
  background: transparent !important;
  background-color: transparent !important;
}

/* ===== CARD LAYOUT & STYLING (override WHMCS) ===== */
.nx-pricing-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 2rem !important;
  max-width: 72rem !important;
  margin: 0 auto !important;
  padding: 0 1rem !important;
}
@media (min-width: 768px) {
  .nx-pricing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
.nx-pricing-card {
  display: block !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 2rem !important;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.08),
    0 2px 4px -2px rgba(0, 0, 0, 0.06) !important;
}
.nx-pricing-card.nx-popular {
  border: 2px solid #135bec !important;
  box-shadow: 0 10px 25px -5px rgba(19, 91, 236, 0.2) !important;
}
.nx-promo-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1.5rem !important;
  max-width: 64rem !important;
  margin: 0 auto !important;
  padding: 0 1rem !important;
}
@media (min-width: 768px) {
  .nx-promo-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
.nx-promo-card {
  display: block !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 4px 10px -5px rgba(0, 0, 0, 0.08) !important;
}
.nx-promo-banner {
  height: 8rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: hidden !important;
}
.nx-promo-banner-img {
  background-size: cover !important;
  background-position: center !important;
}
.nx-promo-banner-img::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.25),
    rgba(0, 0, 0, 0.55)
  ) !important;
  z-index: 0 !important;
}
.nx-promo-banner .material-symbols-outlined {
  position: relative !important;
  z-index: 1 !important;
  color: #fff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6) !important;
}
.nx-promo-section {
  padding: 6rem 0 !important;
}
.nx-promo-section + .nx-promo-section {
  padding-top: 8rem !important;
}
.nx-promo-banner-0:not(.nx-promo-banner-img),
.nx-promo-primary:not(.nx-promo-banner-img) {
  background: #135bec !important;
}
.nx-promo-banner-1:not(.nx-promo-banner-img),
.nx-promo-success:not(.nx-promo-banner-img) {
  background: #10b981 !important;
}
.nx-promo-banner-2:not(.nx-promo-banner-img),
.nx-promo-warning:not(.nx-promo-banner-img) {
  background: #f59e0b !important;
}
.nx-promo-body {
  padding: 1.5rem !important;
  background: #ffffff !important;
}
/* Homepage buttons: force theme primary (WHMCS can inject red .primary-bg-color after our CSS) */
.nx-pricing-cta {
  background: transparent !important;
  color: var(--nx-text-secondary) !important;
  border: 1px solid var(--nx-border) !important;
}
.nx-popular .nx-pricing-cta {
  background: var(--nx-primary) !important;
  color: #fff !important;
  border-color: var(--nx-primary) !important;
}
.nx-promo-btn {
  display: inline-block !important;
  padding: 0.625rem 1.25rem !important;
  background: var(--nx-primary) !important;
  color: #fff !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
}
.nx-integration-cards {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 1rem !important;
}
.nx-integration-card {
  display: block !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 1.5rem !important;
}
.nx-testimonial-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 1.5rem !important;
  min-width: 280px !important;
}

html[data-theme="dark"] .nx-pricing-card,
body.nx-dark .nx-pricing-card {
  border-color: #1e293b !important;
  background: #161e2e !important;
}
html[data-theme="dark"] .nx-pricing-card.nx-popular,
body.nx-dark .nx-pricing-card.nx-popular {
  border-color: #135bec !important;
}
html[data-theme="dark"] .nx-promo-card,
body.nx-dark .nx-promo-card {
  background: #161e2e !important;
  border-color: #1e293b !important;
}
html[data-theme="dark"] .nx-promo-body,
body.nx-dark .nx-promo-body {
  background: #161e2e !important;
}
html[data-theme="dark"] .nx-integration-card,
body.nx-dark .nx-integration-card {
  border-color: #1e293b !important;
  background: #161e2e !important;
}
html[data-theme="dark"] .nx-testimonial-card,
body.nx-dark .nx-testimonial-card {
  background: #161e2e !important;
  border-color: #1e293b !important;
}
html[data-theme="dark"] .nx-domain-search,
body.nx-dark .nx-domain-search {
  border-color: #1e293b !important;
}
html[data-theme="dark"] .nx-mini-feature,
body.nx-dark .nx-mini-feature {
  border-color: #1e293b !important;
}
html[data-theme="dark"] .nx-features-section,
body.nx-dark .nx-features-section {
  border-color: #1e293b !important;
}
html[data-theme="dark"] .nx-footer,
body.nx-dark .nx-footer {
  border-color: #1e293b !important;
}

/* ===== CHECKOUT INPUT ICON SPACING — max specificity ===== */
html body .input-group-text,
html body .input-group-addon {
  padding: 0.75rem 1.5rem !important;
  min-width: 4.5rem !important;
  min-height: calc(1em + 1.25rem + 5px) !important;
}
html body .input-group .form-control,
html body .input-group input,
html body .input-group select,
html body .input-group-prepend + .form-control,
html body .input-group-text + .form-control,
html body .input-group-addon + .form-control {
  padding-left: 4.5rem !important;
  min-height: calc(1em + 1.25rem + 5px) !important;
}
html body.nx-cart-page input.form-control,
html body.nx-cart-page select.form-control,
html body.nx-cart-page .primary-content input.form-control,
html body.nx-cart-page .primary-content select.form-control,
html body #frmCheckout input.form-control,
html body #frmCheckout select.form-control,
html body #order-standard_cart input.form-control,
html body #order-standard_cart select.form-control {
  padding-left: 4.5rem !important;
  min-height: calc(1em + 1.25rem + 5px) !important;
}
html body input[type="password"].form-control {
  padding-left: 4.5rem !important;
  padding-right: 3.5rem !important;
  min-height: calc(1em + 1.25rem + 5px) !important;
}
html body .input-group .form-control:not(:last-child),
html body .input-group input:not(:last-child) {
  padding-right: 3.5rem !important;
}
