/* =====================================================================
   InternalJobsBlazor - Bootstrap 5 theme overrides and component styles.
   ===================================================================== */

:root {
    --ij-red: #c51010;
    --ij-red-dark: #a30d0d;
    --ij-red-soft: #fbeaea;
    --ij-green: #0f9d58;
    --ij-green-soft: #e7f7ee;
    --ij-ink: #101828;
    --ij-muted: #667085;
    --ij-line: #e4e7ec;
    --ij-bg: #f6f7f9;

    --bs-primary: #c51010;
    --bs-primary-rgb: 197, 16, 16;
    --bs-body-color: #101828;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bs-border-color: #e4e7ec;
    --bs-link-color: #c51010;
    --bs-link-hover-color: #a30d0d;
}

body {
    background: var(--ij-bg);
    font-family: var(--bs-body-font-family);
    color: var(--ij-ink);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -0.015em; }

a { text-decoration: none; }
a:hover { text-decoration: underline; }

.btn-primary {
    --bs-btn-bg: var(--ij-red);
    --bs-btn-border-color: var(--ij-red);
    --bs-btn-hover-bg: var(--ij-red-dark);
    --bs-btn-hover-border-color: var(--ij-red-dark);
    --bs-btn-active-bg: var(--ij-red-dark);
    --bs-btn-active-border-color: var(--ij-red-dark);
    --bs-btn-disabled-bg: var(--ij-red);
    --bs-btn-disabled-border-color: var(--ij-red);
}

.btn-outline-primary {
    --bs-btn-color: var(--ij-red);
    --bs-btn-border-color: var(--ij-red);
    --bs-btn-hover-bg: var(--ij-red);
    --bs-btn-hover-border-color: var(--ij-red);
    --bs-btn-active-bg: var(--ij-red);
    --bs-btn-active-border-color: var(--ij-red);
}

.text-primary { color: var(--ij-red) !important; }
.bg-primary { background-color: var(--ij-red) !important; }

.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: #e3a3a3;
    box-shadow: 0 0 0 .2rem rgba(197, 16, 16, .15);
}
.form-check-input:checked {
    background-color: var(--ij-red);
    border-color: var(--ij-red);
}

/* ------------------------------------------------------------- shell */

.ij-nav {
    background: #fff;
    border-bottom: 1px solid var(--ij-line);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.ij-brand {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: var(--ij-ink);
}
.ij-brand:hover { text-decoration: none; color: var(--ij-ink); }
.ij-brand-logo { height: 22px; }

.ij-nav .nav-link {
    color: #344054;
    font-weight: 500;
    padding: .5rem .85rem;
    border-radius: 8px;
}
.ij-nav .nav-link:hover { background: #f2f4f7; text-decoration: none; }
.ij-nav .nav-link.active { color: var(--ij-red); background: var(--ij-red-soft); }

.ij-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--ij-red-soft);
    color: var(--ij-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .8rem;
}

.ij-footer {
    background: #fff;
    border-top: 1px solid var(--ij-line);
    padding: 1.75rem 0;
    margin-top: 3rem;
    color: var(--ij-muted);
    font-size: .9rem;
}

.app-shell { padding: 1.5rem 0 3rem; }

/* ------------------------------------------------------------- cards */

.ij-card {
    background: #fff;
    border: 1px solid var(--ij-line);
    border-radius: 12px;
}
.ij-card + .ij-card { margin-top: .75rem; }

.job-card {
    background: #fff;
    border: 1px solid var(--ij-line);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-bottom: .75rem;
    transition: box-shadow .12s ease, border-color .12s ease;
}
.job-card:hover {
    border-color: #eab6b6;
    box-shadow: 0 4px 16px rgba(16, 24, 40, .08);
}
.job-card h3 { font-size: 1.05rem; margin-bottom: .15rem; }
.job-card h3 a { color: var(--ij-ink); }
.job-card h3 a:hover { color: var(--ij-red); }
.job-card .department { color: var(--ij-muted); font-size: .9rem; }
.job-card .snippet {
    color: #475467;
    font-size: .9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .78rem;
    font-weight: 500;
    padding: .18rem .55rem;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    white-space: nowrap;
}
.chip.red { background: var(--ij-red-soft); color: var(--ij-red); }
.chip.green { background: var(--ij-green-soft); color: #0b7f46; }
.chip.gray { background: #f2f4f7; color: #475467; }

.job-detail-body { line-height: 1.7; color: #344054; }
.job-detail-body p { margin-bottom: 1rem; }

.meta-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--ij-line);
    border-bottom: 1px solid var(--ij-line);
}
.meta-row .label {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ij-muted);
    margin-bottom: .15rem;
}
.meta-row .value { font-weight: 600; }

/* --------------------------------------------------------- wizard */

.ij-wizard { display: flex; gap: 1.5rem; align-items: flex-start; }
.ij-wizard-nav {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    position: sticky;
    top: 84px;
}
.ij-wizard-nav button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    text-align: left;
    border: 1px solid var(--ij-line);
    background: #fff;
    border-radius: 10px;
    padding: .65rem .9rem;
    font-weight: 500;
    color: #344054;
}
.ij-wizard-nav button.active { border-color: var(--ij-red); background: var(--ij-red-soft); color: var(--ij-red); font-weight: 600; }
.ij-wizard-nav button .done-check { color: var(--ij-green); }
.ij-wizard-body { flex: 1; min-width: 0; }

