/* =========================================================
   1) Caja del localizador en la sección RASTREAR
   ========================================================= */

/* centrar la caja dentro de #contacts */
#contacts .loc-row-center {
  display: flex;
  justify-content: center;
}
#contacts .loc-row-center > .col-md-6 {
  float: none;
}

/* caja principal */
.phone-locator-box {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  padding: 28px 28px 30px;
  text-align: center;
  margin: 0 auto;
  max-width: 520px;
  box-shadow: 0 12px 25px rgba(0,0,0,0.08);
  backdrop-filter: blur(2px);
}
.pl-title {
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 18px;
}
.pl-input-wrap {
  margin-bottom: 10px;
}
.phone-locator-box .iti {
  width: 100%;
}
.phone-locator-box input#pl-phone {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 14px;
  font-size: 15px;
  background: rgba(255,255,255,0.98);
}
.pl-btn {
  display: inline-block;
  min-width: 230px;
  background: #ffffff;
  color: #16944e;
  border: 2px solid rgba(0,0,0,0.03);
  border-radius: 999px;
  padding: 11px 28px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  transition: all .2s ease-in-out;
  margin-top: 12px;
  cursor: pointer;
}
.pl-btn:hover {
  transform: translateY(-2px);
}
.pl-error {
  color: #ffe5e5;
  background: rgba(255,0,0,.22);
  border: 1px solid rgba(255,0,0,.25);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  margin-bottom: 4px;
  display: none;
}

/* mobile caja localizador */
@media (max-width: 575px) {
  .phone-locator-box {
    margin: 0 12px;
    padding: 22px 18px 26px;
  }
}

/* =========================================================
   2) POPUP de MAPA + BARRA + BLOQUEO
   ========================================================= */

/* fondo del popup del mapa */
.loc-popup {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,.6);
  z-index: 9999;
  display: none;
}
.loc-popup.show {
  display: block;
}

/* contenedor blanco centrado */
.loc-popup-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  max-width: 720px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

/* mapa arriba */
.loc-map-box {
  position: relative;
  width: 100%;
  height: 340px;
  background: #e5e5e5;
}
#loc-map-popup {
  width: 100%;
  height: 100%;
}

/* capa borrosa */
.loc-blur-mask {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(5px);
  display: none;
  z-index: 3;
}

/* círculo de carga */
.loc-loading-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  border: 5px solid rgba(255,255,255,.4);
  border-top-color: #4caf50;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: loc-spin 1s linear infinite;
  z-index: 4;
  display: none;
}
@keyframes loc-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* mensaje final que contiene al botón cápsula */
.loc-unlock-message {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  max-width: 360px;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,.95);
  border-radius: 10px;
  padding: 20px 18px 16px;
  text-align: center;
  z-index: 5;
  display: none;
}

/* =========================================================
   3) BARRA DE PROGRESO (45s) + ICONO GPS
   ========================================================= */
.loc-progress-bar-wrap {
  padding: 16px 18px 20px;
  background: #fff;
}
.loc-progress-bar {
  width: 100%;
  height: 26px;
  background: #ddd;
  border-radius: 14px;
  position: relative;
  border: 1px solid rgba(0,0,0,.05);
  overflow: visible; /* para que NO corte el icono gps */
}
/* barra verde */
#loc-progress {
  width: 0%;
  height: 100%;
  background: repeating-linear-gradient(
    135deg,
    #3fa54d 0,
    #3fa54d 10px,
    #46b757 10px,
    #46b757 20px
  );
  background-size: 40px 40px;
  animation: loc-progress-stripes 1s linear infinite;
  transition: width .25s linear;
  border-radius: 14px;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.3);
}
@keyframes loc-progress-stripes {
  from { background-position: 0 0; }
  to   { background-position: 40px 0; }
}
/* icono gps viajando */
.loc-progress-gps {
  position: absolute;
  top: -20px;
  left: 0;
  width: 28px;
  height: 28px;
  animation: loc-gps-bounce 1s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes loc-gps-bounce {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-3px); }
}
/* texto debajo */
.loc-progress-text {
  margin-top: 12px;
  text-align: center;
  font-weight: 600;
  font-size: 17px;
  color: #d72d2d;
  line-height: 1.3;
}

/* responsive popup mapa */
@media (max-width: 600px) {
  .loc-popup-inner {
    width: 96%;
    max-width: 96%;
  }
  .loc-map-box {
    height: 300px;
  }
  .loc-progress-text {
    font-size: 15px;
  }
}

