/* ─── Reset & base ─────────────────────────────────────────────────────────── */

*[class^="nj-"] {
  font-family: "Inter", sans-serif !important;
}
.nj-app *,
.nj-app *::before,
.nj-app *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.nj-app {
  background: #f7f7f5;
  color: #222;
  -webkit-font-smoothing: antialiased;
  min-height: 80%;
}
.nj-app input[type="number"]::-webkit-inner-spin-button,
.nj-app input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.nj-app input[type="number"] {
  -moz-appearance: textfield;
}

/* ─── Animations ────────────────────────────────────────────────────────────── */
@keyframes nj-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes nj-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes nj-slide-in {
  from {
    opacity: 0;
    transform: translateX(-22px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ─── Screens ───────────────────────────────────────────────────────────────── */
.nj-screen {
  background: #f7f7f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}
.nj-screen--loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: transparent;
  z-index: 10;
}
.nj-screen--active {
  display: flex;
}
.nj-screen[hidden] {
  display: none !important;
}
.nj-screen__inner {
  max-width: 560px;
  width: 100%;
}
.nj-screen__inner--wide {
  max-width: 680px;
  width: 100%;
}

/* ─── Cards ─────────────────────────────────────────────────────────────────── */
.nj-card {
  background: #fff;
  border: 0.5px solid #e5e5e5;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.nj-card--lg {
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.08);
  border: none;
}

/* ─── Section titles ────────────────────────────────────────────────────────── */
.nj-section-title {
  font-size: 15px;
  font-weight: 500;
  color: #364459;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.nj-section-title--orange {
  color: #c45e00;
}
.nj-section-title--white {
  color: white;
}

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.nj-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition:
    opacity 0.2s,
    background 0.2s;
}
.nj-btn--primary {
  background: #061e42;
  color: white;
  padding: 13px 30px;
}
.nj-btn--primary:hover:not(:disabled) {
  opacity: 0.9;
}
.nj-btn--primary:disabled {
  background: #e5e5e5;
  color: #bbb;
  cursor: default;
}
.nj-btn--purple {
  background: #3d0b8e;
  color: white;
  padding: 13px 30px;
  width: 100%;
  margin-top: 2rem;
}
.nj-btn--purple:disabled {
  background: #e5e5e5;
  color: #bbb;
  cursor: default;
}
.nj-btn--back {
  background: transparent;
  color: #4a6580;
  border: 1.5px solid #e5e5e5;
  padding: 11px 30px;
  width: 100%;
  margin-top: 0.75rem;
  font-size: 14px;
  font-weight: 500;
}
.nj-btn--back:hover {
  border-color: #9ca3af;
  color: #061e42;
}
.nj-btn--white-purple {
  background: white;
  color: #3d0b8e;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  display: inline-block;
  text-decoration: none;
}

/* ─── Search screen ─────────────────────────────────────────────────────────── */
.nj-search-heading {
  font-size: 22px;
  font-weight: 700;
  color: #061e42;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}
.nj-search-description {
  font-size: 15px;
  color: #4a6580;
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
}
.nj-search-wrap {
  position: relative;
}
.nj-search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  padding: 12px 20px;
  border: 1.5px solid #e5e5e5;
  gap: 10px;
  cursor: text;
}
.nj-search-icon {
  flex-shrink: 0;
}
.nj-search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  color: #061e42;
  font-family: inherit;
  text-overflow: ellipsis;
}
.nj-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border: 0.5px solid #e5e5e5;
  z-index: 100;
  overflow: hidden;
  list-style: none;
  padding: 0;
}
.nj-dropdown[hidden] {
  display: none;
}
.nj-dropdown-item {
  padding: 14px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background 0.15s;
}
.nj-dropdown-item:hover {
  background: #f8f8f6;
}
.nj-dropdown-item__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e6f1fb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #0c447c;
  flex-shrink: 0;
}
.nj-dropdown-item__name {
  font-size: 14px;
  font-weight: 600;
  color: #061e42;
}
.nj-dropdown-item__meta {
  font-size: 12px;
  color: #4a6580;
  margin-top: 2px;
}
.nj-dropdown-item__source {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #9ca3af;
  font-size: 12px;
  margin-left: auto;
}
.nj-search-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  gap: 12px;
}
.nj-powered-by {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #9ca3af;
  font-size: 13px;
}
.nj-google-g {
  font-weight: 700;
}

