.sec-rastrear {
  border-radius: 2rem;
  /* border: 1px solid var(--color-gris); */
  background-color: #fff;
  width: 80%;
  max-width: 750px;
  margin: 0 auto 0 auto;
  display: flex;
  flex-direction: column;
  padding-top: 2rem;

}

.sec-rastrear__texto h4 {
  font-size: 2.8rem;
  margin: 0;
  text-align: center;
  line-height: 1.2;
  color: var(--color-principal);
  font-weight: 700;
}
.sec-rastrear__texto p {
  font-size: 1.6rem;
  margin: 1rem auto 0 auto;
  max-width: 60rem;
  text-align: center;
 
}

.sec-rastrear form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 1.5rem;
  border-radius: 20px;
  padding: 30px 25px;
  border: 1px solid var(--color-gris);

}

.sec-rastrear input {
  border-radius: 10px;
  border: 1px solid var(--color-gris);
  /* background: #fff;*/
  padding: 10px 15px 10px 40px;
  font-size: 1.6rem;
  width: 100%;
}
.sec-rastrear label span {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
  color: var(--color-parrafos);
  margin-bottom: 5px;
  display: block;
}
.sec-rastrear label input {
  font-size: 1.6rem;
  line-height: 1;
}

.sec-rastrear .n-orden {
  background-image: url(../img/iconos/orden.svg);
  background-size: 18px;
  background-position: left 13px center;
  background-repeat: no-repeat;
}
.sec-rastrear .codigo {
  background-image: url(../img/iconos/codigo.svg);
  background-size: 18px;
  background-position: left 13px center;
  background-repeat: no-repeat;
}

.sec-rastrear button {
  border-radius: 30px;
  border: none;
  background: var(--color-principal);
  display: flex;
  align-items: center;
  padding: 10px 20px;
  gap: 8px;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  line-height: 1;
  /*grid-area: 2 / 1 / 2 / 4;*/
}
.sec-rastrear button span {
  color: var(--color-blanco);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1;
}
.sec-rastrear button img {
  width: 1.8rem;
}

@media (min-width: 868px) {
  .sec-rastrear {
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
  }
  .sec-rastrear__texto h4 {
    font-size: 4rem;
  }
  .sec-rastrear__texto p {
    font-size: 1.8rem;

   
  }
  .sec-rastrear form {
    margin-top: 2.2rem;
    grid-template-columns: 3fr 3fr 3fr;
    align-items: end;
  }
}

/* POPUP DE AYUDA */
.popup-ayuda-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.2s;
}
.popup-ayuda-content {
  background: #fff;
  border-radius: 1.2rem;
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  max-width: 95vw;
  max-height: 90vh;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.popup-ayuda-content img {
  max-width: 80vw;
  max-height: 60vh;
  width: auto;
  height: auto;
  border-radius: 0.5rem;
}
.popup-ayuda-close {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  background: none;
  border: none;
  font-size: 2.2rem;
  color: #333;
  cursor: pointer;
  z-index: 2;
}
@media (max-width: 600px) {
  .popup-ayuda-content {
    padding: 0.7rem 0.3rem 0.3rem 0.3rem;
  }
  .popup-ayuda-content img {
    max-width: 95vw;
    max-height: 40vh;
  }
}
/* Ocultar por defecto los overlays */
.popup-ayuda-overlay {
  display: none;
}
.popup-ayuda-overlay.active {
  display: flex;
}

/* Ocultar los popups originales del HTML para evitar duplicidad visual */
.popup-ayuda__orden,
.popup-ayuda__codigo {
  display: none;
}

/* TOOLTIP DE AYUDA */
.tooltip-ayuda {
  position: absolute;
  z-index: 2000;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  padding: 0.7rem 1rem 0.8rem 1rem;
  min-width: 180px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInTooltip 0.18s;
}
@keyframes fadeInTooltip {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.tooltip-ayuda-img img {
  max-width: 260px;
  max-height: 120px;
  width: auto;
  height: auto;
  border-radius: 0.5rem;
}
.tooltip-ayuda-flecha {
  width: 22px;
  height: 12px;
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
}
.tooltip-ayuda-flecha::after {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  background: #fff;
  position: absolute;
  left: 2px;
  top: 6px;
  transform: rotate(45deg);
  box-shadow: -2px -2px 8px rgba(0, 0, 0, 0.08);
}
@media (max-width: 600px) {
  .tooltip-ayuda {
    min-width: 120px;
    max-width: 95vw;
    padding: 0.5rem 0.3rem 0.5rem 0.3rem;
  }
  .tooltip-ayuda-img img {
    max-width: 90vw;
    max-height: 80px;
  }
}



/* Mensaje de error moderno */
div[name="mensaje-error"] {
  display: none; /* se muestra por JS */
  margin: 1rem auto 0 auto;
  width: 80%;
  max-width: 750px;
  background: #fff5f5;
  border: 1px solid #ffc9c9;
  color: #c92a2a;
  border-radius: 2rem;
  padding: 12px 14px;
  text-align: center;

  display: none;
}
div[name="mensaje-error"] .error-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #a61e1e;
}
div[name="mensaje-error"] .error-text {
  font-size: 1.35rem;
  margin: 0;
  line-height: 1.4;
}

/* PAGINA RASTREAR*/

.rastrear{
  margin: 5rem auto 8rem auto;
}
