/* Candidate card layout - shared across top_candidates and personnel_search pages */

.candidateCard {
    background: #fff;
    border: 1px solid #d9dde3;
    margin-bottom: 14px;
    box-sizing: border-box;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    overflow: hidden;
}

.candidateCard-shell {
    display: block;
    width: 100%;
}

.candidateCard-main {
    display: grid;
    grid-template-columns: 150px minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: start;
    width: 100%;
    box-sizing: border-box;
}

.candidateCard-left,
.candidateCard-center,
.candidateCard-right {
    min-width: 0;
    box-sizing: border-box;
}

.candidateCard-left {
    padding: 10px 8px 8px;
    border-right: 1px solid #e5e8ed;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    box-sizing: border-box;
}

.candidateCard-profile {
    position: relative;
    text-align: center;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Doc count sits just above the profile image - beat page-level absolute/float rules */
.candidateCard .Docs_Span,
.candidateCard .Docs_Span.Docs_Counter,
.candidateCard .candidateCard-profile .Docs_Span.Docs_Counter,
.candidateCard-profile .Docs_Span.Docs_Counter {
    position: static !important;
    display: block !important;
    float: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    margin: 0 auto 6px !important;
    transform: none !important;
    z-index: 2;
    width: fit-content !important;
    height: auto !important;
    border-radius: 4px !important;
    padding: 2px 7px !important;
    line-height: 1.3 !important;
    font-size: 11px !important;
    white-space: nowrap;
    order: -1;
}

.candidateCard-profile > a {
    display: block;
    text-align: center;
    order: 0;
}

.candidateCard-profile .profileImg {
    border-radius: 50%;
    height: 90px;
    width: 90px;
    display: block;
    margin: 0 auto 6px;
    object-fit: cover;
}

.candidateCard-ratingRow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /*flex-wrap: wrap;*/
    margin: 0 0 6px;
    min-height: 20px;
    /*order: 1;*/
    width: 100%;
}

.candidateCard-ratingRow img {
    display: inline-block;
    vertical-align: middle;
    max-height: 16px;
}

.candidateCard-profile .ys_box,
.candidateCard-profile .no_box,
.candidateCard-ratingRow .ys_box,
.candidateCard-ratingRow .no_box {
    display: inline-block !important;
    float: none !important;
    margin: 0 !important;
    vertical-align: middle;
    width: 10px !important;
    height: 10px !important;
}

.candidateCard-favorite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    text-align: center;
    vertical-align: middle;
}

.candidateCard-favorite img,
.candidateCard-profile img[src*='favorite'],
.candidateCard-profile img[src*='unfavorite'] {
    margin: 0 !important;
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.candidateCard-viewed {
    width: 100%;
    margin-top: 4px;
    order: 2;
}

.candidateCard-skills {
    margin-top: 2px;
    text-align: left;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.candidateCard-skills-title {
    color: #506e96;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 4px;
    text-align: center;
    flex: 0 0 auto;
}

/* Desktop: plain scrollable list, no chip background/padding */
.candidateCard-skills-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    font-size: 11px;
    line-height: 1.35;
    color: #333;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
    padding: 0;
    background: transparent;
    box-sizing: border-box;
}

.candidateCard-skill-item,
.candidateCard-skill-tag {
    display: block;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 0 3px 0 !important;
    color: #333 !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    white-space: normal;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    box-shadow: none !important;
}

.candidateCard-center {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-self: start;
}

.candidateCard-summary {
    background: #eef2f7;
    padding: 8px 12px;
    border-bottom: 1px solid #dde3ea;
    flex: 0 0 auto;
}

.candidateCard-summary label,
.candidateCard-summary .listingTileContainer-title label {
    font-size: 11px !important;
    color: #506e96 !important;
    font-weight: 700;
    margin-right: 4px;
    line-height: 1.4;
}

.candidateCard-summary span,
.candidateCard-summary .listingTileContainer-title span,
.candidateCard-summary .currentposition {
    font-size: 11px !important;
    color: #333 !important;
    line-height: 1.4;
}

.candidateCard-details {
    padding: 8px 12px;
    font-size: 11px;
    line-height: 1.4;
    color: #333;
    flex: 1 1 auto;
}

.candidateCard-details label {
    font-weight: 700;
    color: #506e96;
    margin-right: 4px;
    font-size: 11px;
}

.candidateCard-details #prop_description {
    margin-top: 4px;
    width: auto !important;
}