/* ─── Lookup spinner screen ──────────────────────────────────────────────────── */
.nj-lookup-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border-radius: 16px;
  padding: 22px 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
.nj-lookup-name {
  font-size: 18px;
  font-weight: 600;
  color: #061e42;
}
.nj-lookup-status {
  font-size: 15px;
  color: #4a6580;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nj-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #3d0b8e;
  border-top-color: transparent;
  animation: nj-spin 0.7s linear infinite;
}

/* ─── Business context card ─────────────────────────────────────────────────── */
.nj-biz-context-card {
  background: #fff;
  border: 0.5px solid #e5e5e5;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nj-biz-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e6f1fb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 14px;
  color: #0c447c;
  flex-shrink: 0;
}
.nj-biz-avatar--sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e6f1fb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 13px;
  color: #0c447c;
  flex-shrink: 0;
}
.nj-biz-info {
  flex: 1;
  min-width: 0;
}
.nj-biz-name {
  font-size: 17px;
  font-weight: 500;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-wrap: pretty;
}
.nj-biz-meta {
  font-size: 14px;
  color: #4a6580;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-wrap: pretty;
}
.nj-found-badge {
  font-size: 12px;
  font-weight: 600;
  color: #0a5c30;
  background: #e0faec;
  border-radius: 999px;
  padding: 4px 12px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ─── Questions screen ───────────────────────────────────────────────────────── */
.nj-step-label {
  font-size: 13px;
  font-weight: 700;
  color: #364459;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.nj-question-heading {
  font-size: 20px;
  font-weight: 700;
  color: #061e42;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}
.nj-question-sub {
  font-size: 15px;
  color: #4a6580;
  margin: 0 0 1.75rem 0;
  line-height: 1.6;
}
.nj-step[hidden] {
  display: none !important;
}
.nj-option-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.nj-pill-btn {
  padding: 11px 24px;
  border-radius: 999px;
  border: 1.5px solid #e5e5e5;
  background: white;
  color: #4a6580;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  font-family: inherit;
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s,
    font-weight 0.1s;
}
.nj-pill-btn--selected {
  border-color: #3d0b8e;
  background: #f3f0ff;
  color: #3d0b8e;
  font-weight: 600;
}
.nj-number-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nj-number-prefix {
  font-size: 28px;
  color: #4a6580;
}
.nj-number-input {
  flex: 1;
  font-size: 28px;
  font-weight: 600;
  color: #061e42;
  border: none;
  border-bottom: 2px solid #8f52f1;
  outline: none;
  padding: 8px 0;
  background: transparent;
  font-family: inherit;
  width: 100%;
}
.nj-step-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
}
.nj-step-hint {
  font-size: 15px;
  color: #4a6580;
  margin: 0;
  text-align: center;
}

/* ─── Progress dots ─────────────────────────────────────────────────────────── */
.nj-progress-dots {
  display: flex;
  gap: 5px;
}
.nj-progress-dots--loading {
  gap: 8px;
}
.nj-dot {
  height: 5px;
  border-radius: 999px;
  background: #ddd;
  transition: all 0.3s ease;
}
.nj-dot--current {
  background: #8f52f1;
  width: 14px;
}
.nj-dot--done {
  background: #3d0b8e;
  width: 20px;
}
.nj-dot--pending {
  background: #ddd;
  width: 5px;
}
.nj-progress-dots--loading .nj-dot {
  height: 6px;
}
.nj-progress-dots--loading .nj-dot--current {
  width: 20px;
}
.nj-progress-dots--loading .nj-dot--done {
  width: 20px;
}
.nj-progress-dots--loading .nj-dot--pending {
  width: 6px;
}

/* ─── Loading screen ─────────────────────────────────────────────────────────── */
.nj-loading-top {
  position: absolute;
  top: 2rem;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 10;
}
.nj-loading-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  border-radius: 999px;
  padding: 8px 18px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  font-weight: 600;
  color: #061e42;
}
.nj-loading-label {
  font-size: 18px;
  font-weight: 500;
  color: #4a6580;
  opacity: 0;
  transition: opacity 0.4s ease 0.1s;
}
.nj-loading-label--visible {
  opacity: 1;
}

