/* =====================================================================
   CSI.CareerTrack.Client — app styles

   Theme tokens + LayoutFullApp chrome load from `_content/CSI.UI/csi-theme.css`.
   Rules here style only the app-local surfaces this shell owns.

   Every color uses a `var(--csi-*)` token that is actually DECLARED in
   CSI.UI (tokens.css / csi-base.css / themes/*.css). A token that does not
   exist silently renders its hex fallback and stops following the user's
   theme, so do not invent names — grep before adding one.
   ==================================================================== */

:root {
    /* Marks the CsiDataTable toolbar and other accent surfaces with the
       CareerTrack app accent. */
    --csi-app-accent: var(--csi-app-careertrack);
}

.loading {
    padding: var(--csi-space-2xl);
    text-align: center;
    color: var(--csi-fg-muted);
}

#blazor-error-ui {
    background: var(--csi-warning-bg);
    color: var(--csi-warning-fg);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
#blazor-error-ui .reload  { cursor: pointer; color: var(--csi-warning-fg); text-decoration: underline; margin-left: var(--csi-space-sm); }

/* ── Page shell ───────────────────────────────────────────────────── */

.ct-page-body {
    padding: var(--csi-space-lg) var(--csi-space-2xl) var(--csi-space-2xl);
}

.ct-lead {
    color: var(--csi-fg-secondary);
    max-width: 62ch;
}

/* Neutral placeholder panel used by the skeleton's not-yet-built surfaces.
   Delete these rules as each surface grows real content. */
.ct-panel {
    background: var(--csi-bg-raised);
    border: 1px solid var(--csi-border-subtle);
    border-radius: var(--csi-radius-lg);
    padding: var(--csi-space-lg);
    margin-top: var(--csi-space-lg);
    max-width: 62ch;
}

.ct-panel h2 {
    margin-top: 0;
    font-size: 1rem;
}

.ct-panel p:last-child {
    margin-bottom: 0;
    color: var(--csi-fg-secondary);
}

/* ── What's New ───────────────────────────────────────────────────── */

.ct-whatsnew-list {
    display: flex;
    flex-direction: column;
    gap: var(--csi-space-lg);
}

.ct-whatsnew-entry {
    border-left: 3px solid var(--csi-app-careertrack);
    padding-left: var(--csi-space-md);
}

.ct-whatsnew-entry h2 {
    font-size: 1rem;
    margin: var(--csi-space-xs) 0;
}

.ct-whatsnew-meta {
    display: flex;
    align-items: center;
    gap: var(--csi-space-sm);
}

.ct-whatsnew-date {
    color: var(--csi-fg-muted);
    font-size: 0.875rem;
}

/* ── Admin: participating courses ─────────────────────────────────────
   Numeric-suffix tokens only. Several --csi-color-* names that read as
   plausible (…-border, …-muted, …-surface) do not exist in tokens.css and
   silently resolve to whatever fallback is written beside them, so every
   value here is one confirmed present in the palette. */

.ct-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--csi-color-neutral-200);
    border-radius: 0.375rem;
    background: var(--csi-color-neutral-0);
    color: var(--csi-color-neutral-900);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.ct-btn:hover:not(:disabled) { background: var(--csi-color-neutral-50); }
.ct-btn:disabled { opacity: 0.55; cursor: default; }

.ct-btn:focus-visible {
    outline: 2px solid var(--csi-color-brand-500);
    outline-offset: 2px;
}

.ct-btn-primary {
    background: var(--csi-color-brand-500);
    border-color: var(--csi-color-brand-700);
    color: var(--csi-color-neutral-0);
}

.ct-btn-primary:hover:not(:disabled) { background: var(--csi-color-brand-700); }

.ct-btn-sm { padding: 0.2rem 0.55rem; font-size: 0.875rem; }

.ct-input {
    width: 100%;
    max-width: 28rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--csi-color-neutral-200);
    border-radius: 0.375rem;
    background: var(--csi-color-neutral-0);
    color: var(--csi-color-neutral-900);
    font: inherit;
}

.ct-input:focus-visible {
    outline: 2px solid var(--csi-color-brand-500);
    outline-offset: 1px;
}

.ct-muted { color: var(--csi-color-neutral-700); font-size: 0.875rem; }

.ct-add-panel { display: flex; flex-direction: column; gap: 0.75rem; }

.ct-candidates {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    max-height: 22rem;
    overflow-y: auto;
}

.ct-candidates li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--csi-color-neutral-100);
}

.ct-candidates li:last-child { border-bottom: none; }

.ct-pill {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--csi-color-neutral-200);
    background: var(--csi-color-neutral-50);
    color: var(--csi-color-neutral-700);
    font-size: 0.8125rem;
    font-weight: 600;
}

.ct-pill-on {
    border-color: var(--csi-color-success-100);
    background: var(--csi-color-success-100);
    color: var(--csi-color-neutral-1000);
}
