/* AI crawler log analyzer (/tools/ai-crawler-log-analyzer/). Builds on the shared sv-* / tl-* styles in tools.css. */
.la-app { font-size: 14px; line-height: 1.5; color: #343a40; }
.la-app * { box-sizing: border-box; }
.la-app code { font-size: .92em; padding: 0 .3em; background: #f1f3f5; color: #2f4ac0; border-radius: 3px; word-break: break-all; }

/* Drop zone */
.la-drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
    padding: 26px 16px; border: 2px dashed #bac8ff; border-radius: 14px; background: #f8f9ff; color: #3b5bdb; cursor: pointer;
    transition: border-color .15s, background .15s;
}
.la-drop:hover, .la-drop.is-over { border-color: #3b5bdb; background: #edf2ff; }
.la-drop:focus-visible { outline: 2px solid #3b5bdb; outline-offset: 2px; }
.la-drop-title { font-weight: 700; font-size: 15px; color: #1e3a8a; }
.la-drop-sub { font-size: 12.5px; color: #64748b; max-width: 620px; }
.is-busy .la-drop { opacity: .6; pointer-events: none; }
.la-actions { margin-top: 10px; }
.la-paste { margin-top: 10px; }
.la-paste[hidden] { display: none; }
.la-paste-input { min-height: 140px; }
.la-privacy { margin: 10px 0 4px !important; color: #2b8a3e; }
.la-ipinfo { font-size: 12.5px; color: #64748b; }
.la-ipinfo summary { cursor: pointer; }
.la-app .la-ipinfo ul { margin: 6px 0 0 1.1em !important; padding: 0; }
.la-app .la-ipinfo li { margin: 0 0 3px !important; word-break: break-word; }

/* Progress and status */
.la-progress { margin-top: 12px; }
.la-progress[hidden] { display: none; }
.la-bar { height: 8px; background: #e9ecef; border-radius: 99px; overflow: hidden; }
.la-bar > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4c6ef5, #3b5bdb); border-radius: 99px; transition: width .2s; }
.la-progress-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.la-progress-row .sv-help { margin: 0 !important; font-variant-numeric: tabular-nums; }
.la-status { font-size: 13px; margin-top: 10px; word-break: break-word; }
.la-status:empty { display: none; }
.la-status.is-ok { color: #2b8a3e; }
.la-status.is-bad { color: #c92a2a; }
.la-app pre.la-sample-lines {
    margin: 6px 0 0; padding: 8px 10px; max-height: 160px; overflow: auto; font-size: 11.5px; line-height: 1.5;
    background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 6px; color: #343a40; white-space: pre-wrap; word-break: break-all;
}
.la-empty[hidden], .la-report[hidden] { display: none; }

/* Report */
.la-banner { padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; background: #fff9db; color: #8a5a00; font-size: 13px; border: 1px solid #ffec99; }
.la-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.la-chip { background: rgba(255, 255, 255, .78); border: 1px solid rgba(15, 23, 42, .06); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.la-chip-label { font-size: 11.5px; color: #868e96; }
.la-chip-value { font-size: 17px; font-weight: 700; color: #1e3a8a; font-variant-numeric: tabular-nums; word-break: break-word; }
.la-chip-value small { font-size: 12px; font-weight: 500; color: #64748b; }
.la-chip.is-warn .la-chip-value { color: #c92a2a; }
.tool-page .content .la-h, .la-h { font-size: 15px !important; font-weight: 700; color: #1e3a8a; margin: 0 0 10px !important; }

.la-app ul.la-findings { list-style: none; margin: 0 !important; padding: 0; }
.la-app .la-finding { margin: 0 0 8px !important; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid rgba(15, 23, 42, .07); }
.la-finding-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; }
.la-finding-title { font-weight: 700; color: #212529; flex: 1 1 220px; min-width: 0; }
.la-finding.sev-ok .sv-sev { background: #ebfbee; color: #2b8a3e; }
.la-finding-body { margin-top: 6px; font-size: 13px; color: #495057; }
.la-app .la-finding-body p { margin: 0 0 6px !important; }
.la-src { font-size: 12px; color: #868e96; }
.la-grade { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.la-grade.g-A { background: #e7f5ff; color: #1864ab; }
.la-grade.g-B { background: #f3f0ff; color: #5f3dc4; }
.la-grade.g-C { background: #fff4e6; color: #d9480f; }
.la-grade.g-D { background: #f1f3f5; color: #495057; }
.la-code { position: relative; margin: 6px 0; }
.la-code .sv-btn { position: absolute; top: 6px; right: 6px; background: #fff; }
.la-app .la-code pre {
    margin: 0; padding: 10px 12px; padding-right: 64px; max-height: 260px; overflow: auto; font-size: 11.5px; line-height: 1.5;
    background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; white-space: pre; color: #343a40;
}
.la-app ul.la-mini { margin: 4px 0 6px 1.1em !important; padding: 0; font-size: 12.5px; }
.la-app .la-mini li { margin: 0 0 2px !important; word-break: break-all; }

/* Chart */
.la-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: #495057; margin-bottom: 6px; }
.la-legend i, .la-tip i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.la-chart-wrap { position: relative; }
.la-chart { display: block; width: 100%; height: auto; }
.la-chart .la-grid { stroke: #e9ecef; stroke-width: 1; }
.la-chart .la-axis { fill: #868e96; font-size: 11px; }
.la-chart .la-hit { fill: transparent; cursor: crosshair; }
.la-chart .la-hit:hover { fill: rgba(30, 58, 138, .05); }
.la-tip {
    position: absolute; z-index: 2; pointer-events: none; background: #fff; border: 1px solid #dee2e6; border-radius: 8px;
    padding: 6px 10px; font-size: 12px; box-shadow: 0 8px 20px -10px rgba(15, 23, 42, .3); white-space: nowrap;
}
.la-tip[hidden] { display: none; }
.la-dim { color: #868e96; }
.la-daytable { margin-top: 8px; font-size: 12.5px; }
.la-daytable summary { cursor: pointer; color: #3b5bdb; }

/* Tables */
.la-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.la-app table.la-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0 !important; }
.la-app table.la-table th, .la-app table.la-table td {
    border: 0 !important; border-bottom: 1px solid #f1f3f5 !important; padding: 7px 6px !important; text-align: left; vertical-align: top;
}
.la-app table.la-table thead th { font-size: 12px; color: #868e96; font-weight: 600; white-space: nowrap; }
.la-app table.la-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.la-group td { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #868e96; padding-top: 14px !important; }
.la-bot-row { cursor: pointer; }
.la-bot-row:hover, .la-bot-row:focus-visible { background: #f8f9ff; outline: none; }
.la-bot-row[aria-expanded="true"] { background: #edf2ff; }
.la-caret { display: inline-block; width: 1em; color: #868e96; transition: transform .15s; }
.la-bot-row[aria-expanded="true"] .la-caret { transform: rotate(90deg); }
.la-v { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 0 7px; border-radius: 99px; margin: 0 4px 2px 0; white-space: nowrap; }
.la-v.ok { background: #ebfbee; color: #2b8a3e; }
.la-v.bad { background: #ffe3e3; color: #c92a2a; }
.la-v.na { background: #f1f3f5; color: #868e96; }
.la-sc { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 4px; margin: 0 3px 2px 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.la-sc.s2 { background: #ebfbee; color: #2b8a3e; }
.la-sc.s3 { background: #e7f5ff; color: #1864ab; }
.la-sc.s4 { background: #fff4e6; color: #d9480f; }
.la-sc.s5 { background: #ffe3e3; color: #c92a2a; }
.la-sc.s0 { background: #f1f3f5; color: #868e96; }
.la-legend-sc { margin-top: 6px !important; }
.la-detail-row > td { background: #f8f9ff; }
.la-detail { padding: 4px 2px 8px; }
.tool-page .content .la-detail h4, .la-detail h4 { font-size: 12.5px !important; font-weight: 700; color: #495057; margin: 10px 0 6px !important; }
.la-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.la-spark { display: flex; align-items: flex-end; gap: 2px; height: 64px; padding-bottom: 1px; border-bottom: 1px solid #dee2e6; }
.la-spark span { flex: 1 1 0; min-width: 2px; border-radius: 2px 2px 0 0; }
.la-codes { display: flex; flex-wrap: wrap; }
.la-url-search { max-width: 360px; margin-bottom: 6px; }
.la-url { word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.la-ua { word-break: break-all; }

@media screen and (max-width: 600px) {
    .la-detail-grid { grid-template-columns: minmax(0, 1fr); }
    .la-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .la-chip-value { font-size: 15px; }
    .la-app table.la-bots { font-size: 12px; }
    /* Phone: keep the crawler table within the screen; the hidden columns are in the expanded details and the CSV */
    .la-app table.la-bots th:nth-child(4), .la-app table.la-bots td:nth-child(4),
    .la-app table.la-bots th:nth-child(5), .la-app table.la-bots td:nth-child(5),
    .la-app table.la-bots th:nth-child(6), .la-app table.la-bots td:nth-child(6),
    .la-app table.la-bots th:nth-child(7), .la-app table.la-bots td:nth-child(7),
    .la-app table.la-bots th:nth-child(8), .la-app table.la-bots td:nth-child(8) { display: none; }
    .la-app table.la-bots .tl-bot-name { word-break: break-all; }
    .la-chart .la-axis { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .la-bar > span, .la-caret { transition: none; } }