/* ── NUEVO CONTENEDOR PARA EVITAR EL COLAPSO ── */
.nj-scan-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 280px; /* Forzamos la altura para que la página no colapse a 0 */
  margin: 6rem auto 2rem auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nj-scan-img {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  opacity: 0;
  transform: scale(0.97);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  z-index: 1;
}
.nj-scan-img--visible {
  opacity: 1;
  transform: scale(1);
}

/* ── LÁSER DE ESCANEO ── */
.nj-laser {
  position: absolute;
  left: 15%;
  right: 15%;
  height: 3px;
  background: linear-gradient(
    90deg, 
    transparent 0px, 
    rgba(124, 58, 237, 0) 0px, 
    #7c3aed 60px, 
    #7c3aed calc(100% - 60px), 
    rgba(124, 58, 237, 0) 100%, 
    transparent 100%
  );
  z-index: 20;
  pointer-events: none;
  
  /* Comienza invisible y SIN animación */
  opacity: 0;
}

/* Solo cuando JS agregue la clase "visible", activamos la animación */
.nj-laser.nj-laser--visible {
  /* 2.6s bajando, 2.6s subiendo gracias a "alternate" */
  animation: nj-scan-anim 1.8s ease-in-out infinite alternate;
}

@keyframes nj-scan-anim {
  0% {
    top: 5%;
    opacity: 0;
  }
  15% {
    /* Se enciende al 70% apenas despega de arriba */
    opacity: 0.8; 
  }
  100% {
    top: 95%;
    /* Se mantiene encendido (0.7) al llegar abajo para que el rebote sea visible */
    opacity: 0.9; 
  }
}

.nj-scan-img {
  max-width: 100%;
  max-height: 450px; /* Ajusta según el tamaño de tus imágenes */
  object-fit: contain;
  margin-top: 20px;
  transition: opacity 0.3s ease; /* Transición suave al cambiar la foto */
}

/* ─── Scorecard layout ───────────────────────────────────────────────────────── */
.nj-sticky-bar {
  background: #3d0b8e;
  padding: 12px 1rem;
  text-align: center;
  position: relative;
  top: 0;
  z-index: 100;
}
.nj-sticky-link {
  color: white;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.nj-scorecard-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: grid;
  gap: 0 28px;
  grid-template-columns: 1fr 320px;
  grid-template-areas: "header sidebar" "main sidebar";
  align-items: start;
}
.nj-scorecard-header {
  grid-area: header;
}
.nj-scorecard-main {
  grid-area: main;
}
.nj-scorecard-sidebar {
  grid-area: sidebar;
  position: sticky;
  /* Eliminamos el top: 5px de aquí */
}
.nj-biz-header-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── Animate on scroll ─────────────────────────────────────────────────────── */
.nj-anim {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}
.nj-anim--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Reputation score card ──────────────────────────────────────────────────── */
.nj-score-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 1.25rem;
}
.nj-circle-wrap {
  width: 92px;
  height: 92px;
  min-width: 92px;
  position: relative;
}
.nj-score-svg {
  transform: rotate(-90deg);
}
.nj-circle-track {
  fill: none;
  stroke: #e5e5e5;
  stroke-width: 3.5;
}
.nj-circle-fill {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 251.3;
  stroke-dashoffset: 251.3;
  transition: stroke-dashoffset 1.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.nj-circle-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.nj-score-number {
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
}
.nj-score-denom {
  font-size: 12px;
  opacity: 0.7;
  line-height: 1;
}
.nj-score-summary {
  flex: 1;
}
.nj-score-label {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}
.nj-score-text {
  font-size: 15px;
  color: #061e42;
  line-height: 1.6;
}
.nj-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 0.5px solid #dedede;
  border-bottom: 0.5px solid #dedede;
  padding: 12px 0;
  margin-bottom: 1.25rem;
}
.nj-stat {
  text-align: center;
}
.nj-stat--bordered {
  border-left: 0.5px solid #dedede;
}
.nj-stat-label {
  font-size: 13px;
  color: #4a6580;
  margin-bottom: 4px;
}
.nj-stat-value {
  font-size: 18px;
  font-weight: 500;
}
.nj-subscore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 1rem;
}
.nj-subscore-box {
  background: #f7f7f5;
  border-radius: 8px;
  padding: 10px 12px;
}
.nj-subscore-label {
  font-size: 13px;
  color: #4a6580;
  margin-bottom: 4px;
}
.nj-subscore-num-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}
.nj-subscore-num {
  font-size: 24px;
  font-weight: 600;
}
.nj-subscore-denom {
  font-size: 13px;
  opacity: 0.7;
}
.nj-bar-track {
  height: 4px;
  border-radius: 2px;
  background: #e5e5e5;
}
.nj-bar-fill {
  height: 4px;
  border-radius: 2px;
  width: 0%;
  transition: width 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}
