/* ============================================================================
   ISD / AIT — Component primitives
   Depends on colors_and_type.css. Reusable across previews and UI kits.
   ============================================================================ */

/* ---- Buttons: capsule system -------------------------------------------- */
.btn {
  font-family: var(--font-sans); font-weight: 600; font-size: 14px;
  padding: 10px 20px; border-radius: var(--radius-pill);
  border: 1px solid transparent; cursor: pointer;
  transition: transform 80ms ease, background 150ms ease, color 150ms ease,
              border-color 150ms ease, box-shadow 150ms ease;
  display: inline-flex; align-items: center; gap: 8px;
  letter-spacing: -0.005em; white-space: nowrap; text-decoration: none; line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--isd-blue); outline-offset: 2px; }
.btn--primary { background: var(--isd-red); color: #fff; }
.btn--primary:hover { background: var(--isd-red-deep); box-shadow: var(--shadow-sm); }
.btn--ghost { background: transparent; color: var(--fg-1); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-tint); }
.btn--text { background: transparent; color: var(--fg-2); padding: 8px 12px; }
.btn--text:hover { color: var(--fg-1); }
.btn--dark { background: var(--surface-ink); color: #fff; }
.btn--dark:hover { background: #000; }

/* ---- Filter-bar buttons: squared, mono-labelled secondary ---------------- */
.btn-export, .btn-jump, .btn-clear {
  padding: .3rem .7rem; border: 1px solid var(--border-mid); background: #fff;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 12px;
  font-family: var(--font-mono); letter-spacing: .03em; text-decoration: none;
  color: var(--fg-2); transition: all 150ms;
}
.btn-clear { font-family: var(--font-sans); }
.btn-export:hover { border-color: var(--isd-blue); color: var(--isd-blue); }
.btn-clear:hover  { border-color: var(--isd-red);  color: var(--isd-red); }
.btn-jump { border-color: var(--isd-red); color: var(--isd-red); }
.btn-jump:hover { background: var(--isd-red); color: #fff; }

/* ---- Pills / tags -------------------------------------------------------- */
.pill {
  padding: .3rem .7rem; border-radius: var(--radius-sm); font-size: 12px;
  font-weight: 600; cursor: pointer; transition: all 150ms ease;
  border: 1.5px solid var(--border-mid); user-select: none; letter-spacing: .02em;
  background: #fff; color: var(--fg-2);
}
.pill:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.pill.active { color: #fff !important; }

.tag {
  border: 1px solid var(--border-mid); padding: .2rem .45rem;
  border-radius: var(--radius-sm); font-size: 12px; cursor: pointer;
  transition: all 150ms ease; color: var(--fg-1); font-weight: 500; background: #fff;
}
.tag:hover { box-shadow: 0 0 0 2px rgba(199,7,77,.08); border-color: var(--isd-red); transform: translateY(-1px); }
.tag-ttp { background: rgba(0,0,0,.03); border-color: #ccc; color: #888; font-size: 10px; }
.tag-sep { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: #bbb; padding: 0 .15rem; align-self: center; }

/* ---- Card + card-title --------------------------------------------------- */
.card {
  background: #fff; border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); border: 1px solid var(--border-soft);
  position: relative; overflow: hidden;
}
.card-title {
  padding: .75rem 1rem; border-bottom: 1px solid var(--border-soft);
  text-transform: uppercase; letter-spacing: .12em; font-weight: 600;
  display: flex; align-items: baseline; gap: .5rem; font-size: .85rem; color: var(--fg-1);
}
.card-title .sub { font-size: 11px; opacity: .6; letter-spacing: .08em; font-family: var(--font-mono); }

/* ---- Info-tip badge ------------------------------------------------------ */
.info-tip {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; margin-left: .35em;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  color: #fff; background: #8a9aa3; border-radius: 50%; cursor: help;
  user-select: none; transition: background .15s ease;
}
.info-tip:hover, .info-tip:focus { background: var(--isd-blue); outline: none; }

/* ---- Inline callouts (functional left-rule) ------------------------------ */
.callout {
  font-size: 13px; line-height: 1.5; color: var(--fg-2);
  padding: .6rem .85rem; border-left: 3px solid var(--border-mid);
  background: rgba(0,0,0,.02); border-radius: 3px;
}
.callout strong { color: var(--fg-1); }
.callout--lede   { border-left-color: var(--isd-blue); font-size: 15px; color: var(--fg-2); background: none; }
.callout--warn   { border-left-color: var(--accent-yellow); background: #fff7e6; color: #5C4A1F; }

/* ---- Inputs / selects ---------------------------------------------------- */
.field {
  padding: .4rem .9rem; border: 1px solid var(--border-mid); border-radius: var(--radius-md);
  background: #fff; font-size: .9rem; font-family: var(--font-sans); color: var(--fg-1);
  outline: none; transition: border-color 200ms;
}
.field:focus { border-color: var(--isd-red); }
select.field { border-radius: var(--radius-sm); }

/* ---- "Stamp" (declassified file) ---------------------------------------- */
.stamp {
  font-family: var(--font-mono); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 3px; color: rgba(180,30,30,.5);
  border: 2px solid rgba(180,30,30,.3); display: inline-block;
  padding: .15rem .6rem; border-radius: 2px;
}
