/* ===========================================================================
   Data & Tools — shared component stylesheet
   Used by: enforcer-encyclopedia, fights-by-season, fight-code, probert/cherry
   microsites, howe-hat-trick-tracker, and ~180 enforcer profile subpages.
   Scoped under `.dt-tool` to avoid collisions with editorial/casino CSS.
   =========================================================================== */

.dt-tool { font-family: 'PT Sans', sans-serif; color: #222; }
.dt-tool h1 { font-family: 'Raleway', sans-serif; font-size: 32px; line-height: 1.2; font-weight: 700; margin: 0 0 10px; color: #111; }
.dt-tool h2 { font-family: 'Raleway', sans-serif; font-size: 24px; font-weight: 600; margin: 40px 0 15px; color: #1a1a1a; border-bottom: 2px solid #e4e4e4; padding-bottom: 8px; }
.dt-tool h3 { font-family: 'Raleway', sans-serif; font-size: 20px; font-weight: 600; margin: 28px 0 12px; color: #222; }
.dt-tool p { font-size: 16px; line-height: 1.65; margin: 0 0 16px; }
.dt-tool a { color: #2396c2; text-decoration: none; }
.dt-tool a:hover { text-decoration: underline; }

/* Eyebrow + dataset note */
.dt-eyebrow { display: inline-block; background: #2396c2; color: #fff; font-family: 'Raleway', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; padding: 4px 10px; border-radius: 3px; margin-bottom: 15px; }
.dt-dataset-note { background: #f4f8fa; border-left: 4px solid #2396c2; padding: 12px 18px; font-size: 14px; color: #555; margin: 20px 0 30px; }
.dt-dataset-note strong { color: #222; }
.dt-updated { font-size: 13px; color: #888; margin-bottom: 20px; }

/* Stat cards grid */
.dt-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 20px 0 35px; }
.dt-stat { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 18px 16px; text-align: center; }
.dt-stat-value { display: block; font-family: 'Raleway', sans-serif; font-size: 30px; font-weight: 700; color: #1a1a1a; line-height: 1.1; }
.dt-stat-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.8px; color: #777; margin-top: 6px; }

/* Filter toolbar */
.dt-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: #fafafa; border: 1px solid #e4e4e4; border-radius: 6px; padding: 12px 15px; margin: 15px 0 25px; }
.dt-filters label { font-size: 13px; color: #555; margin: 0 6px 0 0; font-weight: 600; }
.dt-filters select, .dt-filters input[type="search"] { padding: 6px 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; font-family: inherit; background: #fff; }
.dt-filters input[type="search"] { min-width: 220px; }
.dt-filters .dt-reset { margin-left: auto; background: #eee; border: none; padding: 6px 14px; border-radius: 4px; cursor: pointer; font-size: 13px; color: #555; }
.dt-filters .dt-reset:hover { background: #ddd; }
.dt-result-count { font-size: 13px; color: #777; margin: 10px 0 15px; }

/* Sortable table */
.dt-table { width: 100%; border-collapse: collapse; margin: 15px 0 30px; background: #fff; font-size: 14px; }
.dt-table thead th { background: #2a2a2a; color: #fff; text-align: left; padding: 10px 12px; font-family: 'Raleway', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.3px; cursor: pointer; user-select: none; }
.dt-table thead th[data-sort]::after { content: " ↕"; opacity: 0.4; font-size: 11px; }
.dt-table thead th.sort-asc::after { content: " ↑"; opacity: 1; }
.dt-table thead th.sort-desc::after { content: " ↓"; opacity: 1; }
.dt-table tbody td { padding: 9px 12px; border-bottom: 1px solid #eee; vertical-align: top; }
.dt-table tbody tr:hover { background: #f9f9f9; }
.dt-table tbody tr.dt-hidden { display: none; }
.dt-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.3px; }
.dt-badge-live { background: #27ae60; color: #fff; }
.dt-badge-deceased { background: #7f8c8d; color: #fff; }
.dt-badge-heavyweight { background: #c0392b; color: #fff; }
.dt-badge-middleweight { background: #e67e22; color: #fff; }
.dt-badge-grinder { background: #f39c12; color: #fff; }

/* Timeline (simple CSS, no vis.js dependency) */
.dt-timeline { position: relative; padding-left: 32px; margin: 25px 0; border-left: 3px solid #2396c2; }
.dt-timeline-entry { position: relative; margin-bottom: 25px; }
.dt-timeline-entry::before { content: ''; position: absolute; left: -42px; top: 6px; width: 15px; height: 15px; background: #fff; border: 3px solid #2396c2; border-radius: 50%; }
.dt-timeline-entry.major::before { background: #c0392b; border-color: #c0392b; }
.dt-timeline-date { font-family: 'Raleway', sans-serif; font-size: 13px; font-weight: 700; color: #2396c2; text-transform: uppercase; letter-spacing: 0.5px; }
.dt-timeline-title { font-family: 'Raleway', sans-serif; font-size: 17px; font-weight: 600; margin: 4px 0 6px; color: #222; }
.dt-timeline-body { font-size: 14px; color: #444; line-height: 1.5; }

/* Flowchart (used by Fight Code) */
.dt-flowchart { background: #fafafa; border: 1px solid #e4e4e4; border-radius: 8px; padding: 22px; margin: 25px 0; }
.dt-flow-node { background: #fff; border: 2px solid #2396c2; border-radius: 6px; padding: 14px 18px; margin: 10px 0; max-width: 600px; font-size: 15px; }
.dt-flow-node.dt-flow-yes { border-color: #27ae60; margin-left: 40px; }
.dt-flow-node.dt-flow-no { border-color: #c0392b; margin-left: 40px; }
.dt-flow-node strong { color: #111; }
.dt-flow-arrow { margin-left: 40px; color: #999; font-family: monospace; }

/* Quote cards */
.dt-quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin: 25px 0; }
.dt-quote-card { background: #fff; border-left: 4px solid #2396c2; border-radius: 4px; padding: 18px 22px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.dt-quote-body { font-family: 'Sorts Mill Goudy', serif; font-style: italic; font-size: 17px; line-height: 1.5; color: #222; margin: 0 0 14px; }
.dt-quote-attribution { font-size: 13px; color: #666; border-top: 1px solid #eee; padding-top: 10px; }
.dt-quote-attribution strong { color: #2a2a2a; }
.dt-quote-era { display: inline-block; font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.6px; margin-left: 8px; }

/* Chart container */
.dt-chart-wrap { background: #fff; border: 1px solid #e4e4e4; border-radius: 8px; padding: 20px; margin: 20px 0 30px; }
.dt-chart-wrap h3 { margin-top: 0; }
.dt-chart-canvas { position: relative; height: 380px; }
.dt-chart-caption { font-size: 13px; color: #777; margin-top: 12px; font-style: italic; }

/* Era toggle pills */
.dt-era-toggle { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0 25px; }
.dt-era-toggle button { background: #fff; border: 1px solid #ccc; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-family: inherit; cursor: pointer; color: #555; }
.dt-era-toggle button.active { background: #2396c2; color: #fff; border-color: #2396c2; }
.dt-era-toggle button:hover:not(.active) { background: #f0f0f0; }

/* Profile hero */
.dt-profile-hero { background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%); color: #fff; border-radius: 8px; padding: 30px 35px; margin: 10px 0 30px; display: grid; grid-template-columns: 1fr; gap: 20px; }
.dt-profile-hero h1 { color: #fff; margin: 0; font-size: 38px; }
.dt-profile-hero .dt-subtitle { color: #ccc; font-size: 16px; font-family: 'Sorts Mill Goudy', serif; font-style: italic; }
.dt-profile-hero .dt-stat-grid { margin: 0; }
.dt-profile-hero .dt-stat { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); }
.dt-profile-hero .dt-stat-value { color: #fff; }
.dt-profile-hero .dt-stat-label { color: #bbb; }

/* Encyclopedia banner (placed on existing enforcer profiles) */
.enc-banner { background: linear-gradient(135deg, #2396c2 0%, #1a7a9e 100%); color: #fff; padding: 14px 20px; border-radius: 6px; margin: 18px 0; display: flex; justify-content: space-between; align-items: center; gap: 15px; flex-wrap: wrap; font-family: 'Raleway', sans-serif; }
.enc-banner-text strong { display: block; font-size: 14px; font-weight: 700; letter-spacing: 0.3px; }
.enc-banner-text span { font-size: 13px; opacity: 0.9; }
.enc-banner a { background: #fff; color: #1a7a9e; padding: 8px 18px; border-radius: 4px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.enc-banner a:hover { background: #f0f0f0; }

/* Data credit footer */
.dt-credits { background: #f8f9fa; border-top: 3px solid #2396c2; padding: 18px 22px; margin: 40px 0 20px; font-size: 13px; color: #666; border-radius: 0 0 4px 4px; }
.dt-credits strong { color: #333; display: block; margin-bottom: 6px; }

/* Related-content grid */
.dt-related { margin: 35px 0 20px; }
.dt-related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.dt-related-card { background: #fff; border: 1px solid #e4e4e4; border-radius: 6px; padding: 16px; transition: box-shadow 0.2s; }
.dt-related-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.dt-related-card h4 { font-family: 'Raleway', sans-serif; font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.dt-related-card h4 a { color: #222; }
.dt-related-card p { font-size: 13px; color: #666; margin: 0; line-height: 1.45; }

@media (max-width: 600px) {
    .dt-tool h1 { font-size: 26px; }
    .dt-profile-hero { padding: 22px 20px; }
    .dt-profile-hero h1 { font-size: 28px; }
    .dt-filters input[type="search"] { min-width: 100%; }
    .dt-table { font-size: 13px; }
    .dt-table thead th, .dt-table tbody td { padding: 7px 8px; }
}