.nj-insight-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nj-insight-callout {
  font-size: 15px;
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 3px solid;
  line-height: 1.6;
}

/* ─── Growth card ───────────────────────────────────────────────────────────── */
.nj-chart-legend {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: #4a6580;
  margin-bottom: 8px;
}
.nj-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
}
.nj-legend-dot--grey {
  background: #c4c3be;
}
.nj-legend-dot--green {
  background: #2ce080;
}
.nj-chart-wrap {
  position: relative;
  height: 220px;
}
.nj-growth-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 1rem 0;
}

/* ─── Metric boxes ─────────────────────────────────────────────────────────── */
.nj-metric-box {
  background: #f7f7f5;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.nj-metric-box--green {
  background: #e0faec;
}
.nj-metric-box--orange {
  background: #fff3e8;
}
.nj-metric-box--red {
  background: #ffebee;
}
.nj-metric-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  color: #4a6580;
}
.nj-metric-box--green .nj-metric-label {
  color: #0a5c30;
}
.nj-metric-box--orange .nj-metric-label {
  color: #c45e00;
}
.nj-metric-box--red .nj-metric-label {
  color: #b91c1c;
}
.nj-metric-value {
  font-size: 22px;
  font-weight: 500;
  color: #222;
}
.nj-metric-box--green .nj-metric-value {
  color: #0a5c30;
}
.nj-metric-box--orange .nj-metric-value {
  color: #555;
}
.nj-metric-box--red .nj-metric-value {
  color: #b91c1c;
}
.nj-metric-sub {
  font-size: 14px;
  color: #4a6580;
  margin-top: 3px;
  line-height: 1.4;
}
.nj-metric-box--green .nj-metric-sub {
  color: #0a5c30;
}
.nj-metric-box--red .nj-metric-sub {
  color: #b91c1c;
}

/* ─── Callouts ──────────────────────────────────────────────────────────────── */
.nj-callout {
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid;
  line-height: 1.6;
}
.nj-callout--green {
  background: #e0faec;
  border-color: #2ce080;
  color: #0a5c30;
}
.nj-callout--orange {
  background: #fff3e8;
  border-color: #ff8433;
  color: #061e42;
}
.nj-callout--red {
  background: #fdecea;
  border-color: rgb(255, 88, 81)!important;
  color: #b91c1c;
}
.nj-learn-more { 
  margin-top: 12px;
}
.nj-link {
  font-size: 15px;
  font-weight: 500;
  color: #025bde;
  text-decoration: none;
}
.nj-link:hover {
  text-decoration: underline;
}
.nj-card-desc {
  font-size: 15px;
  color: #061e42;
  line-height: 1.55;
  margin-bottom: 1rem;
}

/* ─── Competitor card ───────────────────────────────────────────────────────── */
.nj-competitor-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 1rem;
}
.nj-competitor-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-bottom: 1rem;
}
.nj-competitor-row {
  display: grid;
  grid-template-columns: 28px 1fr 82px 92px;
  gap: 10px;
  align-items: center;
  background: #f7f7f5;
  border-radius: 8px;
  padding: 10px 12px;
  opacity: 0;
  transform: translateX(-22px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}


@media screen and (max-width: 600px) {
  .nj-competitor-row {
    grid-template-columns: 28px 1fr 1fr;
    grid-template-rows: auto auto;
    row-gap: 2px;
  }
  .nj-competitor-rank {
    grid-row: 1 / 3;
    align-self: center;
  }
  .nj-competitor-name {
    grid-column: 2 / 4;
    grid-row: 1;
  }
  .nj-competitor-row > :nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    text-align: left;
  }
  .nj-competitor-row > :nth-child(4) {
    grid-column: 3;
    grid-row: 2;
    text-align: right;
  }
}
.nj-competitor-row--visible {
  opacity: 1;
  transform: translateX(0);
}
.nj-competitor-rank {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e5e5e5;
  color: #061e42;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.nj-competitor-name {
  font-size: 15px;
  font-weight: 500;
  color: #1a3355;
  white-space: nowrap;
  overflow: hidden;
  text-wrap: pretty;
}
.nj-competitor-rating {
  font-size: 14px;
  color: #061e42;
  text-align: right;
}
.nj-competitor-reviews {
  font-size: 14px;
  color: #061e42;
  text-align: right;
}

