/* App-specific styling layered on top of Bootstrap + mockmotor-imperial.css.
   Only what those two don't already cover: the JSON viewer/line-highlighting,
   and a couple of small legibility/layout fixes for this page's own controls. */

/* Sticky footer: pinned to the bottom of the viewport when the page content is short (initial
   load, or a small result set), pushed below it once content grows past viewport height. */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

body > .container {
    flex: 1 0 auto;
}

body > footer {
    flex-shrink: 0;
}

.status {
    font-size: 0.7em;
    margin-top: 6px;
    min-height: 1em;
}

.warnings {
    margin: 10px 0 0 0;
    padding-left: 18px;
    font-size: 0.8em;
}

/* Sits inline right after "Violations" inside the <h2>, so inline-flex (not flex) keeps it
   on the same line, and a fixed rem font-size stops the badges inheriting the heading's much
   larger em-relative size. */
.summary {
    display: inline-flex;
    gap: 8px;
    font-size: 1rem;
    vertical-align: middle;
}

/* The hard/soft count badges sit next to a heading now, not stacked below one - a fully
   round .badge (mockmotor's default) reads as a notification dot there; give them the same
   corner radius as the rest of the theme's controls (buttons, cards) instead. */
#valid-badge,
#hard-count-badge,
#soft-count-badge {
    border-radius: var(--bs-border-radius);
}

.schema-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.schema-options .btn {
    font-size: 0.75em;
    padding: 4px 10px;
}

.severity-icon {
    font-size: 1.2em;
}

.severity-hard {
    color: #af0b1c;
}

.severity-soft {
    color: #ce7b11;
}

/* mockmotor only defines element-bg-color-orange for .badge-square, not the round
   .badge - fill that gap with its own orange, so a plain .badge can use it too. */
.badge.element-bg-color-orange {
    background-color: #ce7b11;
}

/* mockmotor's colored badges (element-bg-color-*) don't set a text color of their
   own for the darker backgrounds, which leaves the default dark-grey body text on a
   dark red/orange chip - too low-contrast to read as a status indicator. */
.badge.element-bg-color-darkred,
.badge.element-bg-color-red,
.badge.element-bg-color-orange,
.badge.element-bg-color-green {
    color: #fff;
}

/* File inputs default to a 30%-width, ~500px-max mockmotor style; too narrow
   inside a 3-up card layout. */
input[type="file"].form-control {
    width: 100%;
    max-width: none;
}

/* mockmotor-imperial.css themes .btn-primary's resting/hover/focus states but not
   Bootstrap's own `:disabled` styling, which falls back to Bootstrap's default blue. */
.btn:disabled,
.btn.disabled {
    background-color: #cbd5e1;
    border-color: #cbd5e1;
    color: #fff;
    opacity: 1;
}

.json-viewer {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.65em;
    line-height: 1.55;
    background-color: #fafad2;
    border-left: solid 4px #af0b1c;
    max-height: 480px;
    overflow: auto;
}

.json-line {
    display: flex;
    white-space: pre;
    padding: 0 8px;
}

.json-line:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.json-line .line-no {
    color: #9aa4b2;
    text-align: right;
    width: 42px;
    flex-shrink: 0;
    user-select: none;
    margin-right: 12px;
}

.json-line .line-content {
    flex: 1;
}

.json-line.line-hard {
    background-color: rgba(175, 11, 28, 0.16);
    border-left: 3px solid #af0b1c;
}

.json-line.line-soft {
    background-color: rgba(238, 118, 0, 0.18);
    border-left: 3px solid #ee7600;
}

.json-line.line-flash {
    outline: 2px solid #073f8f;
    outline-offset: -2px;
}

/* The "..." row shown between two non-adjacent excerpt ranges in the sources area. */
.json-line-gap {
    justify-content: center;
    color: #9aa4b2;
    user-select: none;
    letter-spacing: 2px;
}

.tok-key { color: #7c3aed; font-weight: 600; }
.tok-string { color: #1b4d3e; }
.tok-number { color: #af0b1c; }
.tok-literal { color: #246195; }

.v-meta {
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.75em;
}

.violation-locations {
    list-style: none;
    margin: 0;
    padding: 0;
}

.violation-locations li {
    padding: 2px 0;
}

.violation-locations li.pointer:hover {
    color: #af0b1c;
    text-decoration: underline;
}

#download-pdf-btn {
    font-size: 0.8em;
}

#download-pdf-btn i {
    margin-right: 4px;
}