.candidateCard-right {
    border-left: 1px solid #e5e8ed;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    align-self: start;
    height: auto;
}

.candidateCard-career {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    height: auto;
}

.candidateCard-career-head {
    background: #343e53;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    padding: 7px 8px;
    flex: 0 0 auto;
}

.candidateCard-career-table {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.candidateCard-career-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    border-bottom: 1px solid #eee;
    padding: 5px 8px;
    font-size: 11px;
    color: #333;
    line-height: 1.35;
}

.candidateCard-career-row-head {
    background: #f5f5f5;
    color: #625f5a;
    font-weight: 700;
    border-bottom: 1px solid #ccc;
    flex: 0 0 auto;
}

.candidateCard-career-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

.candidateCard-career-col {
    padding-right: 6px;
    word-break: break-word;
}

.candidateCard-career-col-title {
    flex: 4;
    min-width: 0;
}

.candidateCard-career-col-industry {
    flex: 3;
    min-width: 0;
}

.candidateCard-career-col-date {
    flex: 3;
    min-width: 0;
}

.candidateCard-career-empty {
    padding: 10px;
    font-size: 11px;
    color: #777;
    text-align: center;
}

/* Footer / action buttons - always inline */
.candidateCard-actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid #d9dde3;
    background: #eef2f7;
    box-sizing: border-box;
}

.candidateCard-actions > span {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    float: none !important;
    margin: 0 !important;
    vertical-align: middle;
    flex: 0 0 auto;
    width: auto !important;
}

/* Keep intentionally-hidden controls hidden (overrides display:inline-flex !important) */
.candidateCard-actions [style*="display:none"],
.candidateCard-actions [style*="display: none"],
.candidateCard-actions #hidstatus {
    display: none !important;
}

.candidateCard-actions .button,
.candidateCard-actions .book_button,
.candidateCard-actions .book_buttonGreen,
.candidateCard-actions a.button,
.candidateCard-actions a.book_button,
.candidateCard-actions a.book_buttonGreen,
.candidateCard-actions span.button,
.candidateCard-actions span.book_button,
.candidateCard-actions span.book_buttonGreen {
    float: none !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 34px;
    height: 34px !important;
    width: auto !important;
    padding: 0 14px !important;
    line-height: 1 !important;
    font-size: 12px !important;
    font-weight: 600;
    border-radius: 6px !important;
    white-space: nowrap;
    text-decoration: none !important;
    vertical-align: middle;
    flex: 0 0 auto;
}

.candidateCard-actions .BtnPDF,
.candidateCard-actions a.BtnPDF,
.candidateCard-actions a[title='Download PDF'],
.candidateCard-actions a[title="Download PDF"] {
    min-width: 34px !important;
    width: 34px !important;
    padding: 0 !important;
}

.candidateCard-actions .button .label,
.candidateCard-actions .book_button span,
.candidateCard-actions .book_buttonGreen span {
    display: inline;
    /*line-height: 1;*/
    font-size: inherit;
}

.candidateCard-viewed .button.uniqueblue {
    display: block;
    width: 100%;
    margin-bottom: 3px !important;
    text-align: left;
    font-size: 10px;
    min-height: 24px;
    height: auto !important;
    padding: 4px 6px !important;
}

/* Table wrappers used by existing pages */
#lvCandidatestbl,
#tblcandidates,
.common_personnel_search_cards {
    width: 100%;
    border-collapse: collapse;
}

#lvCandidatestbl tr td,
#tblcandidates tr td {
    padding: 0;
    border: none;
    vertical-align: top;
}