/* ─── Missed opportunities ───────────────────────────────────────────────────── */
.nj-missed-wrap {
  background: #fff3e8;
  border: 0.5px solid #ff8433;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.nj-missed-desc {
  font-size: 15px;
  color: #061e42;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.nj-missed-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 1rem;
}
.nj-missed-callout {
  font-size: 14px;
  color: #061e42;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  border-left: 3px solid #ff8433;
  line-height: 1.6;
}

/* ─── Revenue calculator ─────────────────────────────────────────────────────── */
.nj-calculator-wrap {
  background: #3d0b8e;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.nj-calc-desc {
  font-size: 15px;
  color: #b9aadb;
  margin-bottom: 1rem;
}
.nj-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1rem;
}
.nj-calc-grid--toggles {
  margin-bottom: 0;
}
.nj-input-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nj-input-label {
  font-size: 15px;
  color: #b9aadb;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nj-input-with-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nj-input-prefix {
  font-size: 13px;
  color: #b9aadb;
}
.nj-calc-input {
  font-size: 14px;
  padding: 6px 8px;
  border: 0.5px solid #ddd;
  border-radius: 8px;
  background: #f0ecfe;
  color: #222;
  font-family: inherit;
  width: 100%;
}
.nj-calc-select {
  cursor: pointer;
}
.nj-calc-readonly {
  font-size: 14px;
  padding: 6px 8px;
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: #f0ecfe;
  color: black;
}
.nj-toggle-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nj-toggle-group {
  display: flex;
  gap: 8px;
}
.nj-toggle-btn {
  flex: 1;
  padding: 7px;
  font-size: 16px;
  border-radius: 8px;
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  font-family: inherit;
  transition:
    background 0.15s,
    color 0.15s,
    font-weight 0.1s;
}
.nj-toggle-btn--active {
  font-weight: 600;
  background: #f0ecfe;
  color: #3d0b8e;
}
.nj-toggle-btn--inactive {
  font-weight: 400;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
}

/* ─── Tooltip ───────────────────────────────────────────────────────────────── */
.nj-tooltip-wrap {
  position: relative;
  display: inline-flex;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ddd;
  color: #666;
  font-size: 10px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  cursor: default;
  margin-left: 4px;
  flex-shrink: 0;
}
.nj-tooltip-wrap--dark {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}
.nj-tooltip-wrap--purple {
  background: #d4caff;
  color: #4b3d8f;
}
.nj-tooltip-wrap::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  color: white;
  font-size: 11px;
  line-height: 1.5;
  padding: 8px 10px;
  border-radius: 8px;
  width: 220px;
  z-index: 9999;
  pointer-events: none;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s;
  font-weight: 400;
}
.nj-tooltip-wrap:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ─── Accordion ─────────────────────────────────────────────────────────────── */
.nj-accordion {
  display: grid;
  gap: 8px;
}
.nj-accordion-item {
  border-radius: 10px;
  overflow: hidden;
  border: 0.5px solid #e5e5e5;
}
.nj-accordion-header {
  background: #f7f7f5;
  padding: 13px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
  transition: background 0.2s;
}

@media screen and (max-width: 600px) {
    .nj-accordion-header {
        /* Cambiamos a dirección de columna para que los elementos se apilen hacia abajo */
        flex-direction: column; 
        align-items: flex-start; /* Alinea todo a la izquierda */
        gap: 8px;
        padding: 16px;
    }

    /* Forzamos a que el título ocupe todo el ancho disponible */
    .nj-accordion-header h3, 
    .nj-accordion-header .tu-clase-del-titulo-del-acordeon { 
        width: 100%;
        margin: 0;
        line-height: 1.4;
    }

    /* Hacemos que el botón naranja de recomendaciones flote limpio abajo */
    .nj-accordion-header .nj-recommendations-btn-or-badge { 
        align-self: flex-start; /* Mantiene el botón alineado a la izquierda abajo */
        margin-top: 4px;
    }
}

