/*
 * Page-specific rules of CandidaGo, on top of the design system (candidago.css).
 * Use the design tokens (var(--cg-...)) for colours so both colour modes work. No inline styles in views.
 */

/* ---------- Toasts ---------- */
/* Bottom right: page actions (save, publish...) are at the top right and must stay clickable. */
.toast-container-candidago {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1071;
}

/* ---------- Sign-in pages ---------- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--cg-text-muted);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    flex: 1;
    border-top: 1px solid var(--cg-border);
    content: "";
}

.qr-code {
    display: block;
    width: 200px;
    height: 200px;
    margin: 0 auto 1rem;
    image-rendering: pixelated;
}

.authenticator-key {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.08em;
    word-break: break-all;
}

.error-page-icon {
    font-size: 3rem;
    color: var(--cg-primary);
}

/* ---------- Home ---------- */
.home-welcome-icon {
    font-size: 2.5rem;
}

/* ---------- Career site ---------- */
/* The organization's colour (--career-primary) is checked for 4.5:1 on white: career pages stay in light mode. */
.career-body {
    --cg-primary: var(--career-primary, #1d4f91);
    --bs-link-color: var(--career-primary, #1d4f91);
    --bs-link-hover-color: var(--career-primary, #1d4f91);
    background-color: var(--cg-bg);
}

.career-header {
    border-bottom: 1px solid var(--cg-border);
    background-color: var(--cg-surface);
}

.career-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    min-height: 4rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.career-brand,
.career-brand:hover,
.career-brand:focus {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    color: var(--cg-text);
    font-weight: 700;
    text-decoration: none;
}

.career-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    flex: none;
    border-radius: 9px;
    background-color: var(--career-primary, #1d4f91);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 800;
}

.career-brand-name {
    line-height: 1.2;
}

.career-hero-icon {
    font-size: 3rem;
    color: var(--career-primary, #1d4f91);
}

.career-main {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

.career-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
    border-top: 1px solid var(--cg-border);
    color: var(--cg-text-muted);
    font-size: 0.875rem;
}

.career-footer a {
    color: var(--cg-text-muted);
}

/* ---------- Lists of check boxes in forms ---------- */
.checkbox-list {
    max-height: 14rem;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--cg-border-strong);
    border-radius: var(--cg-radius);
}

/* ---------- Recruiter pipeline ---------- */
.pipeline {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    align-items: flex-start;
}

.pipeline-column {
    flex: 1 0 14rem;
    border-radius: var(--cg-radius-lg);
    background-color: var(--cg-surface-3);
}

.pipeline-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    font-weight: 600;
}

.pipeline-column-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 4rem;
    padding: 0 0.5rem 0.5rem;
}

.pipeline-card,
.pipeline-card:hover,
.pipeline-card:focus {
    display: block;
    padding: 0.75rem;
    border: 1px solid var(--cg-border);
    border-radius: var(--cg-radius);
    background-color: var(--cg-surface);
    color: inherit;
    text-decoration: none;
}

.pipeline-card:hover,
.pipeline-card:focus {
    box-shadow: 0 0 0 2px var(--cg-primary);
}

/* ---------- Application details ---------- */
.application-note {
    padding: 0.6rem 0;
    border-top: 1px solid var(--cg-border-strong);
}

.application-note:first-child {
    padding-top: 0;
    border-top: 0;
}

.application-note-text {
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* An email is always shown as its recipient sees it: dark text on white, in both skins. */
.outgoing-email-body {
    overflow-wrap: anywhere;
    background-color: #ffffff;
    color: #222230;
}

/* ---------- Career site: navigation, postings, forms ---------- */
.career-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.career-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 0.75rem;
    border-radius: var(--cg-radius);
    color: var(--cg-text-2);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
}

.career-nav a:hover,
.career-nav a:focus {
    background-color: var(--cg-surface-3);
    color: var(--cg-text);
}

.career-nav a.active {
    color: var(--career-primary, #1d4f91);
}

.career-posting,
.career-posting:hover,
.career-posting:focus {
    display: block;
    color: inherit;
    text-decoration: none;
}

.career-posting:hover,
.career-posting:focus {
    box-shadow: 0 0 0 2px var(--career-primary, #346CB0);
}

.career-posting h2 {
    color: var(--career-primary, #346CB0);
}

.career-button,
.career-button:hover,
.career-button:focus {
    border-color: var(--career-primary, #346CB0);
    background-color: var(--career-primary, #346CB0);
}

.career-button:hover,
.career-button:focus {
    filter: brightness(0.92);
}

.career-form {
    max-width: 46rem;
    margin: 0 auto;
}

.career-form-narrow {
    max-width: 28rem;
}

.career-description {
    overflow-wrap: anywhere;
}

/* ---------- Job posting form ---------- */
.internal-fields {
    padding: 1rem;
    border: 1px dashed var(--cg-border-strong);
    border-radius: 0.25rem;
}

.distribution-source + .distribution-source {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--cg-border-strong);
}

/* ---------- Career site: branding, search and sharing ---------- */
/* A logo is drawn for a light page: it always sits on white, on the coloured header and in both skins. */
.career-logo,
.career-logo-preview {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: #ffffff;
}

.career-logo img {
    max-width: 10rem;
    max-height: 2.5rem;
}

.career-logo-preview {
    border: 1px solid var(--cg-border-strong);
}

.career-logo-preview img {
    max-width: 12rem;
    max-height: 4rem;
}

.career-introduction {
    overflow-wrap: anywhere;
}

.career-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.career-share {
    margin-bottom: 0.5rem;
}

/* ---------- J3: pipeline selection, questionnaires ---------- */
.page-intro {
    max-width: 52rem;
}

.pipeline-card-wrapper {
    position: relative;
}

.pipeline-card-check {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 1;
}

.pipeline-card-wrapper .pipeline-card-check ~ .pipeline-card .pipeline-card-name {
    padding-right: 1.5rem;
}

.question-options {
    padding-left: 1.25rem;
}

.career-question + .career-question {
    margin-top: 1rem;
}

/* ---------- J4: emails and interviews ---------- */
.merge-fields code {
    white-space: nowrap;
}

/* An email is always shown as its recipient sees it: dark text on white, in both skins. */
.email-preview {
    background-color: #ffffff;
    color: #222230;
    overflow-wrap: anywhere;
}

/* ---------- J6: reports, open API, AI assistance ---------- */
.reports-chart {
    position: relative;
    height: 280px;
}

.reports-customize-menu {
    min-width: 16rem;
}

.api-key {
    overflow-wrap: anywhere;
}

.ai-assistant {
    background-color: var(--cg-primary-soft);
}

/* ---------- J8: accessibility ---------- */
[tabindex="-1"]:focus {
    outline: none;
}
