/* Shared styles for /tools pages, sits on top of product.css */

.tool-hero { margin-bottom: 40px; }
.tool-hero .app-name { font-size: 28px; }

.tool-updated {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 20px;
  animation: fadeUp 0.5s ease 0.1s both;
}

.panel h2 {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.2px;
  margin-bottom: 4px;
}

.panel > p, .hint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.panel > p { margin-bottom: 16px; }

/* Form fields */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

.field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  gap: 12px;
}

.field label, .field-label {
  font-size: 13px;
  font-weight: 500;
}

.count {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}

.count.over { color: #ef4444; }
.count.near { color: #eab308; }

input[type="text"], textarea, select {
  width: 100%;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea { resize: vertical; min-height: 44px; line-height: 1.55; }

input[type="text"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.meter {
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  margin-top: 6px;
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.15s, background 0.2s;
}

.meter span.near { background: #eab308; }
.meter span.over { background: #ef4444; }

/* Checks, radios */
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.check input { margin-top: 4px; accent-color: var(--accent); flex-shrink: 0; }
.check small { display: block; color: var(--muted); font-size: 12px; }
.check code, .panel code, .hint code {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  background: var(--accent-dim);
  padding: 1px 5px;
  border-radius: 4px;
}

.sub-checks {
  margin: 0 0 8px 26px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s, background 0.2s;
}

.chip input { accent-color: var(--accent); margin: 0; }
.chip:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }

/* Segmented tabs */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.seg button {
  font: inherit;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.seg button:hover { color: var(--text); border-color: var(--border-hover); }
.seg button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}

tr:last-child td { border-bottom: 0; }

td .px {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  white-space: nowrap;
  display: block;
}

td small { color: var(--muted); font-size: 12px; display: block; }

.tag {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
  border: 1px solid var(--border);
  color: var(--muted);
}

.tag.req { color: var(--accent); border-color: rgba(37,99,235,0.35); background: var(--accent-dim); }

/* Issue list */
.issues { list-style: none; margin-top: 12px; }

.issues li {
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 0 8px 22px;
  position: relative;
  border-top: 1px solid var(--border);
}

.issues li::before {
  position: absolute;
  left: 0;
  top: 8px;
  font-size: 12px;
}

.issues li.bad::before { content: '✕'; color: #ef4444; }
.issues li.warn::before { content: '!'; color: #eab308; font-weight: 600; left: 4px; }
.issues li.good::before { content: '✓'; color: #22c55e; }

/* Output */
.output {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  max-height: 460px;
}

.actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.btn {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.btn:hover { border-color: var(--border-hover); background: var(--surface-hover); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }

/* Drop zone */
.drop {
  display: block;
  border: 1.5px dashed var(--border-hover);
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-dim); color: var(--text); }
.drop input { display: none; }

/* Result card */
.result {
  border-radius: 12px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  margin-top: 16px;
}

.result.ok { border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.07); }
.result.act { border-color: rgba(234,179,8,0.4); background: rgba(234,179,8,0.07); }
.result h3 { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.result p { font-size: 14px; line-height: 1.6; color: var(--muted); margin-bottom: 8px; }

.q { padding: 14px 0; border-top: 1px solid var(--border); }
.q:first-of-type { border-top: 0; padding-top: 0; }
.q-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; line-height: 1.5; }
.q .hint { margin-bottom: 8px; }
.q-opts { display: flex; gap: 8px; }
.q[hidden] { display: none; }

/* FlightCheck plug */
.promo {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid rgba(37,99,235,0.3);
  background: linear-gradient(135deg, var(--accent-dim), transparent 70%);
  margin: 32px 0 20px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, border-color 0.2s;
}

.promo:hover { transform: translateY(-1px); border-color: var(--accent); }
.promo img { width: 48px; height: 48px; border-radius: 11px; flex-shrink: 0; }
.promo strong { display: block; font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.promo span { font-size: 13px; color: var(--muted); line-height: 1.5; }

.faq h3 { font-size: 15px; font-weight: 500; margin: 20px 0 6px; }
.faq p { font-size: 14px; color: var(--muted); line-height: 1.7; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 520px) {
  .panel { padding: 18px 16px; }
  .promo { flex-direction: column; text-align: center; }
}