/* botón del popup "DESBLOQUEAR AHORA" */
.unlock-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(90deg, #1f6fff 0%, #1181ff 40%, #0a9bff 100%);
  border: 2px solid rgba(255,255,255,.45);
  border-radius: 999px;
  padding: 11px 30px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 94, 220, 0.35);
  animation: btnPulse 1.3s ease-in-out infinite;
  min-width: 220px;
  text-align: center;
}

/* efecto latido */
@keyframes btnPulse {
  0%   { transform: scale(1);   box-shadow: 0 12px 28px rgba(15, 94, 220, 0.35); }
  50%  { transform: scale(1.03);box-shadow: 0 16px 36px rgba(15, 94, 220, 0.45); }
  100% { transform: scale(1);   box-shadow: 0 12px 28px rgba(15, 94, 220, 0.35); }
}

/* quitamos cualquier icono interno viejo */
.unlock-pill-btn .upb-icon {
  display: none;
}
.unlock-pill-btn .upb-text {
  white-space: nowrap;
}


/* =========================================================
   5) POPUP CÓDIGO DE DESBLOQUEO (GRANDE)
   ========================================================= */

:root {
  --head-blue: #8eaee2;
  --panel: #f5f7fb;
  --stroke: rgba(0,0,0,.08);
  --stroke-strong: #2b6bff33;
  --accent: #1f64ff;
  --danger: #ff4d4f;
  --help-bg: #e8fff3;
  --help-border: #18b36a;
  --help-ink: #073b23;
}

/* overlay principal del popup de código */
.overlay-sm {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: none;
  background: rgba(6,10,20,.45);
  backdrop-filter: blur(2px);
}

/* MOSTRAR overlay */
.overlay-sm.show {
  display: block;
}

/* caja blanca grande (centrada por posición fija) */
.pop-sm {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(920px, 96vw);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
  overflow: hidden;
}

/* cabecera azul */
.pop-head {
  background: var(--head-blue);
  color: #fff;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  padding: 14px 16px;
}
.title-sm {
  margin: 0;
  font-size: clamp(18px,3.2vw,22px);
  font-weight: 900;
}

