/* CERCA - PREVENCION V1.0.0 - overrides canonicos */
.cerca-prevention-grid16{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:10px}

.cerca-prevention-grid16 button{border:1px solid var(--border-color);background:var(--bg-card);color:inherit;border-radius:15px;padding:10px;text-align:left;min-height:92px}

.cerca-prevention-grid16 .material-icons-round{font-size:23px;color:#22c55e}

.cerca-prevention-grid16 strong{display:block;font-size:.59rem;margin-top:5px}

.cerca-prevention-grid16 small{display:block;font-size:.46rem;color:var(--text-secondary);margin-top:2px;line-height:1.3}

.cerca-prevention-detail16{margin-top:10px;border:1px solid var(--border-color);border-radius:16px;background:var(--bg-card);padding:12px}

.cerca-prevention-detail16>span{color:#22c55e}

.cerca-prevention-detail16 strong{display:block;font-size:.68rem;margin-top:5px}

.cerca-prevention-detail16 p{font-size:.53rem;color:var(--text-secondary);line-height:1.45;margin:5px 0 0}

/* ============================================================
   CERCA V1.7 — PREVENCIÓN INTELIGENTE
   ============================================================ */
.cerca-prev-scroll17{padding-top:9px!important}

.cerca-prev-status17{
    border:1px solid rgba(34,197,94,.20);
    border-radius:20px;
    padding:13px;
    background:
      radial-gradient(circle at 92% 0%,rgba(34,197,94,.12),transparent 38%),
      linear-gradient(145deg,rgba(34,197,94,.07),rgba(15,23,42,.35));
}

body.light-theme .cerca-prev-status17{
    background:linear-gradient(145deg,rgba(34,197,94,.06),#fff)
}

.cerca-prev-status-top17{
    display:grid;grid-template-columns:minmax(0,1fr) 64px;gap:10px;align-items:center
}

.cerca-prev-status17 small,.cerca-prev-section-head17 small,.cerca-prev-tip17 small{
    display:block;font-size:.43rem;font-weight:950;letter-spacing:.10em;color:#22c55e
}

.cerca-prev-status17 h3{font-size:.78rem;margin:4px 0 3px}

.cerca-prev-status17 p{font-size:.52rem;line-height:1.4;color:var(--text-secondary);margin:0}

.cerca-prev-score17{
    width:64px;height:64px;border-radius:50%;
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    border:1px solid rgba(34,197,94,.28);
    background:rgba(34,197,94,.08)
}

.cerca-prev-score17 strong{font-size:1rem}

.cerca-prev-score17 span{font-size:.42rem;color:var(--text-secondary)}

.cerca-prev-signals17{
    display:flex;gap:6px;overflow-x:auto;margin-top:10px;padding-bottom:1px;scrollbar-width:none
}

.cerca-prev-signals17::-webkit-scrollbar{display:none}

.cerca-prev-signals17 span{
    flex:0 0 auto;display:flex;align-items:center;gap:4px;
    padding:5px 8px;border-radius:999px;
    border:1px solid var(--border-color);background:rgba(255,255,255,.025);
    color:var(--text-secondary);font-size:.47rem;font-weight:800
}

.cerca-prev-signals17 i{font-size:13px;color:#38bdf8}

.cerca-prev-question17,.cerca-prev-actions17{margin-top:14px}

.cerca-prev-section-head17{display:flex;align-items:end;justify-content:space-between;margin-bottom:7px}

.cerca-prev-section-head17 h3{font-size:.70rem;margin:2px 0 0}

.cerca-prev-section-head17>span{font-size:18px;color:#22c55e}

.cerca-prev-topic-grid17{display:grid;grid-template-columns:1fr 1fr;gap:7px}

.cerca-prev-topic-grid17 button{
    min-width:0;border:1px solid var(--border-color);border-radius:16px;background:var(--bg-card);color:inherit;
    padding:10px;display:grid;grid-template-columns:30px minmax(0,1fr) 18px;gap:7px;align-items:center;text-align:left
}

.cerca-prev-topic-grid17 button>span:first-child{
    width:30px;height:30px;border-radius:10px;background:rgba(34,197,94,.09);
    display:flex;align-items:center;justify-content:center;color:#22c55e;font-size:18px
}

.cerca-prev-topic-grid17 button>span:last-child{font-size:17px;color:var(--text-secondary)}

.cerca-prev-topic-grid17 strong{display:block;font-size:.56rem;line-height:1.2}

.cerca-prev-topic-grid17 small{display:block;font-size:.45rem;color:var(--text-secondary);line-height:1.3;margin-top:2px}

.cerca-prev-action-grid17{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}

.cerca-prev-action-grid17 button{
    border:1px solid var(--border-color);border-radius:15px;background:rgba(255,255,255,.025);
    color:inherit;padding:9px 5px;text-align:center;min-width:0
}

.cerca-prev-action-grid17 .material-icons-round{font-size:21px;color:#38bdf8}

.cerca-prev-action-grid17 strong{display:block;font-size:.51rem;margin-top:4px}

.cerca-prev-action-grid17 small{display:block;font-size:.42rem;line-height:1.25;color:var(--text-secondary);margin-top:2px}

.cerca-prev-tip17{
    margin-top:13px;border:1px solid rgba(245,158,11,.18);border-radius:16px;padding:10px;
    background:rgba(245,158,11,.05);display:grid;grid-template-columns:28px minmax(0,1fr);gap:8px
}

.cerca-prev-tip17>span{font-size:24px;color:#fbbf24}

.cerca-prev-tip17 small{color:#fbbf24}

.cerca-prev-tip17 strong{display:block;font-size:.60rem;margin-top:3px}

.cerca-prev-tip17 p{font-size:.48rem;color:var(--text-secondary);line-height:1.4;margin:3px 0 0}

/* Guide bottom sheet */
.cerca-prev-guide-backdrop17{
    position:absolute;inset:0;z-index:30;background:rgba(2,6,23,.64);
    display:none;align-items:flex-end;backdrop-filter:blur(5px)
}

.cerca-prev-guide-backdrop17.show{display:flex}

.cerca-prev-guide17{
    width:100%;max-height:78%;overflow:hidden;border-radius:24px 24px 0 0;
    background:var(--bg-main);border-top:1px solid var(--border-color);
    display:flex;flex-direction:column
}

.cerca-prev-guide-head17{
    display:flex;align-items:flex-start;justify-content:space-between;gap:10px;
    padding:13px 13px 10px;border-bottom:1px solid var(--border-color)
}

.cerca-prev-guide-head17 small{font-size:.43rem;color:#22c55e;font-weight:950;letter-spacing:.1em}

.cerca-prev-guide-head17 h3{font-size:.86rem;margin:3px 0 0}

.cerca-prev-guide-head17 button{
    width:36px;height:36px;border:0;border-radius:11px;background:rgba(148,163,184,.1);color:inherit
}

.cerca-prev-guide-content17{overflow-y:auto;padding:11px 13px}

.cerca-prev-step17{
    display:grid;grid-template-columns:24px minmax(0,1fr);gap:8px;padding:8px 0;border-bottom:1px solid var(--border-color)
}

.cerca-prev-step17:last-child{border-bottom:0}

.cerca-prev-step17 b{
    width:24px;height:24px;border-radius:8px;background:rgba(34,197,94,.1);color:#22c55e;
    display:flex;align-items:center;justify-content:center;font-size:.51rem
}

.cerca-prev-step17 strong{display:block;font-size:.58rem}

.cerca-prev-step17 p{font-size:.48rem;line-height:1.4;color:var(--text-secondary);margin:2px 0 0}

.cerca-prev-guide-actions17 button{
    flex:1;border:0;border-radius:12px;padding:9px;font-size:.53rem;font-weight:900
}

.cerca-prev-guide-actions17 .primary{background:#16a34a;color:#fff}

.cerca-prev-guide-actions17 .secondary{background:var(--bg-card);color:var(--text-primary);border:1px solid var(--border-color)}

/* Prevención */
.cerca-prev-status17 small,
.cerca-prev-section-head17 small,
.cerca-prev-tip17 small,
.cerca-prev-guide-head17 small{
  font-size: var(--cerca-fs-xs)!important;
}

.cerca-prev-status17 h3,
.cerca-prev-section-head17 h3,
.cerca-prev-guide-head17 h3{
  font-size: var(--cerca-fs-lg)!important;
}

.cerca-prev-status17 p,
.cerca-prev-topic-grid17 small,
.cerca-prev-action-grid17 small,
.cerca-prev-tip17 p,
.cerca-prev-step17 p{
  font-size: var(--cerca-fs-sm)!important;
  line-height: 1.45!important;
}

.cerca-prev-topic-grid17 strong,
.cerca-prev-action-grid17 strong,
.cerca-prev-tip17 strong,
.cerca-prev-step17 strong{
  font-size: var(--cerca-fs-md)!important;
}

.cerca-prev-topic-grid17 button{
  min-height: 82px!important;
  padding: 12px!important;
}

.cerca-prev-action-grid17 button{
  min-height: 82px!important;
  padding: 10px!important;
}

.cerca-prev-guide-actions17 button{
  min-height: var(--cerca-touch)!important;
  font-size: var(--cerca-fs-sm)!important;
}
.cerca-prev-guide-actions17{
    flex:0 0 auto;display:flex;gap:7px;padding:9px 12px calc(10px + env(safe-area-inset-bottom));
    border-top:1px solid var(--border-color)
}

@media(max-width:420px){
    .cerca-prev-topic-grid17{grid-template-columns:1fr}
    .cerca-prev-action-grid17{grid-template-columns:repeat(2,1fr)}
    .cerca-prev-action-grid17 button{display:grid;grid-template-columns:25px minmax(0,1fr);grid-template-rows:auto auto;text-align:left;column-gap:6px}
    .cerca-prev-action-grid17 .material-icons-round{grid-row:1/3;align-self:center}
}

/* Pantallas pequeñas */
@media(max-width:420px){
  .content-scroll,
  .cerca-v16-scroll,
  .cerca-feed-scroll15{
    padding-left:10px!important;
    padding-right:10px!important;
  }

  .cerca-home-tools-grid{
    grid-template-columns:1fr 1fr!important;
  }

  .cerca-prev-topic-grid17,
  .cerca-tool-grid16{
    grid-template-columns:1fr!important;
  }

  .cerca-prev-action-grid17{
    grid-template-columns:1fr 1fr!important;
  }

  .cerca-summary-grid15{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  .cerca-help-types12{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .cerca-route-bottom12{
    grid-template-columns:1fr!important;
  }
}

/* Muy angosto */
@media(max-width:350px){
  :root{
    --cerca-fs-xs: 11px;
    --cerca-fs-sm: 12px;
    --cerca-fs-md: 13px;
    --cerca-fs-lg: 15px;
    --cerca-fs-xl: 18px;
  }

  .cerca-home-tools-grid,
  .cerca-prev-action-grid17,
  .cerca-help-types12{
    grid-template-columns:1fr!important;
  }

  .bottom-nav .nav-item span:last-child{
    font-size:10px!important;
  }
}

/* CERCA V1.7.2 — Prevención conserva el nav inferior */
#cercaPreventionView16{
    bottom: calc(58px + env(safe-area-inset-bottom))!important;
}

#cercaPreventionView16 .cerca-prev-scroll17{
    padding-bottom: calc(20px + env(safe-area-inset-bottom))!important;
}

#cercaPreventionView16 .cerca-prev-guide-backdrop17{
    position:fixed!important;
    bottom: calc(58px + env(safe-area-inset-bottom))!important;
}