.nj-accordion-header--open {
  background: white;
}
.nj-accordion-header__icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.nj-accordion-header__body {
  flex: 1;
  min-width: 0;
}
.nj-accordion-header__title {
  font-size: 16px;
  font-weight: 600;
  color: #364459;
  margin-bottom: 3px;
}
.nj-accordion-header__meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  color: #4a6580;
}
.nj-accordion-header__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nj-accordion-badge {
  font-size: 13px;
  font-weight: 600;
  color: #c45e00;
  background: #fff3e8;
  border: 0.5px solid #ff8433;
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}
.nj-accordion-chevron {
  font-size: 10px;
  color: #4a6580;
  display: inline-block;
  transition: transform 0.25s ease;
}
.nj-accordion-chevron--open {
  transform: rotate(180deg);
}
.nj-accordion-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  background: white;
  transition:
    max-height 0.3s ease,
    opacity 0.25s ease;
}
.nj-accordion-body--open {
  opacity: 1;
  border-top: 0.5px solid #eee;
}
.nj-accordion-body__inner {
  padding: 14px 16px;
}
.nj-rec-grid {
  display: grid;
  gap: 12px;
}
.nj-rec-item {
}
.nj-rec-title {
  font-size: 15px;
  font-weight: 600;
  color: #364459;
  margin-bottom: 8px;
}
.nj-rec-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.nj-rec-without {
  background: #f7f7f5;
  border-radius: 8px;
  padding: 12px 14px;
}
.nj-rec-with {
  background: #e0faec;
  border-radius: 8px;
  padding: 12px 14px;
}
.nj-rec-col-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.nj-rec-without .nj-rec-col-label {
  color: #4a6580;
}
.nj-rec-with .nj-rec-col-label {
  color: #0a5c30;
}
.nj-rec-copy {
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}
.nj-rec-without .nj-rec-copy {
  color: #061e42;
}
.nj-rec-with .nj-rec-copy {
  color: #0a5c30;
}
.nj-rec-learn {
  margin-top: 10px;
}

/* ─── Beyond the numbers ─────────────────────────────────────────────────────── */
.nj-beyond-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.nj-beyond-box {
  background: #f7f7f5;
  border: 0.5px solid #e5e5e5;
  border-radius: 10px;
  padding: 14px 16px;
}
.nj-beyond-icon-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #364459;
}
.nj-beyond-icon {
  font-size: 22px;
  line-height: 1;
}
.nj-beyond-box p {
  font-size: 15px;
  color: #061e42;
  line-height: 1.7;
}
.nj-beyond-callout {
  font-size: 15px;
  color: #061e42;
  line-height: 1.7;
  padding: 10px 14px;
  background: #f3f0ff;
  border: 0.5px solid #c4b8ff;
  border-left: 3px solid #7c5cf5;
  border-radius: 8px;
  margin-bottom: 12px;
}

/* ─── Testimonial slider ─────────────────────────────────────────────────────── */
.nj-testimonial-wrap {
}
.nj-testimonial-content {
  border-radius: 8px;
  padding: 14px 16px;
  min-height: 110px;
  transition: opacity 0.28s ease;
}
.nj-testimonial-quote {
  font-size: 16px;
  color: #061e42;
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 10px;
}
.nj-testimonial-byline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.nj-testimonial-name {
  font-size: 13px;
  font-weight: 600;
  color: #364459;
}
.nj-testimonial-company {
  font-size: 14px;
  color: #4a6580;
}
.nj-testimonial-link {
  font-size: 13px;
  font-weight: 500;
  color: #025bde;
  text-decoration: none;
}
.nj-testimonial-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 4px;
}
.nj-testimonial-dot {
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: #ddd;
  transition:
    width 0.3s ease,
    background 0.3s ease;
  flex-shrink: 0;
}
.nj-testimonial-dot--inactive {
  width: 8px;
}
.nj-testimonial-dot--active {
  width: 28px;
  background: transparent;
}
.nj-dot-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #ddd;
}
.nj-dot-fill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #7c5cf5;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.1s linear;
}

