/*!
 * px-tools.css — shared styling for Pioneer Express freight tool pages.
 * Depends on Style/style.css for brand tokens (--amber, --amber-lt).
 */

.px-tool-hero {
  background: linear-gradient(135deg, #122d57 0%, #1c437e 100%);
  color: #fff;
  padding: 56px 0 64px;
}
.px-tool-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.2; margin-bottom: 12px; }
.px-tool-hero p { max-width: 720px; color: rgba(255, 255, 255, .78); font-size: 1rem; line-height: 1.65; }
.px-tool-crumb { font-size: .8rem; color: rgba(255, 255, 255, .5); margin-bottom: 14px; }
.px-tool-crumb a { color: rgba(255, 255, 255, .72); text-decoration: none; }
.px-tool-crumb a:hover { color: var(--amber-lt, #ffc46b); }

.px-tool-main { padding: 44px 0 64px; background: #f7f8fa; }
.px-tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .px-tool-layout { grid-template-columns: 1fr; } }

.px-card {
  background: #fff;
  border: 1px solid #e3e6ec;
  border-radius: 14px;
  padding: 26px;
  margin-bottom: 24px;
}
.px-card h2 { font-size: 1.15rem; color: #1c437e; margin-bottom: 6px; }
.px-card h3 { font-size: 1rem; color: #1c437e; margin: 20px 0 8px; }
.px-card p { color: #4a5568; line-height: 1.7; margin-bottom: 12px; font-size: .94rem; }
.px-card ul, .px-card ol { color: #4a5568; line-height: 1.7; font-size: .94rem; padding-left: 20px; margin-bottom: 12px; }
.px-card li { margin-bottom: 6px; }

.px-hint { font-size: .82rem; color: #77808f; margin-top: -2px; margin-bottom: 18px; }

/* ── Form controls ─────────────────────────────────────────── */
.px-field { display: flex; flex-direction: column; gap: 6px; }
.px-field label { font-size: .78rem; font-weight: 700; color: #1c437e; text-transform: uppercase; letter-spacing: .04em; }
.px-field input, .px-field select {
  font: inherit; font-size: .94rem; padding: 10px 12px;
  border: 1px solid #d6dae2; border-radius: 8px; background: #fff; color: #1a202c; width: 100%;
}
.px-field input:focus, .px-field select:focus { outline: 2px solid var(--amber, #f5a623); outline-offset: 1px; border-color: transparent; }
.px-field input[aria-invalid="true"] { border-color: #d64545; background: #fdf5f5; }

.px-grid { display: grid; gap: 14px; }
.px-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.px-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.px-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { .px-grid-3, .px-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.px-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer;
  padding: 11px 22px; border-radius: 8px; border: 1px solid transparent;
  background: var(--amber, #f5a623); color: #fff; transition: filter .15s, background .15s;
}
.px-btn:hover { filter: brightness(1.06); }
.px-btn-ghost { background: #fff; border-color: #d6dae2; color: #1c437e; }
.px-btn-ghost:hover { background: #f2f4f8; filter: none; }
.px-btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ── Rows (repeatable piece inputs) ────────────────────────── */
.px-row { position: relative; border: 1px solid #e8eaef; border-radius: 10px; padding: 16px; margin-bottom: 12px; background: #fbfcfd; }
.px-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.px-row-title { font-size: .8rem; font-weight: 700; color: #1c437e; text-transform: uppercase; letter-spacing: .04em; }
.px-row-remove { background: none; border: none; cursor: pointer; color: #9aa3b2; font-size: .82rem; padding: 4px; }
.px-row-remove:hover { color: #d64545; }

/* ── Results ───────────────────────────────────────────────── */
.px-result { background: #122d57; color: #fff; border-radius: 14px; padding: 24px; }
.px-result h2 { color: #fff; font-size: 1.05rem; margin-bottom: 16px; }
.px-result-main { font-size: 2.1rem; font-weight: 800; line-height: 1.1; color: var(--amber-lt, #ffc46b); }
.px-result-main small { display: block; font-size: .8rem; font-weight: 600; color: rgba(255, 255, 255, .6); margin-top: 6px; text-transform: uppercase; letter-spacing: .05em; }
.px-result-list { list-style: none; padding: 0; margin: 20px 0 0; }
.px-result-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .88rem; }
.px-result-list span:first-child { color: rgba(255, 255, 255, .62); }
.px-result-list span:last-child { font-weight: 700; }
.px-result-note { margin-top: 16px; font-size: .78rem; color: rgba(255, 255, 255, .55); line-height: 1.6; }
.px-result-empty { color: rgba(255, 255, 255, .6); font-size: .9rem; line-height: 1.6; }

.px-error { background: #fdf5f5; border: 1px solid #f0c9c9; color: #a03030; border-radius: 8px; padding: 12px 14px; font-size: .88rem; margin-top: 14px; }

/* ── Tables ────────────────────────────────────────────────── */
.px-table-wrap { overflow-x: auto; }
.px-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.px-table th, .px-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid #e8eaef; }
.px-table th { background: #f2f4f8; color: #1c437e; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.px-table tbody tr:hover { background: #fafbfc; }

/* ── Sidebar CTA ───────────────────────────────────────────── */
.px-side-cta { background: linear-gradient(135deg, #1c437e, #122d57); color: #fff; border-radius: 14px; padding: 24px; }
.px-side-cta h3 { color: #fff; font-size: 1rem; margin-bottom: 8px; }
.px-side-cta p { color: rgba(255, 255, 255, .72); font-size: .86rem; line-height: 1.6; margin-bottom: 16px; }

/* ── Related tools ─────────────────────────────────────────── */
.px-tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.px-tool-tile {
  display: block; text-decoration: none; background: #fff; border: 1px solid #e3e6ec;
  border-radius: 12px; padding: 20px; transition: border-color .15s, transform .15s;
}
.px-tool-tile:hover { border-color: var(--amber, #f5a623); transform: translateY(-2px); }
.px-tool-tile i { color: var(--amber, #f5a623); font-size: 1.3rem; margin-bottom: 10px; display: block; }
.px-tool-tile strong { display: block; color: #1c437e; font-size: .98rem; margin-bottom: 5px; }
.px-tool-tile span { color: #6b7280; font-size: .84rem; line-height: 1.55; }

/* ── FAQ ───────────────────────────────────────────────────── */
.px-faq-item { border-bottom: 1px solid #e8eaef; padding: 14px 0; }
.px-faq-item:last-child { border-bottom: none; }
.px-faq-q { font-weight: 700; color: #1c437e; font-size: .94rem; margin-bottom: 6px; }
.px-faq-a { color: #4a5568; font-size: .9rem; line-height: 1.68; }

/* ── Glossary ──────────────────────────────────────────────── */
.px-alpha-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.px-alpha-nav a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px;
  border: 1px solid #e3e6ec; border-radius: 7px; color: #1c437e; font-weight: 700; font-size: .84rem; text-decoration: none;
}
.px-alpha-nav a:hover { background: var(--amber, #f5a623); border-color: var(--amber, #f5a623); color: #fff; }
.px-alpha-nav a.is-empty { opacity: .3; pointer-events: none; }
.px-glossary-letter { font-size: 1.4rem; color: var(--amber, #f5a623); font-weight: 800; margin: 26px 0 10px; scroll-margin-top: 90px; }
.px-term { border-bottom: 1px solid #eef0f4; padding: 12px 0; }
.px-term dt { font-weight: 700; color: #1c437e; font-size: .95rem; margin-bottom: 4px; }
.px-term dd { margin: 0; color: #4a5568; font-size: .9rem; line-height: 1.68; }

@media print {
  .px-topbar, .px-nav, .px-mobile-nav, .px-footer, .px-btn-row, #px-scroll-top, .px-side-cta { display: none !important; }
  .px-tool-main { background: #fff; padding: 0; }
  .px-tool-layout { grid-template-columns: 1fr; }
}
