/* ── Blazor validation (keep — Bootstrap doesn't cover these Blazor-specific selectors) ── */
h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Float placeholder to end while unfocused (form-floating RTL/LTR) */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ── App-wide utilities ── */

/* Cursor helpers */
.cursor-pointer { cursor: pointer; }

/* Prevent text selection on interactive UI elements */
.no-select { user-select: none; }

/* Full-page centered flex — used by auth pages */
.page-centered {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Card shadow variant slightly stronger than Bootstrap's shadow-sm */
.card-lifted {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    border: none;
}

/* Status badge dots */
.status-dot {
    display: inline-block;
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    vertical-align: middle;
    margin-inline-end: .3rem;
}

.status-dot.active   { background: #2ecc71; }
.status-dot.idle     { background: #f39c12; }
.status-dot.offline  { background: #95a5a6; }
.status-dot.danger   { background: #e74c3c; }

.bg-purple { background-color: #7c3aed !important; }

/* ── Markdown-rendered question prompts (build-md) ── */
/* Keep prose tight in compact lists, and give embedded code blocks a dark, scrollable pane. */
.build-md p:last-child { margin-bottom: 0; }
.build-md p { margin-bottom: .5rem; }
/* Mixed-language prose: each block picks its own direction from its own content
   (English paragraph → LTR, Hebrew → RTL) even when the page is RTL. */
.build-md p,
.build-md li,
.build-md h1, .build-md h2, .build-md h3, .build-md h4,
.build-md blockquote,
.build-md td, .build-md th {
    unicode-bidi: plaintext;
}
.build-md pre {
    margin: .5rem 0 0;
    border-radius: .375rem;
    overflow: auto;
    max-height: 320px;
    max-width: 100%;
    width: 100%;
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,.08);
    padding: .75rem 1rem;
    direction: ltr;
    text-align: left;
}
.build-md pre code { font-size: .8rem; color: #cdd6f4; }
/* Inline code keeps its own LTR run inside RTL prose. */
.build-md :not(pre) > code {
    font-size: .82em;
    direction: ltr;
    unicode-bidi: isolate;
    background: rgba(99,102,241,.12);
    border: 1px solid rgba(99,102,241,.2);
    border-radius: .25rem;
    padding: .1em .35em;
    color: #818cf8;
    font-family: monospace;
}
