@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f1f5f9;
  color: #1e293b;
  font-family: 'Poppins', sans-serif;
}

.app {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1rem 25vh 1rem;
  position: relative;
}

/* NUEVO HEADER */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.hidden {
  display: none !important;
}

/* MODIFICADO */
.language-selector {
  display: flex;
  gap: 10px;
}

.lang {
  border: none;
  background: transparent;
  color: #1e293b;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 4px;
}

.lang.active {
  color: #ef4444;
}

.screen {
  width: 100%;
}

.titulo {
  text-align: center;
  font-size: clamp(34px, 9vw, 46px);
  font-weight: 700;
  color: #0f172a; 
  letter-spacing: -1.2px;
  margin: 1.2rem 0 0.5rem 0;
  line-height: 1;
}

.titulo span {
  color: #ef4444;
  font-weight: 400;
  letter-spacing: -0.5px;
}

.subtitulo {
  text-align: center;
  color: #64748b;
  font-size: 1.05rem;
  margin-bottom: 2rem;
  margin-top: -0.5rem;
  font-weight: 500;
}

.texto-centro {
  text-align: center;
  color: #64748b;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.btn-principal {
  width: 100%;
  min-height: 100px;
  border: none;
  border-radius: 15px;
  background: #ef4444;
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-principal small {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.9;
}

.btn-principal.compacto {
  min-height: 48px;
  font-size: 1rem;
  margin-top: 1rem;
  box-shadow: none;
}

.btn-secundario {
  width: 100%;
  min-height: 50px;
  margin-top: 1.2rem;
  border: 2px solid #ef4444;
  border-radius: 12px;
  background: transparent;
  color: #ef4444;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-secundario:hover {
  background: #ef4444;
  color: white;
}

.select {
  width: 100%;
  min-height: 50px;
  height: 50px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #1e293b;
  padding: 0 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  line-height: 50px;
  outline: none;
}

.select-compacto {
  min-height: 44px;
  height: 44px;
  line-height: 44px;
  font-size: 0.95rem;
  border-radius: 12px;
  padding-right: 38px;
}

.autocomplete {
  position: relative;
  width: 100%;
}

.btn-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.15s ease;
  z-index: 5;
}

.btn-clear:hover {
  color: #475569;
}

.sugerencias {
  position: absolute;
  z-index: 9999;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  max-height: 140px;
  overflow-y: auto;
}

.sugerencia-item {
  min-height: 46px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
}

.sugerencia-item:last-child {
  border-bottom: none;
}

.sugerencia-item:hover,
.sugerencia-item.active {
  background: #f8fafc;
  color: #1e293b;
}

.zona-filtros {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  padding: 0.8rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filtros-grid {
  display: flex;
  gap: 8px;
  width: 100%;
}

.radio-group {
  display: flex;
  gap: 8px;
  flex: 1;
}

.radio-btn,
.fuel-btn {
  flex: 1;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.radio-btn:hover,
.fuel-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.radio-btn.active,
.fuel-btn.active {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: none;
}

.cabecera-buscar,
.cabecera-resultados {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.cabecera-resultados {
  border-top: 1px solid #e2e8f0;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.gasolinera-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: grid;
  grid-template-columns: 2.5fr 1.5fr;
  gap: 1rem;
  align-items: center;
}

.gasolinera-card h3 {
  margin: 0 0 0.4rem 0;
  color: #1e293b;
  font-size: 1.05rem;
  font-weight: 600;
}

.gasolinera-card p {
  margin: 0.25rem 0;
  color: #334155;
  font-size: 0.9rem;
}

.gasolinera-card .distancia {
  color: #64748b;
  font-size: 0.85rem;
}

.btn-navegar {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.btn-navegar:hover {
  background: #e2e8f0;
}

.mensaje {
  text-align: center;
  color: #64748b;
  padding: 1rem;
}

/* BOTÓN X */
.twitter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #0f172a;
  color: white;
  border-radius: 8px;
  text-decoration: none;
}

.twitter-btn:hover {
  background: #000;
}

@media (max-width: 520px) {
  .app {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .filtros-grid {
    flex-direction: column;
    gap: 6px;
  }

  .gasolinera-card {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .btn-navegar {
    min-height: 44px;
  }

  .sugerencias {
    top: calc(100% + 6px);
    max-height: 140px;
  }

  .sugerencia-item {
    min-height: 48px;
    padding: 11px 14px;
  }
}

/* --- BANNER PWA FLOTANTE --- */
.pwa-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 720px;
  background-color: #1e293b;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.4);
  z-index: 10000;
  padding: 14px 16px;
  display: flex;
  opacity: 1;
  transition: opacity 0.3s ease, bottom 0.3s ease;
}

.pwa-banner.hidden {
  display: none !important;
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
}

.pwa-icon {
  width: 44px;
  height: 44px;
  background-color: #0f172a;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-icon .dot {
  width: 18px;
  height: 18px;
  background-color: #ef4444;
  border-radius: 50%;
}

.pwa-text-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pwa-title {
  margin: 0;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.pwa-title span {
  color: #ef4444;
  font-weight: 400;
}

.pwa-desc {
  margin: 4px 0 0 0;
  color: #94a3b8;
  font-size: 0.75rem;
  line-height: 1.3;
}

.pwa-desc.ios-text {
  color: #e2e8f0;
}

/* MODIFICADO: Altura fija estricta y centrado interno blindado */
.pwa-btn {
  background-color: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 20px;
  height: 36px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.pwa-close {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 0 0 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.pwa-close:hover {
  color: #f8fafc;
}