/* Desktop: details drive height; skills fill remaining left column to details bottom */
@media (min-width: 992px) {
    .candidateCard-main {
        align-items: start;
    }

    .candidateCard-left {
        align-self: start;
        overflow: hidden;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .candidateCard-skills {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .candidateCard-skills-body {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        max-height: none;
        overflow-y: auto;
    }

    .candidateCard-right {
        align-self: start;
        height: auto;
        max-height: none;
        overflow: hidden;
    }

    .candidateCard-career {
        height: auto;
    }

    .candidateCard-actions {
        flex-wrap: nowrap;
    }
}

/* Tablet */
@media (max-width: 991px) {
    .candidateCard-main {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
    }

    .candidateCard-left {
        flex: 0 0 100%;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e8ed;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 10px;
        overflow: visible;
        padding: 10px;
        height: auto !important;
        max-height: none;
    }

    .candidateCard-profile {
        flex: 0 0 120px;
        max-width: 130px;
    }

    .candidateCard-skills {
        flex: 1 1 200px;
        margin-top: 0;
        overflow: visible;
        min-height: 0;
        height: auto !important;
    }

    .candidateCard-skills-body {
        max-height: 160px !important;
        height: auto !important;
        overflow-y: auto;
    }

    .candidateCard-center {
        flex: 0 0 100%;
        border-bottom: 1px solid #e5e8ed;
        align-self: auto;
    }

    .candidateCard-right {
        flex: 0 0 100%;
        border-left: none;
        overflow: visible;
        height: auto;
        max-height: none;
        align-self: auto;
    }

    .candidateCard-career {
        height: auto;
    }

    .candidateCard-career-body {
        max-height: 200px !important;
        overflow-y: auto;
    }

    .candidateCard-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Mobile */
@media (max-width: 575px) {
    .candidateCard-left {
        flex-direction: column;
        align-items: stretch;
    }

    .candidateCard-profile {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        flex-direction: column;
        align-items: center;
    }

    .candidateCard .Docs_Span,
    .candidateCard .Docs_Span.Docs_Counter,
    .candidateCard-profile .Docs_Span.Docs_Counter {
        position: static !important;
        display: block !important;
        float: none !important;
        margin: 0 auto 6px !important;
        order: -1;
    }

    .candidateCard-profile .profileImg {
        height: 88px;
        width: 88px;
        margin: 0 auto 6px;
    }

    .candidateCard-skills {
        flex: 0 0 auto;
        width: 100%;
        overflow: visible;
        height: auto !important;
    }

    .candidateCard-skills-title {
        text-align: left;
        margin-bottom: 4px;
    }

    /* Mobile: skills inline, no background/padding */
    .candidateCard-skills-body {
        max-height: none !important;
        height: auto !important;
        overflow: visible;
        display: block;
        line-height: 1.5;
        padding: 0;
        background: transparent;
    }

    .candidateCard-skill-item,
    .candidateCard-skill-tag {
        display: inline !important;
        margin: 0 !important;
        padding: 0 !important;
        background: none !important;
        border: none !important;
        white-space: normal;
    }

    .candidateCard-skill-item:not(:last-child)::after,
    .candidateCard-skill-tag:not(:last-child)::after {
        content: ", ";
    }

    .candidateCard-summary,
    .candidateCard-details {
        padding: 8px 10px;
    }

    .candidateCard-details {
        line-height: 1.4;
    }

    /* Career history stays tabular on mobile */
    .candidateCard-right {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .candidateCard-career-table {
        min-width: 300px;
    }

    .candidateCard-career-row {
        flex-direction: row !important;
        gap: 0;
        padding: 5px 6px;
        font-size: 10px;
    }

    .candidateCard-career-col {
        padding-right: 4px;
    }

    .candidateCard-career-head {
        font-size: 11px;
        padding: 6px;
    }

    .candidateCard-career-body {
        max-height: 180px !important;
    }

    /* Footer buttons stay inline */
    .candidateCard-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 6px;
        padding: 8px 10px;
        background: #e8edf4;
    }

    .candidateCard-actions > span {
        display: inline-flex !important;
        flex: 0 0 auto;
        width: auto !important;
    }

    .candidateCard-actions [style*="display:none"],
    .candidateCard-actions [style*="display: none"] {
        display: none !important;
    }

    .candidateCard-actions .button,
    .candidateCard-actions .book_button,
    .candidateCard-actions .book_buttonGreen,
    .candidateCard-actions a.button,
    .candidateCard-actions a.book_button,
    .candidateCard-actions a.book_buttonGreen,
    .candidateCard-actions span.button,
    .candidateCard-actions span.book_button,
    .candidateCard-actions span.book_buttonGreen {
        width: auto !important;
        min-width: 72px;
        flex: 0 0 auto;
        height: 32px !important;
        min-height: 32px;
        padding: 0 12px !important;
        font-size: 11px !important;
    }

    .candidateCard-actions .BtnPDF,
    .candidateCard-actions a.BtnPDF,
    .candidateCard-actions a[title='Download PDF'],
    .candidateCard-actions a[title="Download PDF"] {
        min-width: 32px !important;
        width: 32px !important;
        padding: 0 !important;
    }
}
