/* ============================================================
   candidate-profile.css
   Candidate detail page (HR view) — NaukriSunshine

   Design tokens reused from the search-results page for
   consistency across the recruiter product:
     navy   #003366  — headings
     blue   #0d6efd  — primary actions, links, icons
     green  #2f9e5c  — "available" signal
     amber  #c8880f  — "on notice" signal
   ============================================================ */

:root {
    --cp-navy: #003366;
    --cp-blue: #0d6efd;
    --cp-blue-dark: #0b5ed7;
    --cp-blue-tint: #e7f1ff;
    --cp-green: #2f9e5c;
    --cp-green-tint: #eefaf2;
    --cp-amber: #c8880f;
    --cp-amber-tint: #fff8ec;
    --cp-text: #1b2a3c;
    --cp-text-muted: #6b7280;
    --cp-text-soft: #8a93a3;
    --cp-border: #e6e8eb;
    --cp-border-soft: #eef0f3;
    --cp-bg: #f5f7fa;
    --cp-radius: 12px;
}

body {
    background: var(--cp-bg);
    padding-top: 20px;
    color: var(--cp-text);
}

.cp-container {
    max-width: 1200px;
    margin: 0 auto 40px auto;
}

/* ===== Shared card ===== */
.cp-card {
    background: #fff;
    border: 1px solid var(--cp-border);
    border-radius: var(--cp-radius);
    padding: 24px 28px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

.cp-section-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--cp-navy);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .cp-section-title i {
        color: var(--cp-blue);
        font-size: 16px;
    }

/* ===== Header card =====
   Left accent bar echoes the candidate-card left-rule signal used on the
   search results page: green if available, amber if serving notice — a
   recruiter should read availability before reading a single word. */
.cp-header-card {
    background: #fff;
    border: 1px solid var(--cp-border);
    border-left: 5px solid var(--cp-text-soft);
    border-radius: var(--cp-radius);
    padding: 28px 32px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 24px;
}

    .cp-header-card.is-available {
        border-left-color: var(--cp-green);
    }

    .cp-header-card.is-notice {
        border-left-color: var(--cp-amber);
    }

.cp-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px var(--cp-border);
}

.cp-header-main {
    flex: 1;
    min-width: 240px;
}

.cp-name {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--cp-text);
    margin: 0 0 2px 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.cp-title {
    font-size: 15px;
    color: var(--cp-text-muted);
    margin: 0 0 12px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-meta-row {
    display: flex;
    flex-wrap: wrap;
    row-gap: 8px;
    column-gap: 20px;
    font-size: 13.5px;
    color: var(--cp-text);
    margin-bottom: 6px;
}

.cp-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

    .cp-meta-item i {
        color: var(--cp-blue);
        font-size: 12px;
        width: 13px;
        text-align: center;
        flex-shrink: 0;
    }

    .cp-meta-item span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 260px;
    }

.cp-actions-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

/* Status pill — same visual grammar as .notice-period on the search page */
.cp-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--cp-amber-tint);
    color: #8a6a12;
}

    .cp-status-pill::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--cp-amber);
        flex-shrink: 0;
    }

    .cp-status-pill.is-available {
        background: var(--cp-green-tint);
        color: #197a45;
    }

        .cp-status-pill.is-available::before {
            background: var(--cp-green);
        }

.cp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
    white-space: nowrap;
}

.cp-btn-primary {
    background: var(--cp-blue);
    color: #fff !important;
}

    .cp-btn-primary:hover {
        background: var(--cp-blue-dark);
        color: #fff !important;
    }

.cp-btn-outline {
    background: #fff;
    color: var(--cp-text);
    border: 1.5px solid var(--cp-border);
}

    .cp-btn-outline:hover {
        border-color: var(--cp-blue);
        color: var(--cp-blue);
    }

.cp-header-print {
    margin-left: auto;
    align-self: flex-start;
}

/* ===== Skills ===== */
.cp-skill-badge {
    background: transparent;
    border: 1px solid #d7dce3;
    color: #445068;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    display: inline-block;
    margin: 0 8px 8px 0;
}

/* ===== In-content ad — styled to sit quietly inside the page flow,
   matching the candidate-infeed-ad treatment on the search page ===== */
.cp-infeed-ad {
    text-align: center;
    margin: 4px 0 24px 0;
    padding-top: 10px;
}

.cp-ad-label {
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #aab1ba;
    display: block;
    margin-bottom: 10px;
}

/* ===== Career objective ===== */
.cp-about {
    font-size: 14.5px;
    line-height: 1.7;
    color: #374151;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    margin: 0;
}

/* ===== Experience timeline =====
   A connecting line + dots is justified here: the entries are a real
   chronological sequence, not an arbitrary list. */
