/* =============================================
   EscalaLocation — Estilos para UI de ubicación
   ============================================= */

/* ─────────────────────────────────────────────
   Banner CTA de GPS
   ───────────────────────────────────────────── */

.eloc-gps-cta {
  position: fixed;
  bottom: 0px;
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(30, 55, 18, 0.95);
  color: #fff;
  padding: 10px 16px 12px;
}

.eloc-gps-cta__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  width: 85%;
}

.eloc-gps-cta__icon {
  font-size: 1rem;
  margin-right: 3px;
}

.eloc-gps-cta__text {
  flex: 1;
  font-size: 0.825rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile: X izquierda + botón centrado, descripción oculta */
@media (max-width: 600px) {
  .eloc-gps-cta__text {
    display: none;
  }
  .eloc-gps-cta__inner {
    justify-content: left;
    margin: 0;
  }
  .eloc-gps-cta__dismiss {
    order: 1;
  }
  .eloc-gps-cta__allow {
    order: 2;
  }
}

.eloc-gps-cta__allow {
  background: #fff;
  color: #2C541D;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.eloc-gps-cta__allow:hover {
  opacity: 0.85;
}

.eloc-gps-cta__dismiss {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s;
}

.eloc-gps-cta__dismiss:hover {
  color: #fff;
}

/* ─────────────────────────────────────────────
   Selector manual de comuna
   ───────────────────────────────────────────── */

.eloc-manual-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #D9D9D9;
  border-radius: 6px;
  font-size: 0.875rem;
  background: #fff;
  color: var(--escala-text, #1a1a1a);
  cursor: pointer;
}

.eloc-manual-select:focus {
  outline: 2px solid #2C541D;
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────
   Panel de debug (solo admins)
   ───────────────────────────────────────────── */

#escala-location-debug {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.4;
}

.eloc-debug__toggle {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2C541D;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.3);
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: transform 0.15s;
  margin-left: auto; /* alinea el botón a la derecha */
}

.eloc-debug__toggle:hover {
  transform: scale(1.08);
}

.eloc-debug__body {
  background: #1a1a1a;
  color: #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  width: 240px;
  overflow: hidden;
  margin-bottom: 8px;
  transition: opacity 0.15s, transform 0.15s;
}

/* Estado colapsado */
.eloc-debug.collapsed .eloc-debug__body {
  display: none;
}

.eloc-debug__title {
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #aaa;
  border-bottom: 1px solid #333;
}

.eloc-debug__rows {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.eloc-debug__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.eloc-debug__label {
  color: #888;
  flex-shrink: 0;
}

.eloc-debug__val {
  color: #e0e0e0;
  text-align: right;
  word-break: break-all;
}

.eloc-debug__msg {
  color: #facc15;
  font-style: italic;
}

.eloc-debug__actions {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  border-top: 1px solid #333;
  flex-wrap: wrap;
}

.eloc-debug__btn {
  background: #333;
  color: #e0e0e0;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.eloc-debug__btn:hover {
  background: #444;
}

.eloc-debug__btn--clear {
  background: #4a1a1a;
  color: #f87171;
  margin-left: auto;
}

.eloc-debug__btn--clear:hover {
  background: #5a2020;
}
