/* =========================================================
   PO Buscador por Anillo - Front CSS
   Archivo: assets/css/front.css
   ========================================================= */

.po-ba{
  --po-bg:#ffffff;
  --po-bg-soft:#f7f8fb;
  --po-text:#0f172a;
  --po-muted:#64748b;
  --po-line:rgba(15,23,42,.12);
  --po-shadow:0 10px 26px rgba(2,6,23,.08);
  --po-radius:18px;

  max-width:980px;
  margin:18px auto;
  padding:16px;
  color:var(--po-text);
  font-family:inherit;
}

/* ---- Formulario ---- */
.po-ba__form{
  background:var(--po-bg);
  border:1px solid var(--po-line);
  border-radius:var(--po-radius);
  padding:16px;
  box-shadow:var(--po-shadow);
}

.po-ba__label{
  display:block;
  font-weight:900;
  font-size:14px;
  margin:0 0 10px 0;
}

.po-ba__row{
  display:flex;
  gap:10px;
  align-items:stretch;
}

.po-ba__input{
  flex:1;
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.18);
  background:#fff;
  color:var(--po-text);
  font-size:15px;
  outline:none;
  transition:border-color .12s ease, box-shadow .12s ease;
}

.po-ba__input:focus{
  border-color:rgba(37,99,235,.55);
  box-shadow:0 0 0 4px rgba(37,99,235,.14);
}

.po-ba__btn{
  padding:12px 16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.18);
  background:linear-gradient(135deg,#111827,#0b1220);
  color:#fff;
  font-weight:900;
  font-size:14px;
  cursor:pointer;
  transition:transform .12s ease, filter .12s ease, box-shadow .12s ease;
  box-shadow:0 10px 18px rgba(2,6,23,.18);
  white-space:nowrap;
}

.po-ba__btn:hover{
  filter:brightness(1.05);
  transform:translateY(-1px);
}

.po-ba__btn:active{
  transform:translateY(0);
  filter:brightness(.98);
}

.po-ba__help{
  margin:10px 0 0 0;
  color:var(--po-muted);
  font-size:13px;
}

/* ---- Mensajes/boxes ---- */
.po-ba__box{
  margin:14px 0 0 0;
  padding:12px 14px;
  border-radius:14px;
  background:var(--po-bg-soft);
  border:1px solid var(--po-line);
  color:var(--po-text);
  font-weight:700;
}

.po-ba__box--ok{
  background:rgba(16,185,129,.10);
  border-color:rgba(16,185,129,.25);
}

.po-ba__box--warn{
  background:rgba(245,158,11,.10);
  border-color:rgba(245,158,11,.25);
}

/* ---- Grupos / Resultados ---- */
.po-ba__group{
  margin-top:16px;
}

.po-ba__h{
  margin:12px 0 10px 0;
  font-size:16px;
  font-weight:1000;
  letter-spacing:.2px;
}

.po-ba__grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

/* Cards (modo nuevo .po-ba__) */
.po-ba__card{
  display:block;
  text-decoration:none;
  background:var(--po-bg);
  border:1px solid var(--po-line);
  border-radius:var(--po-radius);
  padding:14px;
  box-shadow:0 10px 22px rgba(2,6,23,.06);
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  color:inherit;
}

.po-ba__card:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 34px rgba(2,6,23,.10);
  border-color:rgba(37,99,235,.22);
}

.po-ba__cardTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.po-ba__badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(37,99,235,.10);
  border:1px solid rgba(37,99,235,.22);
  color:#1d4ed8;
  font-weight:1000;
  font-size:12px;
  letter-spacing:.2px;
}

.po-ba__status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(15,23,42,.06);
  border:1px solid rgba(15,23,42,.12);
  color:rgba(15,23,42,.72);
  font-weight:900;
  font-size:12px;
}

.po-ba__title{
  font-size:15px;
  font-weight:1000;
  line-height:1.2;
  margin:0 0 8px 0;
}

.po-ba__meta{
  font-size:13px;
  color:var(--po-muted);
  line-height:1.25;
}

/* =========================================================
   Compatibilidad con clases antiguas (.po-pa-*)
   (por si tu Search/Renderer imprime estas clases)
   ========================================================= */

.po-ba .po-pa-wrap{
  margin-top:14px;
}

.po-ba .po-pa-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

.po-ba .po-pa-card{
  background:var(--po-bg);
  border:1px solid var(--po-line);
  border-radius:var(--po-radius);
  padding:14px;
  box-shadow:0 10px 22px rgba(2,6,23,.06);
}

.po-ba .po-pa-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.po-ba .po-pa-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(2,6,23,.06);
  border:1px solid rgba(2,6,23,.10);
  color:rgba(2,6,23,.80);
  font-weight:1000;
  font-size:12px;
}

.po-ba .po-pa-title{
  margin:0 0 8px 0;
  font-size:15px;
  font-weight:1000;
  line-height:1.2;
}

.po-ba .po-pa-meta{
  font-size:13px;
  color:var(--po-muted);
  line-height:1.25;
}

/* ---- BOTÓN "Ver anuncio completo" (mejorado) ---- */
.po-ba .po-pa-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  margin-top:12px;
  width:100%;
  padding:12px 14px;

  border-radius:14px;
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  color:#fff;
  text-decoration:none;

  font-weight:900;
  font-size:14px;
  letter-spacing:.2px;

  box-shadow:0 10px 18px rgba(37,99,235,.22);
  border:1px solid rgba(255,255,255,.18);

  transition:transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.po-ba .po-pa-btn::after{
  content:"→";
  font-size:16px;
  line-height:1;
  opacity:.95;
  transform:translateX(0);
  transition:transform .12s ease;
}

.po-ba .po-pa-btn:hover{
  filter:brightness(1.03);
  box-shadow:0 14px 26px rgba(37,99,235,.28);
  transform:translateY(-1px);
}

.po-ba .po-pa-btn:hover::after{
  transform:translateX(3px);
}

.po-ba .po-pa-btn:active{
  transform:translateY(0);
  box-shadow:0 9px 16px rgba(37,99,235,.20);
}

.po-ba .po-pa-btn:focus{
  outline:none;
}

.po-ba .po-pa-btn:focus-visible{
  box-shadow:0 0 0 4px rgba(37,99,235,.25), 0 14px 26px rgba(37,99,235,.22);
}

/* ---- Responsive ---- */
@media (max-width:560px){
  .po-ba{
    padding:12px;
  }
  .po-ba__row{
    flex-direction:column;
  }
  .po-ba__btn{
    width:100%;
  }
}

@media (min-width:680px){
  .po-ba__grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .po-ba .po-pa-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (min-width:1024px){
  .po-ba__grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
  .po-ba .po-pa-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}
/* Botón Buscar más grande */
.po-ba__btn{
  font-size: 18px !important;
  padding: 12px 18px !important;
  line-height: 1 !important;
}
