/**
 * v3 careerweb — empty state, skeleton, spinner.
 * Loaded near the end so its rules override component-local fallbacks.
 */

/* ─── Empty state (no jobs / no filter matches) ─── */
.empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--ink-2);
}
.empty-state-icon {
    width: 56px;
    height: 56px;
    background: var(--surface-2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.empty-state-icon i {
    font-size: 28px;
    color: var(--ink-3);
}
/* Alert variant — used by the joblist error state. Tinted background
   reads as "something went wrong" without crossing into red-alarm
   territory; the brand still gets to carry the meaning. */
.empty-state-icon--alert {
    background: var(--brand-tint-strong);
}
.empty-state-icon--alert i {
    color: var(--brand);
}
.empty-state .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--brand);
    color: var(--brand-on);
    border: none;
    border-radius: var(--radius);
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: filter 120ms ease;
}
.empty-state .btn-primary:hover { filter: brightness(0.95); }
.empty-state-title {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 18px;
    margin: 0 0 6px;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.empty-state-desc {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.55;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}
.empty-state .btn-clear {
    margin-top: 4px;
}

/* Detail-pane variant — claim the full viewport so the "Pick a job"
   prompt centers across the whole screen height instead of a small
   panel inside it. The .detail container's own min-height is bumped
   to match so it grows past the joblist column's empty-state height. */
.empty-state--detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 24px;
}
/* When the detail panel only carries the empty state, lift its own
   floor so it actually stretches that far inside the page grid. */
.detail:has(> .empty-state--detail) {
    min-height: calc(100vh - 80px);
}

/* ─── Skeletons (in-app fetch states) ─── */
.jobcard-skeleton {
    pointer-events: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
}
.skeleton-line {
    height: 14px;
    background: linear-gradient(
        90deg,
        var(--surface-2) 0%,
        var(--surface-3) 50%,
        var(--surface-2) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite ease-in-out;
    border-radius: 4px;
    margin-bottom: 10px;
}
.skeleton-line:last-child { margin-bottom: 0; }
.skeleton-line--lg { height: 18px; width: 92%; }
.skeleton-line--sm { height: 12px; width: 55%; }
/* Detail-panel skeleton — placeholder for the job_description section
   while the enrichment fetch (apis/job.php) is in flight. Reserves
   roughly the height of the real content so the panel doesn't reflow
   when the body arrives. */
.detail-section--skeleton .section-title { opacity: 0.55; }
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Detail-shape skeleton (whole pane) ───
   Used by cwv3.skeleton.renderDetailSkeleton when a list refetch
   swaps the active job. Builds the hero + About + Apply card +
   Key-details layout out of shimmer bars so the loading state
   reads as the actual surface the real content will land into. */
.detail-hero--skeleton {
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
    padding: 32px 32px 28px;
    border-bottom: 1px solid var(--border);
}
.cwv3-skel-eyebrow {
    width: 110px;
    height: 11px;
    background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite ease-in-out;
    border-radius: 3px;
    margin-bottom: 18px;
}
.cwv3-skel-pullquote {
    border-left: 3px solid var(--surface-3);
    padding-left: 16px;
}
.cwv3-skel-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
}
.cwv3-skel-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cwv3-skel-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.cwv3-skel-field .cwv3-skel-label {
    width: 35%;
    height: 12px;
    margin: 0;
}
.cwv3-skel-field .cwv3-skel-label--md { width: 50%; }
.cwv3-skel-field .cwv3-skel-label--lg { width: 70%; }
.cwv3-skel-field .cwv3-skel-input {
    width: 100%;
    height: 50px;
    border-radius: var(--radius-lg);
    margin: 0;
}
.cwv3-skel-keydetails { padding: 0; overflow: hidden; }
.cwv3-skel-keyrow {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-top: 1px solid var(--border);
}
.cwv3-skel-keyrow:first-child { border-top: none; }
.cwv3-skel-keyicon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite ease-in-out;
}
.cwv3-skel-keytext { flex: 1; min-width: 0; }
@media (max-width: 860px) {
    .detail-hero--skeleton { padding: 22px 18px 22px; }
    .cwv3-skel-card { padding: 22px 18px; border-radius: var(--radius-lg); }
    .cwv3-skel-field-row { grid-template-columns: 1fr; }
}

/* ─── Inline spinner (used inside buttons during fetch) ─── */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-2);
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
