.sec-rastrear {
  border-radius: 2rem;
  border: 1px solid #e0e0e0;
  background-color: #fff;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  width: 80%;
  max-width: 750px;
     margin: -190px auto 0 auto;
  padding: 15px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  background-image: url(../img/icono/fondo-rastrear.svg);
  background-repeat: no-repeat;
  background-position: right top;
}

.sec-rastrear__texto h4 {
  font-size: 2.2rem;
  margin: 0;
  text-align: center;
  line-height: 1.2;
}

.sec-rastrear form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 1.5rem;
  
}

.sec-rastrear input {
  border-radius: 10px;
  border: 1px solid #c4c4c4;
 /* background: #fff;*/
  padding: 10px 15px 10px 35px;
  font-size: 1.6rem;
  width: 100%;
}
.sec-rastrear label span{
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
  color: var(--color-azul);
  margin-bottom: 5px;
}
.sec-rastrear label input{
  font-size: 1.6rem;
  line-height: 1;
}

  .sec-rastrear .n-orden{
    background-image: url(../img/icono/orden.svg);
    background-size: 18px;
    background-position: left 10px center;
    background-repeat: no-repeat;
  }
  .sec-rastrear .codigo{
    background-image: url(../img/icono/codigo.svg);
    background-size: 18px;
    background-position: left 10px center;
    background-repeat: no-repeat;
  }

.sec-rastrear button {
  border-radius: 10px;
  border: none;
  background: var(--color-amarillo);
  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-azul);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1;

}
.sec-rastrear button img {
  width: 2rem;
}

@media (min-width: 868px) {
  .sec-rastrear {
    flex-direction: column;
    margin: -180px auto 0 auto;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
  }
  .sec-rastrear__texto h4 {
    font-size: 2.8rem;
  }
  .sec-rastrear form {
    margin-top: 1.8rem;
    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;
  }
}