/* ─── ROI Sidebar ───────────────────────────────────────────────────────────── */
.nj-roi-wrap {
  background: #3d0b8e;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.nj-roi-group-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  margin-top: 18px;
}
.nj-roi-group-label--spaced {
  margin-top: 22px;
}
.nj-roi-grid {
  display: grid;
  gap: 8px;
}
.nj-roi-box {
  background: #f0ecfe;
  border-radius: 8px;
  padding: 10px 12px;
}
.nj-roi-box-label {
  font-size: 14px;
  color: #6b5aaa;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nj-roi-box-value {
  font-size: 24px;
  font-weight: 600;
  color: #3d0b8e;
}
.nj-roi-box-sub {
  font-size: 13px;
  color: #6b5aaa;
  margin-top: 2px;
  line-height: 1.45;
}
.nj-roi-divider {
  height: 0.5px;
  background: rgba(255, 255, 255, 0.25);
  margin: 1rem 0;
}
.nj-roi-total {
  margin-bottom: 14px;
}
.nj-roi-total-label {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 4px;
}
.nj-roi-total-value {
  font-size: 34px;
  font-weight: 700;
  color: white;
}
.nj-roi-total-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
}

/* ─── Final CTA ─────────────────────────────────────────────────────────────── */
.nj-final-cta {
  background: #3d0b8e;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
}
.nj-final-cta-heading {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}
.nj-final-cta-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.nj-final-cta-fine {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 10px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 840px) {
  .nj-scorecard-wrap {
    grid-template-columns: 1fr;
    grid-template-areas: "header" "main" "sidebar";
  }
  .nj-scorecard-sidebar {
    position: static;
  }
  .nj-calc-grid {
    grid-template-columns: 1fr;
  }
  .nj-missed-metric-grid {
    grid-template-columns: 1fr;
  }
  .nj-competitor-metric-grid {
    grid-template-columns: 1fr;
  }
  .nj-subscore-grid {
    grid-template-columns: 1fr;
  }
  .nj-rec-cols {
    grid-template-columns: 1fr;
  }
  .nj-beyond-grid {
    grid-template-columns: 1fr;
  }
  .nj-stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .nj-stat--bordered:nth-child(2) {
    border-left: none;
  }
}
@media (max-width: 500px) {
  .nj-growth-metric-grid {
    grid-template-columns: 1fr;
  }
  .nj-rec-cols {
    grid-template-columns: 1fr;
  }
}

.box-loading {
  position: relative;
  width: 100%;
  height: 800px;
  overflow: hidden;
  border-radius: 12px;
  background-color: #f8fafc;
}

#nj-screen-loading,
#nj-loading-container {
  background-color: #f7f7f5 !important;
}

#nj-screen-loading img,
#nj-loading-container img {
  max-width: 100% !important;
  margin: 40px auto 0 !important;
}

/* ── 1. Modo Oscuro (Dark Backgrounds) ── */
/* Aplica esto a las etiquetas de la calculadora y a la parte inferior de la caja de ROI */
.nj-theme-dark-icons {
  background-color: #644fa4 !important;
  color: #b9aadb !important;
}

.nj-theme-dark-icons svg {
  fill: #b9aadb !important;
}

/* ── 2. Modo Claro (Light Backgrounds) ── */
.nj-theme-light-icons {
  background-color: #d4caff !important;
  color: #4b3d8f !important;
}

.nj-theme-light-icons svg {
  fill: #4b3d8f !important;
}

/* =========================================================
   📱 RESPONSIVE MOBILE FIXES
========================================================= */

@media (max-width: 768px) {
    .nj-found-badge{
        display: none !important;
    }
  .nj-dropdown-item__source {
    display: none !important;
  }
  /* 1. Prevent horizontal scrolling on the entire page */
  html,
  body {
    overflow-x: hidden;
  }

  /* 2. Ensure ALL cards and containers span 100% of the screen width */
  .nj-screen,
  .nj-screen-content,
  .nj-reputation-card,
  .nj-competitor-metrics,
  .nj-accordion,
  .nj-accordion-item,
  .nj-metric-box {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 3. Force grid/flexbox layouts to stack vertically on mobile */
  /* Note: Replace ".nj-grid-layout" with the actual wrapper class used in your HTML */
  .nj-grid-layout,
  .nj-flex-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  /* 4. Adjust internal padding for mobile breathing room */
  .nj-reputation-card {
    padding: 20px 15px !important;
  }

  /* 5. Ensure competitor metric boxes stack on top of each other */
  #nj-competitor-metrics {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
  }
}

