/* ICS Forms in Action — Tool Styles (Light-first) */
/* Assumes respondot.css defines base typography, .shell, .panel, .btn, etc. */

:root{
  --tool-bg: #f7f9ff;
  --tool-card: #ffffff;
  --tool-text: rgba(11,18,32,.92);
  --tool-muted: rgba(46,74,114,.75);
  --tool-ring: rgba(184,215,255,.95);
  --tool-shadow: 0 12px 30px rgba(7,15,31,.10);

  --accent: #2f7dff;
  --accent2: #13c6a3;

  --danger:#ff4d4d;
  --warn:#f59e0b;
  --ok:#22c55e;
  --info:#3b82f6;

  --radius: 18px;
}

/* Hero tweaks */
.tool-hero .tool-head{ display:flex; flex-direction:column; gap:10px; }
.tool-title{ margin:0; }
.tool-lead{ margin:0; }

/* Top bar */
.tool-bar{
  margin-top:10px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;

  background: linear-gradient(90deg, rgba(47,125,255,.10), rgba(19,198,163,.08));
  border: 1px solid rgba(47,125,255,.20);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--tool-shadow);
}

.tool-bar__left{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.tool-select{
  background: rgba(255,255,255,.96);
  color: var(--tool-text);
  border: 1px solid rgba(47,125,255,.25);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
  outline: none;
  min-width: 320px;
}
@media (max-width:640px){
  .tool-select{ min-width: 100%; width:100%; }
}

.pill{
  font-size: 12px;
  color: var(--tool-muted);
  border: 1px solid rgba(47,125,255,.20);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255,255,255,.85);
}

/* Legend */
.legend{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  font-size: 12px;
  color: var(--tool-muted);
}
.dot{ width:10px; height:10px; border-radius:50%; display:inline-block; margin-right:6px; }
.d-detect{ background: var(--danger); }
.d-contain{ background: var(--warn); }
.d-recover{ background: var(--accent2); }
.d-close{ background: var(--ok); }

/* Timeline */
.timeline{ margin: 18px 0 20px; display:grid; gap:10px; }
.timeline-track{
  height: 8px;
  border-radius: 999px;
  background: rgba(47,125,255,.08);
  border: 1px solid rgba(47,125,255,.18);
  overflow:hidden;
}
.timeline-fill{
  height:100%;
  width: 8%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.timeline-steps{
  display:grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 8px;
}
.step{
  text-align:center;
  font-size: 12px;
  color: var(--tool-muted);
  user-select:none;
  cursor:pointer;
  padding: 6px 6px;
  border-radius: 10px;
}
.step:hover{ background: rgba(47,125,255,.08); }
.step.active{
  color: var(--tool-text);
  font-weight: 800;
  background: rgba(47,125,255,.12);
}

/* Layout */
.tool-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
}
@media (max-width: 980px){
  .tool-grid{ grid-template-columns: 1fr; }
}

/* Cards grid */
.cards{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Form card */
.form-card{
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(247,251,255,.92));
  border: 1px solid var(--tool-ring);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--tool-shadow);
}
.form-card h3{
  margin: 10px 0 8px;
  font-size: 15.5px;
  color: var(--tool-text);
}
.form-card p{
  margin: 0;
  font-size: 13px;
  color: rgba(11,18,32,.86);
  line-height: 1.5;
}
.meta{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  align-items:center;
}
.tag{
  display:inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .2px;
}
.tag.src{ background: rgba(47,125,255,.10); border: 1px solid rgba(47,125,255,.28); color: rgba(11,18,32,.82); }
.tag.nwcg{ background: rgba(0,0,0,.04); border: 1px solid rgba(0,0,0,.10); color: rgba(11,18,32,.75); }
.tag.phase{ background: rgba(19,198,163,.10); border: 1px solid rgba(19,198,163,.25); color: rgba(11,18,32,.82); }

.actions{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  margin-top: 12px;
}

/* FEMA link in title */
.form-title-link{
  color: var(--tool-text);
  text-decoration: none;
}
.form-title-link:hover{
  text-decoration: underline;
  text-decoration-color: rgba(47,125,255,.45);
}

/* IAP */
.iap{
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(247,251,255,.92));
  border: 1px solid var(--tool-ring);
  border-radius: var(--radius);
  box-shadow: var(--tool-shadow);
  overflow:hidden;
}
.iap-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(184,215,255,.75);
}
.iap-header h2{
  margin:0;
  font-size: 15px;
  color: var(--tool-text);
}
.iap-body{ padding: 10px 16px 16px; }
.iap-item{
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items:center;
  padding: 10px 8px;
  border-bottom: 1px dashed rgba(47,125,255,.18);
}
.iap-item:last-child{ border-bottom:none; }
.iap-item small{ color: var(--tool-muted); }

/* Modal */
.modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding: 20px;
  background: rgba(7,15,31,.55);
}
.modal.open{ display:flex; }
.modal-card{
  max-width: 720px;
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(184,215,255,.95);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(7,15,31,.25);
  overflow:hidden;
}
.modal-header{
  padding: 14px 16px;
  border-bottom: 1px solid rgba(184,215,255,.75);
  display:flex;
  justify-content:space-between;
  align-items:baseline;
}
.modal-header h3{ margin:0; color: var(--tool-text); }
.close-x{
  all:unset;
  cursor:pointer;
  color: rgba(46,74,114,.75);
  font-weight: 900;
}
.modal-body{ padding: 14px 16px; color: rgba(11,18,32,.86); }
.modal-body a{ color: var(--accent); }
.modal-footer{
  padding: 12px 16px 16px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  border-top: 1px solid rgba(184,215,255,.75);
}

.tool-footer-note{
  margin-top: 18px;
  font-size: 12px;
  color: var(--tool-muted);
  text-align:center;
}
.tool-footer-note a{ color: var(--accent); text-decoration:none; }
.tool-footer-note a:hover{ text-decoration:underline; }
