/* ── Enviro Broker Tools — Shared Styles ─────────────────── */
.ebt-widget { font-family: inherit; color: #1a1a1a; }
.ebt-widget-header { margin-bottom: 24px; }
.ebt-widget-header h3 { margin: 0 0 8px; font-size: 1.4rem; font-weight: 700; color: var(--cs-accent, #052a7b); }
.ebt-widget-header p { margin: 0; color: #555; font-size: .95rem; }
.ebt-widget-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.ebt-dot-input-row { display: flex; gap: 10px; }
.ebt-input { width: 100%; padding: 12px 16px; border: 1.5px solid #d0d7e3; border-radius: 6px; font-size: 1rem; background: #fff; color: #1a1a1a; box-sizing: border-box; }
.ebt-input:focus { outline: none; border-color: var(--cs-accent, #052a7b); box-shadow: 0 0 0 3px rgba(5,42,123,.12); }
.ebt-btn { padding: 12px 24px; border: none; border-radius: 6px; font-size: .9rem; font-weight: 700; letter-spacing: .04em; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: transform .15s, box-shadow .15s; white-space: nowrap; color: #fff !important; }
.ebt-btn:hover { transform: translateY(-1px); }
.ebt-btn-primary { background: var(--cs-accent, #052a7b); color: #fff !important; }
.ebt-btn-primary:hover { background: var(--cs-accent-dark, #041f5c); box-shadow: 0 4px 16px rgba(5,42,123,.3); }
.ebt-btn-full { width: 100%; justify-content: center; margin-top: 8px; }
.ebt-btn-sm { padding: 6px 14px; font-size: .8rem; background: var(--cs-accent, #052a7b); color: #fff !important; border-radius: 4px; }
.ebt-error { padding: 10px 16px; background: #fff0f0; border-left: 3px solid #dc2626; border-radius: 4px; color: #dc2626; font-size: .9rem; margin-top: 12px; }
.ebt-success-msg { padding: 14px 20px; background: #f0fdf4; border-left: 3px solid #16a34a; border-radius: 4px; color: #166534; font-size: .95rem; margin-bottom: 16px; }
.ebt-loader { padding: 12px 0; color: #888; font-size: .9rem; font-style: italic; margin-top: 8px; }
.ebt-result-card { border: 1.5px solid #e0e7ff; border-radius: 10px; padding: 20px; margin-top: 16px; background: #fafbff; }
.ebt-result-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; gap: 12px; }
.ebt-result-name { font-size: 1.1rem; font-weight: 700; color: #052a7b; }
.ebt-result-meta { font-size: .85rem; color: #666; margin-top: 4px; }
.ebt-authority-badge { padding: 6px 14px; border-radius: 20px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.ebt-authority-badge.active { background: #dcfce7; color: #166534; }
.ebt-authority-badge.inactive { background: #fee2e2; color: #991b1b; }
.ebt-metrics { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ebt-metric { text-align: center; background: #f0f4ff; border-radius: 8px; padding: 10px 16px; min-width: 80px; }
.ebt-metric .val { display: block; font-size: 1.3rem; font-weight: 700; color: #052a7b; }
.ebt-metric .lbl { display: block; font-size: .72rem; color: #666; margin-top: 2px; text-transform: uppercase; letter-spacing: .04em; }
.ebt-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.ebt-badge { padding: 4px 12px; border-radius: 14px; font-size: .8rem; font-weight: 600; }
.ebt-badge.hazmat { background: #fff3cd; color: #856404; }
.ebt-badge.epa { background: #dcfce7; color: #166534; }
.ebt-badge.safety { background: #e0e7ff; color: #3730a3; }
.ebt-result-cta { border-top: 1px solid #e0e7ff; padding-top: 14px; margin-top: 4px; }
.ebt-result-cta p { font-size: .88rem; color: #555; margin: 0 0 10px; }
.ebt-form-row { margin-bottom: 14px; }
.ebt-form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ebt-form-field label { display: block; font-size: .85rem; font-weight: 600; color: #374151; margin-bottom: 5px; }
.ebt-form-field .req { color: #dc2626; }
.ebt-disclaimer { font-size: .78rem; color: #999; margin-top: 10px; text-align: center; }
.ebt-results-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: 14px; }
.ebt-results-table th { background: #f0f4ff; padding: 8px 12px; text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: #555; border-bottom: 1.5px solid #dde3f0; }
.ebt-results-table td { padding: 10px 12px; border-bottom: 1px solid #eef0f5; vertical-align: middle; }
.ebt-mini-badge { padding: 3px 8px; border-radius: 10px; font-size: .75rem; font-weight: 600; }
.ebt-mini-badge.active { background: #dcfce7; color: #166534; }
.ebt-mini-badge.inactive { background: #fee2e2; color: #991b1b; }
.ebt-mini-badge.hazmat { background: #fff3cd; color: #856404; }
.ebt-compact .ebt-widget-header { display: none; }
@media(max-width:600px) {
  .ebt-dot-input-row { flex-direction: column; }
  .ebt-form-row.two-col { grid-template-columns: 1fr; }
  .ebt-metrics { gap: 8px; }
  .ebt-metric { min-width: 60px; padding: 8px 10px; }
}

/* ── Fleet Watch + FMCSA Alerts shared styles ──────────────────── */
.ebt-widget-header { display:flex; align-items:flex-start; gap:14px; padding:20px 20px 16px; border-bottom:1px solid #e5e7eb; }
.ebt-widget-icon { font-size:1.6rem; line-height:1; }
.ebt-widget-title { font-size:1.1rem; font-weight:700; color:#052a7b; margin:0 0 4px; }
.ebt-widget-sub { font-size:.82rem; color:#6b7280; margin:0; }
.ebt-fw-filters { display:flex; align-items:center; gap:10px; padding:12px 20px; border-bottom:1px solid #f3f4f6; }
.ebt-input-sm { padding:6px 10px; font-size:.82rem; border:1px solid #d1d5db; border-radius:6px; }
.ebt-fw-summary { display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:#e5e7eb; border-bottom:1px solid #e5e7eb; }
.ebt-fw-stat { background:#fff; padding:14px 16px; text-align:center; }
.ebt-fw-stat span { display:block; font-size:1.4rem; font-weight:700; color:#052a7b; }
.ebt-fw-stat label { font-size:.7rem; color:#6b7280; text-transform:uppercase; letter-spacing:.05em; }
.ebt-fw-table-wrap { overflow-x:auto; }
.ebt-fw-table th, .ebt-alert-table th { font-size:.72rem; text-transform:uppercase; letter-spacing:.05em; color:#6b7280; background:#f9fafb; }
.ebt-fw-name strong { font-size:.85rem; }
.ebt-fw-name small { font-size:.75rem; color:#9ca3af; }
.ebt-grade { display:inline-block; width:24px; height:24px; line-height:24px; text-align:center; border-radius:4px; font-weight:800; font-size:.8rem; }
.ebt-grade.grade-a { background:#dcfce7; color:#16a34a; }
.ebt-grade.grade-b { background:#dbeafe; color:#2563eb; }
.ebt-grade.grade-c { background:#fef9c3; color:#ca8a04; }
.ebt-grade.grade-d { background:#ffedd5; color:#ea580c; }
.ebt-grade.grade-f { background:#fee2e2; color:#dc2626; }
.ebt-val-warn { color:#dc2626; font-weight:700; }
.ebt-alert-chip { display:inline-block; padding:2px 7px; border-radius:3px; font-size:.68rem; font-weight:700; background:#fef2f2; color:#dc2626; border:1px solid #fecaca; margin:1px; }

/* Alert tabs */
.ebt-alert-tabs { display:flex; flex-wrap:wrap; gap:6px; padding:12px 20px; border-bottom:1px solid #e5e7eb; }
.ebt-alert-tab { padding:6px 12px; border:1px solid #e5e7eb; border-radius:20px; font-size:.78rem; font-weight:600; cursor:pointer; background:#fff; color:#374151; transition:all .15s; }
.ebt-alert-tab:hover, .ebt-alert-tab.active { background:#052a7b; color:#fff; border-color:#052a7b; }
.ebt-alert-banner { display:flex; justify-content:space-between; align-items:center; padding:12px 20px; background:#fef2f2; border-bottom:1px solid #fecaca; }
.ebt-alert-banner strong { font-size:.9rem; color:#dc2626; }
.ebt-alert-banner span { font-size:.8rem; color:#6b7280; }
.ebt-alert-desc { padding:8px 20px; font-size:.82rem; color:#6b7280; border-bottom:1px solid #f3f4f6; margin:0; }
.ebt-alert-footer { font-size:.72rem; color:#9ca3af; padding:10px 20px; border-top:1px solid #f3f4f6; margin:0; }
.ebt-search-summary { padding:8px 0 12px; font-size:.84rem; color:#6b7280; }

/* Risk level badge in search */
.ebt-mini-badge.risk-low { background:#dcfce7; color:#16a34a; }
.ebt-mini-badge.risk-medium { background:#fef9c3; color:#ca8a04; }
.ebt-mini-badge.risk-high { background:#fee2e2; color:#dc2626; }
.ebt-mini-badge.epa { background:#d1fae5; color:#065f46; }

/* Mobile */
@media(max-width:640px) {
  .ebt-fw-summary { grid-template-columns:repeat(2,1fr); }
  .ebt-alert-tabs { gap:4px; }
  .ebt-alert-tab { font-size:.72rem; padding:5px 9px; }
}

/* ── Widget width constraints — per-widget, not global ─────────────────── */
/* Form/lookup widgets: comfortable reading width */
.ebt-dot-verify { max-width:720px; margin:0 auto; }
.ebt-carrier-lookup { max-width:720px; margin:0 auto; }
/* Rate calculator and onboard: slightly wider */
.ebt-calc-wrap { max-width:900px; margin:0 auto; }
.ebt-ob-wrap { max-width:820px; margin:0 auto; }
/* Data widgets (Fleet Watch, FMCSA Alerts): always fill container */
.ebt-fleet-watch { width:100%; }
.ebt-fmcsa-alerts { width:100%; }
/* Dark section overrides for FMCSA Alerts (light theme) */
.ebt-fmcsa-alerts .ebt-widget-title { color:#052a7b; }
.ebt-fmcsa-alerts .ebt-widget-sub { color:#6b7280; }

/* ── All dark-bg widget headers: force white text regardless of cascade ────── */
.ebt-ob-hdr, .ebt-ob-hdr-title, .ebt-ob-hdr-sub,
.ebt-calc-hdr, .ebt-calc-hdr-title, .ebt-calc-hdr-sub,
.ebt-ltl-header, .ebt-ltl-header-text h3, .ebt-ltl-header-text p,
.ebt-fw-hdr, .efq-hero, .efq-hero p, .efq-rc { color: #fff !important; }
.ebt-results-table td, .ebt-results-table th { color: #374151; }
.ebt-fw-name strong { color: #111827; }
.ebt-fw-name small { color: #6b7280; }
.ebt-alert-banner strong { color: #dc2626; }
.ebt-alert-banner span { color: #6b7280; }
.ebt-alert-desc, .ebt-alert-footer { color: #6b7280; }
.ebt-network-body { color: #374151; }
.ebt-fw-stat label { color: #6b7280; }
.ebt-widget-header h3 { color: #052a7b; }
.ebt-widget-header p { color: #6b7280; }
.ebt-fw-stat span { color: #052a7b; }
