/* ABC Integrity admin styles */

/* Page header */
.abc-integrity-wrap .page-header {
    margin-bottom: 16px;
}

.abc-integrity-wrap .page-header h1 {
    font-size: 23px;
    font-weight: 400;
    color: #1d2327;
}

.abc-integrity-wrap .page-header p {
    font-size: 13px;
    color: #646970;
    margin-top: 4px;
}

/* Card */
.abc-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
    border-radius: 3px;
    margin-bottom: 16px;
}

/* Buttons — force flex so SVG icons align */
.abc-integrity-wrap .button {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}

.abc-integrity-wrap .button svg {
    flex-shrink: 0;
}

/* Large CTA button */
.button-lg {
    height: 38px !important;
    font-size: 14px !important;
    padding: 0 32px 0 28px !important;
}

/* ── First-run CTA block ── */
.cta-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 44px 32px;
    gap: 16px;
}

.cta-shield {
    width: 64px;
    height: 64px;
    background: #f0f6fc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.cta-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.cta-desc {
    font-size: 13px;
    color: #646970;
    max-width: 380px;
    line-height: 1.6;
}

/* Info note */
.info-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 20px;
    background: #f0f6fc;
    border-top: 1px solid #e0eaf5;
    border-radius: 0 0 3px 3px;
    font-size: 12px;
    color: #3c434a;
    line-height: 1.5;
}

.info-note svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #2271b1;
}

/* ── Card head (results states) ── */
.card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid #f0f0f1;
}

.card-head-text {
    flex: 1;
}

.card-head-text h2 {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    margin: 0;
    padding: 0;
}

.card-head-text p {
    font-size: 12px;
    color: #646970;
    margin: 1px 0 0;
    padding: 0;
}

/* ── Summary bar (clean state) ── */
.summary-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #edfaef;
    border-bottom: 1px solid #d3f4d9;
    font-size: 13px;
    font-weight: 500;
    color: #00a32a;
}

.summary-bar svg {
    flex-shrink: 0;
}

.summary-bar--stale {
    background: #fefaed;
    border-bottom-color: #ede3b0;
    color: #7a6400;
    align-items: flex-start;
}

.summary-bar-sub {
    font-size: 12px;
    font-weight: 400;
    margin-top: 2px;
    opacity: .85;
}

/* ── Check rows (audit checklist) ── */
.check-row {
    border-bottom: 1px solid #f0f0f1;
}

.check-row:last-of-type {
    border-bottom: none;
}

.check-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    user-select: none;
}

.check-row.fail > .check-header {
    cursor: pointer;
}

.check-row.fail > .check-header:hover {
    background: #f9f9f9;
}

.check-row.pass > .check-header {
    cursor: default;
}

/* Pass/fail icon */
.check-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.check-icon.pass       { background: #edfaef; }
.check-icon.pass.stale { background: #fefaed; }
.check-icon.fail       { background: #fcecec; }

/* Label */
.check-label {
    flex: 1;
}

.check-name {
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
}

.check-desc {
    font-size: 12px;
    color: #646970;
    margin-top: 1px;
}

/* Right side */
.check-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.check-outcome {
    font-size: 12px;
    white-space: nowrap;
}

.check-outcome.pass-text { color: #00a32a; font-weight: 500; }
.check-outcome.fail-text { color: #d63638; font-weight: 600; }
.check-outcome.warn-text { color: #996800; font-weight: 600; }

/* Chevron */
.chevron {
    color: #646970;
    transition: transform .18s;
    flex-shrink: 0;
}

.check-row.open > .check-header .chevron {
    transform: rotate(90deg);
}

.check-row.pass .chevron {
    display: none;
}

/* Expandable body */
.check-body {
    display: none;
    border-top: 1px solid #f0f0f1;
}

.check-row.open > .check-body {
    display: block;
}

/* Findings table */
.findings-table {
    width: 100%;
    border-collapse: collapse;
}

.findings-table td {
    padding: 8px 16px 8px 56px;
    border-bottom: 1px solid #f0f0f1;
    font-size: 12px;
    vertical-align: top;
}

.findings-table tr:last-child td {
    border-bottom: none;
}

.findings-table tr:hover td {
    background: #f9f9f9;
}

/* Accent bar */
.path-cell {
    position: relative;
}

.path-cell::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 2px;
}

.type-modified .path-cell::before  { background: #d63638; }
.type-missing .path-cell::before   { background: #996800; }
.type-unreadable .path-cell::before { background: #646970; }

.f-path {
    font-family: Consolas, "SFMono-Regular", Monaco, monospace;
    font-size: 12px;
    color: #1d2327;
    word-break: break-all;
}

.f-reason {
    display: block;
    font-size: 11px;
    color: #646970;
    margin-top: 2px;
}

/* ── Card footer ── */
.card-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    background: #fafafa;
    border-top: 1px solid #f0f0f1;
    border-radius: 0 0 3px 3px;
    font-size: 12px;
    color: #646970;
    flex-wrap: wrap;
}

.card-footer .sep {
    color: #c3c4c7;
}

/* Scanning state */
#abc-scan-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
}
