/* whats-is-my-ip — tool-specific styles.
   Brand/chrome: /shared/apitools-theme.css  |  Framework: vendored PicoCSS */

/* ── Hero section ────────────────────────────────────────────────────────── */
.hero-section {
  margin-bottom: 2rem;
  padding: 2rem 0 1rem;
}

.hero-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  opacity: 0.6;
  margin-bottom: 0.25rem;
}

.hero-ip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.ip-display {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-family: var(--pico-font-family-monospace, monospace);
  font-weight: 700;
  margin: 0;
  line-break: anywhere;
}

.hero-intro {
  opacity: 0.75;
  max-width: 52ch;
}

/* ── Version badge ────────────────────────────────────────────────────────── */
.version-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 2rem;
  border: 1px solid var(--pico-muted-border-color);
  white-space: nowrap;
}

/* ── Copy button ──────────────────────────────────────────────────────────── */
.copy-btn {
  font-size: 0.85rem;
  padding: 0.3rem 0.9rem;
}

/* ── Cards row ────────────────────────────────────────────────────────────── */
.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.info-card {
  margin: 0;
}

.card-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.6;
  margin-bottom: 0.75rem;
}

/* ── Geo card ─────────────────────────────────────────────────────────────── */
.geo-flag {
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
  line-height: 1;
}

.geo-credit {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
}

/* ── Definition list ──────────────────────────────────────────────────────── */
.info-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.1rem 1rem;
  margin: 0;
}

.info-dl dt {
  opacity: 0.6;
  font-size: 0.85rem;
  white-space: nowrap;
}

.info-dl dd {
  margin: 0;
  font-size: 0.9rem;
}

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.ua-badge, .threat-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-desktop { background: var(--pico-muted-color); color: var(--pico-background-color); }
.badge-mobile  { background: #38bdf8; color: #001a24; }
.badge-tablet  { background: #818cf8; color: #05001a; }
.badge-bot     { background: #f87171; color: #1a0000; }

/* ── Threat card ──────────────────────────────────────────────────────────── */
.threat-card {
  margin-bottom: 1rem;
}

.threat-clean {
  color: #4ade80;
  font-weight: 600;
}

.threat-badges {
  margin-bottom: 0.75rem;
}

.badge-tor     { background: #f87171; color: #1a0000; }
.badge-proxy   { background: #fb923c; color: #1a0000; }
.badge-hosting { background: #fbbf24; color: #1a0800; }

/* ── AbuseIPDB score ──────────────────────────────────────────────────────── */
.abuse-score {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.abuse-label { font-size: 0.85rem; opacity: 0.75; }
.abuse-pct   { font-weight: 700; font-size: 0.9rem; }

.abuse-bar {
  flex: 1 1 120px;
  height: 8px;
  min-width: 80px;
}

.abuse-reports { font-size: 0.8rem; }

/* ── Headers section ──────────────────────────────────────────────────────── */
.headers-section {
  margin-bottom: 1.5rem;
}

.headers-section summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  padding: 0.75rem 0;
  opacity: 0.75;
}

.headers-section summary::before {
  content: "▸ ";
}

.headers-section[open] summary::before {
  content: "▾ ";
}

.headers-table {
  width: 100%;
  font-size: 0.85rem;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.headers-table th {
  text-align: left;
  white-space: nowrap;
  padding: 0.3rem 1rem 0.3rem 0;
  opacity: 0.65;
  vertical-align: top;
  width: 1%;
}

.headers-table td {
  padding: 0.3rem 0;
  word-break: break-all;
}

.headers-table code {
  font-size: 0.8rem;
  background: none;
  padding: 0;
}

/* ── API hint ─────────────────────────────────────────────────────────────── */
.api-hint {
  margin-top: 2rem;
  font-size: 0.875rem;
}

/* Alpine cloak — hide x-show elements before Alpine initialises */
[x-cloak] { display: none !important; }