@media (max-width: 768px) {
  .nj-card--lg {
    padding: 1.3rem !important;
  }
  .nj-scorecard-wrap {
    padding: 1rem 0 !important;

    grid-template-columns: 1fr !important;

    grid-template-areas:
      "header"
      "main"
      "sidebar" !important;

    gap: 24px 0 !important;
  }
  .nj-biz-name {
    font-size: 15px;
  }
  .nj-biz-meta {
    font-size: 12px;
  }
  .nj-section-title {
    font-size: 12px;
  }
  .nj-score-label {
    font-size: 20px;
  }
  .nj-score-number {
    font-size: 30px;
  }
  .nj-score-denom {
    font-size: 10px;
  }
  .nj-score-text {
    font-size: 13px;
  }
  .nj-stat-label {
    font-size: 11px;
  }
  .nj-stat-value {
    font-size: 16px;
  }
  .nj-subscore-label {
    font-size: 13px;
  }
  .nj-subscore-num {
    font-size: 24px;
  }
  .nj-subscore-denom {
    font-size: 11px;
  }
  .nj-insight-callout {
    font-size: 13px;
  }
  .nj-metric-label {
    font-size: 10px;
  }
  .nj-metric-value {
    font-size: 20px;
  }
  .nj-metric-sub {
    font-size: 11px;
  }
  .nj-link {
    font-size: 13px;
  }
  .nj-callout {
    font-size: 13px;
  }
  .nj-card-desc {
    font-size: 13px;
  }
  .nj-metric-sub {
    font-size: 11px;
  }
  .nj-roi-box-sub {
    font-size: 11px;
  }
  .nj-roi-group-label {
    font-size: 10px;
  }
  .nj-roi-box-label {
    font-size: 12px;
  }
  .nj-roi-box-value {
    font-size: 22px;
  }
  .nj-roi-total-label {
    font-size: 15px;
  }
  .nj-roi-total-value {
    font-size: 32px;
  }
  .nj-roi-total-sub {
    font-size: 13px;
  }
  .nj-testimonial-quote {
    font-size: 14px;
  }
  .nj-testimonial-company {
    font-size: 12px;
  }
  .nj-beyond-box p {
    font-size: 13px;
  }
  .nj-beyond-callout {
    font-size: 13px;
  }
  .nj-beyond-icon {
    font-size: 20px;
  }
  .nj-competitor-name {
    font-size: 13px;
  }
  .nj-competitor-rating {
    font-size: 12px;
  }
  .nj-competitor-reviews {
    font-size: 12px;
  }
  .nj-competitor-rank {
    font-size: 11px;
  }
  .nj-missed-desc {
    font-size: 13px;
  }
  .nj-metric-sub {
    font-size: 13px;
  }
  .nj-missed-callout {
    font-size: 13px;
  }
  .nj-accordion-header__title {
    font-size: 14px;
  }
  .nj-accordion-header__meta {
    font-size: 12px;
  }
  .nj-accordion-badge {
    font-size: 11px;
  }
  .nj-calc-desc {
    font-size: 13px;
  }
  .nj-input-label {
    font-size: 13px;
  }
  .nj-toggle-btn {
    font-size: 14px;
  }
  .nj-beyond-icon-row {
    font-size: 14px;
  }
  .nj-rec-copy {
    font-size: 13px;
  }
  .nj-rec-col-label {
    font-size: 10px;
  }
  .nj-rec-title {
    font-size: 13px;
  }
  .nj-final-cta {
    font-size: 12px;
  }
  .nj-final-cta-heading {
    font-size: 18px;
  }
}

/* Le decimos a todos los hijos directos del Grid que puedan encogerse libremente */
.nj-scorecard-wrap > * {
  min-width: 0 !important;
}

/* Si tienes un contenedor para el gráfico (canvas), asegúrate de que también fluya */
.nj-chart-wrap {
  width: 100% !important;
  min-width: 0 !important;
  position: relative;
}
}