/* jch-noise-reports.css */

.jch-noise-report {
    max-width: 1200px;
    margin: 0 auto;
}

.jch-report-form {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 16px;
    margin-bottom: 24px;
}

.jch-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.jch-filter-group {
    display: flex;
    flex-direction: column;
    min-width: 140px;
}

.jch-filter-label {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 0.9em;
}

.jch-subtext {
    font-weight: normal;
    font-size: 0.8em;
    margin-left: 6px;
}

.jch-checkbox-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 6px;
    background: #fff;
    min-width: 160px;
}

.jch-checkbox-wrapper label {
    font-size: 0.85em;
    cursor: pointer;
}

.jch-checkbox-wrapper label.penalty   { color: #8b0000; }
.jch-checkbox-wrapper label.fly-quiet { color: #00008b; }

.jch-date-group input[type="text"] {
    width: 120px;
}

.jch-output-options {
    flex-direction: row;
    align-items: flex-end;
    gap: 16px;
}

.jch-submit-row {
    margin-top: 8px;
}

/* Report output — note: .jch-report-output is also the @media print target */

.jch-report-output {
    margin-top: 24px;
}

.jch-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.9em;
    color: #555;
}

.jch-report-heading {
    flex: 1;
    text-align: center;
}

.jch-report-title {
    font-weight: bold;
    font-size: 1.1em;
    color: #000;
}

.jch-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
    margin-bottom: 24px;
}

.jch-report-table th,
.jch-report-table td {
    border: 1px solid #ddd;
    padding: 4px 8px;
    text-align: right;
}

.jch-report-table th {
    background: #f0f0f0;
    text-align: center;
    font-size: 0.8em;
}

.jch-report-table td:first-child,
.jch-report-table td:nth-child(2) {
    text-align: left;
}

.jch-report-table tr.jch-penalty  { background: #fff0f0; }
.jch-report-table tr.jch-pe-fqe   { background: #f0f0ff; }

.jch-report-table tfoot td {
    background: #f5f5f5;
    font-size: 0.85em;
    text-align: left;
    line-height: 1.8;
}

.jch-chart-container {
    margin-bottom: 24px;
}

/* Print button */

/* .jch-print-btn styles live in jch-noise-data-core.css */

.jch-close-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 1.2em;
    padding: 2px 6px;
    line-height: 1;
    color: #555;
    flex-shrink: 0;
}

.jch-close-btn:hover {
    background: #f0f0f0;
    color: #000;
}

/* Print styles — hide everything except the report output */

@page { margin: 0.5in; }

@media print {
    body * { visibility: hidden; }
    .jch-report-output,
    .jch-report-output * { visibility: visible; }
    .jch-report-output { position: fixed; top: 0; left: 0; width: 100%; }
    .jch-close-btn { display: none; }
    .jch-chart-container { page-break-before: always; }
}

.jch-reports-error,
.jch-reports-no-data {
    padding: 12px;
    border: 1px solid #ddd;
    background: #fff8f8;
    color: #700;
}