.cp-timeline {
    position: relative;
    padding-left: 28px;
}

    .cp-timeline::before {
        content: "";
        position: absolute;
        left: 5px;
        top: 6px;
        bottom: 6px;
        width: 2px;
        background: var(--cp-border-soft);
    }

.cp-timeline-item {
    position: relative;
    padding-bottom: 26px;
}

    .cp-timeline-item:last-child {
        padding-bottom: 0;
    }

    .cp-timeline-item::before {
        content: "";
        position: absolute;
        left: -28px;
        top: 5px;
        width: 11px;
        height: 11px;
        border-radius: 50%;
        background: var(--cp-blue);
        border: 2px solid #fff;
        box-shadow: 0 0 0 1px var(--cp-blue-tint);
    }

.cp-timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.cp-timeline-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--cp-text);
    margin: 0;
    word-break: break-word;
    max-width: 100%;
}

    .cp-timeline-title strong {
        color: var(--cp-navy);
    }

.cp-timeline-date {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--cp-text-muted);
    background: #f1f3f5;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.cp-timeline-desc {
    font-size: 13.5px;
    color: var(--cp-text-muted);
    line-height: 1.6;
    margin: 0;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

.cp-total-exp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    background: var(--cp-blue-tint);
    color: var(--cp-blue);
    padding: 7px 16px;
    border-radius: 20px;
}

/* ===== Education ===== */
.cp-edu-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--cp-border-soft);
}

    .cp-edu-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

.cp-edu-degree {
    font-size: 15px;
    font-weight: 600;
    color: var(--cp-text);
    margin: 0 0 3px 0;
}

.cp-edu-meta {
    font-size: 13px;
    color: var(--cp-text-soft);
    margin: 0 0 4px 0;
}

.cp-edu-spec {
    font-size: 13.5px;
    color: var(--cp-text-muted);
    margin: 0;
}

/* ===== Additional info ===== */
.cp-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 32px;
}

.cp-info-item {
    font-size: 13.5px;
}

.cp-info-label {
    display: block;
    color: var(--cp-text-soft);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
}

.cp-info-value {
    color: var(--cp-text);
    font-weight: 600;
}

/* ===== Sidebar — sticky recruiter action panel =====
   Keeps contact info and the Download CV action reachable while HR
   scrolls a long profile, instead of forcing a scroll back to the top. */
.cp-sidebar {
    position: sticky;
    top: 20px;
}

.cp-sidebar-card {
    background: #fff;
    border: 1px solid var(--cp-border);
    border-radius: var(--cp-radius);
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    margin-bottom: 16px;
    text-align: center;
}

.cp-sidebar-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px auto;
    display: block;
    box-shadow: 0 0 0 1px var(--cp-border);
}

.cp-sidebar-name {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--cp-text);
    margin: 0 0 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-sidebar-title {
    font-size: 12.5px;
    color: var(--cp-text-muted);
    margin: 0 0 12px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-sidebar-card .cp-btn {
    width: 100%;
    justify-content: center;
}

.cp-quickfacts {
    text-align: left;
}

.cp-quickfacts-title {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cp-text-soft);
    margin: 0 0 14px 0;
    font-weight: 700;
}

.cp-quickfact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--cp-border-soft);
}

    .cp-quickfact:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .cp-quickfact i {
        color: var(--cp-blue);
        font-size: 13px;
        width: 16px;
        text-align: center;
        margin-top: 2px;
        flex-shrink: 0;
    }

.cp-quickfact-body {
    min-width: 0;
}

.cp-quickfact-label {
    display: block;
    font-size: 11px;
    color: var(--cp-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.cp-quickfact-value {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--cp-text);
    word-break: break-word;
}

.cp-ad-card {
    background: #fafbfc;
    border: 1px dashed #dfe3e8;
    border-radius: 10px;
    padding: 10px 6px;
    text-align: center;
    overflow: hidden;
}

.cp-ad-card-label {
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #aab1ba;
    display: block;
    margin-bottom: 8px;
}

/* ===== Mobile ===== */
@media (max-width: 991px) {
    .cp-sidebar {
        position: static;
        margin-top: 4px;
    }
}

@media (max-width: 576px) {
    .cp-header-card {
        padding: 20px;
    }

    .cp-card {
        padding: 18px;
    }

    .cp-name {
        font-size: 21px;
    }

    .cp-header-print {
        margin-left: 0;
    }

    .cp-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Print ===== */
@media print {
    body * {
        visibility: hidden;
    }

    .cp-printable, .cp-printable * {
        visibility: visible;
    }

    .cp-printable {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    .cp-sidebar, .cp-btn, .cp-header-print {
        display: none !important;
    }
}