/* grid dos columnas */
.code-grid {
  display: grid;
  gap: 16px;
  padding: 18px 18px 14px;
}
@media (min-width: 900px) {
  .code-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* tarjetas */
.card {
  background: var(--panel);
  border: 2px solid var(--stroke-strong);
  border-radius: 14px;
  padding: 16px;
  position: relative;
}
.card-head {
  background: var(--head-blue);
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  border-radius: 10px 10px 0 0;
  padding: 10px 14px;
  margin: -16px -16px 14px;
}
.card p {
  margin: 4px 0;
  color: #22324b;
  font-weight: 600;
}

/* campo de código + botón desbloquear */
.field {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.input {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--stroke);
  outline: none;
  font-size: 16px;
  color: #0c1222;
  transition: box-shadow .2s ease;
}
.input:focus {
  box-shadow: 0 0 0 3px rgba(31,100,255,.12);
}

/* pulso en el input cuando cierran modal chico */
.input-pulse {
  animation: inpPulse .4s ease-in-out 4;
}
@keyframes inpPulse {
  0% { box-shadow: 0 0 0 0 rgba(31,100,255,.45); }
  100% { box-shadow: 0 0 0 8px rgba(31,100,255,0); }
}

/* botones del popup de código */
.btn {
  height: 48px;
  border-radius: 12px;
  border: 0;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .3px;
}
.btn-primary {
  background: #1f64ff;
  color: #fff;
  box-shadow: 0 8px 20px rgba(31,100,255,.35);
}
.btn-primary:active {
  transform: translateY(1px);
}

/* botón “solicitar código” con efecto */
.btn-ghost {
  display: block;
  width: 100%;
  margin-top: 10px;
  height: 56px;
  border-radius: 999px;
  border: 2px solid rgba(62,166,255,.6);
  background: #eaf3ff;
  color: #0b2a4d;
  font-weight: 800;
  letter-spacing: .3px;
  cursor: pointer;
  transition: .15s;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  animation: btnPulseGhost 1.4s ease-in-out infinite;
}
.btn-ghost:hover {
  background: #fff;
}
@keyframes btnPulseGhost {
  0%   { transform: translateY(0); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
  50%  { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.12); }
  100% { transform: translateY(0); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
}

/* mensaje de error */
.error {
  font-size: 14px;
  color: var(--danger);
  min-height: 18px;
  margin-top: 6px;
}

/* lista de beneficios */
.premium-list {
  margin: 10px 0 16px 0;
  padding-left: 18px;
}
.premium-list li {
  margin: .4rem 0;
  font-weight: 700;
}

/* botón premium */
.btn-premium {
  background: #1f64ff;
  color: #fff;
  width: 100%;
  height: 52px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: .3px;
  box-shadow: 0 10px 24px rgba(31,100,255,.35);
}
.btn-premium:active {
  transform: translateY(1px);
}

/* barra de ayuda debajo del popup (centrada) */
.help-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(920px, 96vw);
  background: var(--help-bg);
  border: 2px solid var(--help-border);
  color: var(--help-ink);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
  z-index: 11001;
}
.help-text {
  font-weight: 600;
}
.help-actions {
  display: flex;
  gap: 8px;
}
.help-btn {
  border: 2px solid var(--help-border);
  background: #fff;
  color: #0c5e38;
  border-radius: 1000px;
  padding: 8px 14px;
  font-weight: 900;
  letter-spacing: .3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.yt-ico {
  width: 18px;
  height: 18px;
  display: inline-block;
}

/* responsive popup código */
@media (max-width: 600px) {
  .code-grid { grid-template-columns: 1fr; }
  .field {
    flex-direction: column;
    align-items: stretch;
  }
  .btn,
  .btn-primary,
  .btn-premium {
    width: 100%;
    text-align: center;
  }
  .help-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================
   6) MODALES CHICOS (Solicitar código / Premium)
   ========================================================= */
.overlay-mini {
  position: fixed;
  inset: 0;
  z-index: 11005;
  display: none;
  background: rgba(8,12,22,.55);
  backdrop-filter: blur(2px);
}
.overlay-mini.show {
  display: block;
}
.pop-mini {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(620px, 94vw);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
  padding: 20px 18px 18px;
}
.mini-blue {
  background: #8eaee2;
  color: #fff;
  border-radius: 12px 12px 0 0;
  padding: 12px 14px;
  margin: -20px -18px 16px;
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
}
.close-mini {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: transparent;
  border: 0;
  font-size: 18px;
  cursor: pointer;
}
.mini-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  margin-top: 18px;
}
.btn-mini {
  height: 48px;
  border-radius: 16px;
  border: 0;
  padding: 0 22px;
  cursor: pointer;
  font-weight: 900;
  font-size: 16px;
}
.btn-mini.secondary {
  background: #edf0ff;
  color: #0c1730;
}
.btn-mini.primary {
  background: #2f66ff;
  color: #fff;
  box-shadow: 0 12px 28px rgba(48,102,255,.38);
}
@media (max-width: 540px) {
  .pop-mini {
    width: 96vw;
  }
  .mini-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-mini {
    width: 100%;
    text-align: center;
  }
}
/* ===== globito de ayuda ===== */
.coach-bubble {
  position: fixed;
  right: 28px;
  bottom: 120px; /* encima de la barra verde */
  background: #1f2937;
  color: #fff;
  border-radius: 20px;
  padding: 18px 18px 16px;
  max-width: 280px;
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
  z-index: 11020;
  display: none;
}
.coach-bubble.show {
  display: block;
  animation: coachIn .3s ease;
}
@keyframes coachIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.coach-title {
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 4px;
}
.coach-text {
  font-size: 14px;
  line-height: 1.25;
  margin-bottom: 10px;
}
.coach-btn {
  background: #10b981;
  border: 0;
  color: #fff;
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}
.coach-close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ef4444;
  border: 0;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.coach-arrow {
  position: absolute;
  bottom: -12px;
  right: 35px;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid #1f2937;
}
@media (max-width: 600px) {
  .coach-bubble {
    right: 12px;
    left: 12px;
    bottom: 140px;
    max-width: none;
  }
}
/* === Centro SOLO cuando el popup está activo === */

/* popup grande de 30s */
#full-loading-popup.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#full-loading-popup.show .popup-content {
  margin: 0 auto;
  text-align: center;
}

/* popup final */
#final-popup.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#final-popup.show .popup-box {
  margin: 0 auto;
  text-align: center;
}
.mini-blue,
.mini-blue h3 {
  color: #fff !important;
}
