/* Batch Redirect Rule Unit Tester - scoped component styles */
.batch-redirect-tool [hidden] { display: none !important; }
.batch-redirect-tool { max-width: 1240px; margin: 0 auto; }
.batch-tool-header { max-width: 900px; }
.batch-tool-header h1 { max-width: 850px; }
.batch-trust-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.batch-trust-strip span { background: var(--blue-50, #eff6ff); border: 1px solid var(--blue-200, #bfdbfe); border-radius: 999px; color: #1e3a8a; font-size: .8rem; font-weight: 700; padding: 6px 10px; }
.batch-workbench { padding: clamp(18px, 3vw, 30px); }
.batch-section-heading, .batch-results-header { align-items: flex-start; display: flex; gap: 20px; justify-content: space-between; }
.batch-section-heading h2, .batch-results-header h2 { margin: 2px 0 4px; }
.batch-step { border-top: 1px solid var(--border, #d8e0ee); margin-top: 24px; padding-top: 24px; }
.batch-step-label { align-items: flex-start; display: flex; gap: 12px; margin-bottom: 16px; }
.batch-step-label > span { align-items: center; background: var(--primary, #2563eb); border-radius: 50%; color: #fff; display: inline-flex; flex: 0 0 32px; font-weight: 800; height: 32px; justify-content: center; }
.batch-step-label h3 { margin: 1px 0 2px; }
.batch-step-label p { color: var(--gray-600, #4b5563); margin: 0; }
.batch-mode-choice { border: 0; display: flex; gap: 18px; margin: 0 0 16px; padding: 0; }
.batch-mode-choice legend { font-weight: 700; margin-bottom: 8px; width: 100%; }
.batch-mode-choice label, .check-label { align-items: center; cursor: pointer; display: flex; gap: 7px; }
.batch-redirect-tool textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .84rem; line-height: 1.55; min-height: 180px; resize: vertical; }
.batch-input-meta { color: var(--gray-600, #4b5563); display: flex; font-size: .78rem; gap: 12px; justify-content: space-between; margin-top: 6px; }
.batch-file-row { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.file-button { cursor: pointer; margin: 0; }
.batch-file-row span { color: var(--gray-600, #4b5563); font-size: .82rem; }
.batch-privacy { color: #0f5132; font-size: .84rem; margin: 10px 0 0; }
.batch-mapping { background: var(--surface-alt, #eef4ff); border: 1px solid var(--border, #d8e0ee); border-radius: 12px; display: grid; gap: 12px; grid-template-columns: repeat(5, minmax(140px, 1fr)); margin: 18px 0 0; padding: 16px; }
.batch-mapping legend { font-weight: 800; padding: 0 6px; }
.batch-mapping label, .batch-settings-grid > label, .batch-table-toolbar label { color: var(--text, #111827); display: flex; flex-direction: column; font-size: .78rem; font-weight: 700; gap: 5px; }
.batch-settings-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(220px, 1fr)); }
.batch-settings-grid .check-label { align-self: center; flex-direction: row; min-height: 42px; }
.batch-parser-panel { background: #f8fafc; border: 1px solid var(--border, #d8e0ee); border-radius: 12px; margin-top: 24px; padding: 16px; }
.batch-parser-panel h3 { margin: 0 0 4px; }
.batch-parser-panel p { margin: 0; }
.batch-parser-panel ul { margin-bottom: 0; max-height: 220px; overflow: auto; padding-left: 22px; }
.batch-parser-panel li { margin: 5px 0; }
.batch-parser-panel .parser-ok { color: #166534; }
.batch-parser-panel .parser-warning { color: #92400e; }
.batch-run-limit { margin-top: 18px; }
.batch-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.batch-run-status { font-weight: 700; margin-top: 12px; min-height: 1.5em; }
.batch-run-status.is-error { color: #b91c1c; }
.batch-run-status.is-success { color: #166534; }
.batch-progress { align-items: center; display: grid; gap: 8px; grid-template-columns: minmax(180px, 1fr) auto; margin-top: 12px; }
.batch-progress-track { background: #e5e7eb; border-radius: 999px; height: 10px; overflow: hidden; }
.batch-progress-track span { background: linear-gradient(90deg, #2563eb, #0f766e); display: block; height: 100%; transition: width .18s ease; width: 0; }
.batch-progress > span { color: var(--gray-600, #4b5563); font-size: .8rem; }
.batch-results { margin-top: 26px; }
.batch-export-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.batch-baseline-note { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; color: #9a3412; font-size: .84rem; padding: 10px 12px; }
.batch-summary-grid { display: grid; gap: 10px; grid-template-columns: repeat(6, minmax(110px, 1fr)); margin: 18px 0; }
.batch-summary-card { background: #fff; border: 1px solid var(--border, #d8e0ee); border-radius: 12px; padding: 12px; }
.batch-summary-card strong { display: block; font-size: 1.45rem; line-height: 1.1; }
.batch-summary-card span { color: var(--gray-600, #4b5563); font-size: .75rem; font-weight: 700; }
.batch-result-tabs { display: flex; gap: 6px; margin: 16px 0; overflow-x: auto; padding-bottom: 4px; }
.batch-result-tabs button { background: #fff; border: 1px solid var(--border, #d8e0ee); border-radius: 999px; color: #374151; cursor: pointer; flex: 0 0 auto; font: inherit; font-size: .78rem; font-weight: 700; padding: 7px 11px; }
.batch-result-tabs button[aria-selected="true"] { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.batch-table-toolbar { align-items: end; display: grid; gap: 12px; grid-template-columns: minmax(240px, 1fr) minmax(150px, 220px) auto; margin: 12px 0; }
.batch-table-toolbar input, .batch-table-toolbar select { margin: 0; }
#filtered-count { color: var(--gray-600, #4b5563); font-size: .8rem; padding-bottom: 12px; }
.batch-table-wrap { background: #fff; border: 1px solid var(--border, #d8e0ee); border-radius: 12px; max-height: 680px; overflow: auto; }
.batch-result-table { border-collapse: separate; border-spacing: 0; min-width: 1080px; width: 100%; }
.batch-result-table th { background: #f8fafc; position: sticky; top: 0; z-index: 2; }
.batch-result-table td, .batch-result-table th { padding: 10px; vertical-align: top; }
.batch-result-table tbody tr { cursor: pointer; }
.batch-result-table tbody tr:hover, .batch-result-table tbody tr:focus-within { background: #eff6ff; }
.batch-result-table .url-value { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; max-width: 260px; overflow-wrap: anywhere; }
.batch-row-open { background: transparent; border: 0; color: #1d4ed8; cursor: pointer; font: inherit; font-weight: 800; padding: 0; text-decoration: underline; }
.batch-badge { border-radius: 999px; display: inline-block; font-size: .68rem; font-weight: 800; margin: 1px 3px 1px 0; padding: 3px 7px; white-space: nowrap; }
.batch-badge.pass, .batch-badge.covered { background: #dcfce7; color: #166534; }
.batch-badge.fail, .batch-badge.shadowed { background: #fee2e2; color: #991b1b; }
.batch-badge.warn, .batch-badge.unused { background: #fef3c7; color: #92400e; }
.batch-badge.info { background: #dbeafe; color: #1e40af; }
.batch-pagination { align-items: center; display: flex; gap: 12px; justify-content: center; margin: 14px 0; }
.batch-report-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin-top: 20px; }
.batch-report-grid .tool-card { margin: 0; }
.batch-coverage-row, .batch-cluster-row { border-top: 1px solid var(--border, #d8e0ee); display: grid; gap: 8px; grid-template-columns: 80px 1fr auto; padding: 10px 0; }
.batch-coverage-row code, .batch-cluster-row code { font-size: .72rem; overflow-wrap: anywhere; }
.batch-trace-dialog { border: 0; border-radius: 16px; box-shadow: 0 24px 70px rgba(15, 23, 42, .28); max-height: 88vh; max-width: 900px; padding: 0; width: calc(100% - 28px); }
.batch-trace-dialog::backdrop { background: rgba(15, 23, 42, .55); }
.batch-dialog-header { align-items: center; background: #f8fafc; border-bottom: 1px solid var(--border, #d8e0ee); display: flex; justify-content: space-between; padding: 16px 20px; position: sticky; top: 0; z-index: 2; }
.batch-dialog-header h2 { margin: 0; }
.batch-dialog-close { background: transparent; border: 0; border-radius: 8px; cursor: pointer; font-size: 1.8rem; line-height: 1; padding: 4px 10px; }
#trace-content { padding: 20px; }
.batch-trace-summary { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.batch-trace-summary div, .batch-trace-step { background: #f8fafc; border: 1px solid var(--border, #d8e0ee); border-radius: 10px; overflow-wrap: anywhere; padding: 10px; }
.batch-trace-step { margin-top: 12px; }
.batch-trace-step pre { background: #111827; border-radius: 8px; color: #f9fafb; overflow: auto; padding: 10px; white-space: pre-wrap; }
.batch-feature-grid .feature-item { align-items: flex-start; }
.batch-redirect-tool button:focus-visible, .batch-redirect-tool input:focus-visible, .batch-redirect-tool textarea:focus-visible, .batch-redirect-tool select:focus-visible, .batch-redirect-tool [tabindex]:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .batch-progress-track span { transition: none; } }
@media (max-width: 900px) {
    .batch-mapping { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
    .batch-summary-grid { grid-template-columns: repeat(3, 1fr); }
    .batch-report-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .batch-section-heading, .batch-results-header { flex-direction: column; }
    .batch-export-actions { justify-content: flex-start; }
    .batch-settings-grid, .batch-mapping, .batch-table-toolbar { grid-template-columns: 1fr; }
    .batch-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .batch-input-meta { align-items: flex-start; flex-direction: column; }
    #filtered-count { padding-bottom: 0; }
    .batch-progress { grid-template-columns: 1fr; }
    .batch-trace-summary { grid-template-columns: 1fr; }
}