.entry-card {
    background: #fff;
    border: 1px solid var(--ij-line);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-bottom: .85rem;
    color: var(--ij-ink);
}
a:hover > .entry-card {
    border-color: #eab6b6;
    box-shadow: 0 4px 16px rgba(16, 24, 40, .08);
}
.entry-card .entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: .5rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    font-size: .78rem;
    font-weight: 600;
    padding: .22rem .65rem;
    border-radius: 999px;
}
.status-pill.Draft { background: #f2f4f7; color: #475467; }
.status-pill.Submitted { background: var(--ij-red-soft); color: var(--ij-red); }
.status-pill.Reviewing { background: #fff5e5; color: #b54708; }
.status-pill.Interview { background: #eef2ff; color: #1f4fd8; }
.status-pill.SelectedForNextStep { background: #eef2ff; color: #1f4fd8; }
.status-pill.BackgroundCheck { background: #fff5e5; color: #b54708; }
.status-pill.Offer { background: var(--ij-green-soft); color: #0b7f46; }
.status-pill.OfferAccepted { background: var(--ij-green-soft); color: #0b7f46; }
.status-pill.OfferDeclined { background: #f2f4f7; color: #98a2b3; }
.status-pill.Rejected { background: #f2f4f7; color: #98a2b3; }

.recommendation-pill {
    display: inline-flex;
    align-items: center;
    font-size: .74rem;
    font-weight: 600;
    padding: .18rem .55rem;
    border-radius: 999px;
}
.recommendation-pill.Recommend { background: var(--ij-green-soft); color: #0b7f46; }
.recommendation-pill.Neutral { background: #f2f4f7; color: #475467; }
.recommendation-pill.DoNotRecommend { background: #fde8e8; color: #a30d0d; }

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--ij-muted);
}
.empty-state i { font-size: 2.4rem; color: #d0d5dd; display: block; margin-bottom: .75rem; }

.note-item {
    border-bottom: 1px solid var(--ij-line);
    padding: .85rem 0;
}
.note-item:last-child { border-bottom: none; }
.note-item .note-meta { font-size: .82rem; color: var(--ij-muted); }

#blazor-error-ui {
    background: #fee4e2;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    display: none;
    left: 0;
    padding: .8rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1080;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* --- Login / register --- */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f6f8;
    padding: 24px 0;
}

.login-card {
    width: 440px;
    max-width: 92vw;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 32px 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.login-logo {
    display: block;
    height: 32px;
    margin: 0 auto 16px;
}

.login-card > p.text-muted {
    text-align: center;
}

@media (max-width: 767.98px) {
    .ij-wizard { flex-direction: column; }
    .ij-wizard-nav { width: 100%; flex-direction: row; flex-wrap: wrap; position: static; }
    .ij-wizard-nav button { flex: 1; min-width: 130px; }
}

/* Identity-document and other image attachments: fixed-height preview so a row of
   licences, passports and résumé PDFs still lines up as a tidy list. */
.ij-attachment-thumb {
    height: 56px;
    width: 84px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e4e7ec;
    background: #f9fafb;
}

/* Dialog maximize/minimize. Syncfusion's dialog has no window controls of its own, so the
   header is templated; these rules inset that group clear of the close icon Syncfusion
   positions at the far right, and collapse the body when minimised. */
.ij-dialog-window-buttons {
    display: inline-flex;
    gap: 2px;
    margin-right: 26px;
}

.ij-dialog-window-buttons .e-btn {
    padding: 2px 6px;
    line-height: 1;
}

.ij-dialog-minimized .e-dlg-content {
    display: none !important;
}

.ij-dialog-minimized .e-footer-content {
    display: none !important;
}

/* Syncfusion ships SfTextArea's wrapper as `e-auto-width` + inline-flex, so it collapses to
   roughly 160px and the label ends up beside a narrow box instead of above a full-width one
   (SfTextBox's wrapper has no e-auto-width and fills its parent). Every multi-line field in
   this app is a full-width block field, so normalise the wrapper to match SfTextBox. */
.e-input-group.e-control-wrapper.e-multi-line-input.e-auto-width {
    width: 100%;
    display: flex;
}

.e-input-group.e-control-wrapper.e-multi-line-input.e-auto-width textarea.e-textarea {
    width: 100%;
}

.legal-page {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    line-height: 1.6;
}

.legal-page h2 {
    font-size: 1.15rem;
    margin-top: 1.75rem;
}
