/* General Styles */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

.card {
    border-radius: 10px;
    overflow: hidden;
    border: none;
}

.card-header {
    font-weight: 600;
}

/* Upload Page Styles */
.upload-area {
    background-color: #f8f9fa;
    border: 2px dashed #adb5bd;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #0d6efd;
    background-color: #e9f2ff; /* A light blue tint on hover/drag */
}

.file-preview-wrapper {
    margin-bottom: 0.75rem; /* Corresponds to mb-3 */
}

.file-preview-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    padding-right: 2.5rem; /* Make space for the close button */
}

.file-preview-card.is-complete .file-status-icon {
    opacity: 1;
    transform: scale(1);
}

.file-preview-card:hover #remove-file-btn {
    opacity: 1;
}

.file-icon-static {
    margin-right: 1rem;
    flex-shrink: 0;
    z-index: 2;
}

.file-status-icon {
    margin-left: 1rem;
    z-index: 2;
    font-size: 1.2rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease-in-out;
}

.file-preview-card #remove-file-btn {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    z-index: 3;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.file-preview-card .file-info {
    flex-grow: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 2;
}

.file-preview-card .progress-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background-color: #e9ecef;
    z-index: 1;
}

.file-preview-card .progress-bar-fill {
    width: 0%;
    height: 100%;
    background-color: #2ac851;
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

#browse-link:hover {
    text-decoration: underline !important;
}

.screenskills-credit {
    color: #6480ab;
    font-weight: 400;
    font-size: 15px;
}

.circle-icon {
    width: 80px;
    height: 80px;
    background-color: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 2px solid #e9ecef;
}

.circle-icon i {
    font-size: 2rem;
    color: #007bff;
}

/* New button style for finding jobs */
.btn-find-jobs {
    background-color: #2ac851;
    border-color: #2ac851;
    color: #fff;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: 50rem; /* Pill shape */
    transition: all 0.2s ease-in-out;
}

.btn-find-jobs:hover {
    background-color: #24b347;
    border-color: #22a742;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Results Page Styles */
.job-card .card {
    transition: transform 0.2s ease;
    border: 1px solid #e9ecef;
}

.job-card .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skill-tags, .keyword-tags, .matching-skills {
    display: flex;
    flex-wrap: wrap;
}

.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Match confidence indicator */
.match-confidence {
    position: relative;
    margin-bottom: 10px;
}

.match-confidence .badge {
    font-size: 0.9rem;
    padding: 0.35em 0.65em;
}

/* Match explanations */
.match-explanations .list-group-item {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.match-explanations i {
    font-size: 0.8rem;
}

/* Skill weighting styles */
.skill-weight-1 {
    background-color: #adb5bd !important;
}

.skill-weight-2 {
    background-color: #6c757d !important;
}

.skill-weight-3 {
    background-color: #0d6efd !important;
}

.skill-weight-4 {
    background-color: #0a58ca !important;
}

.skill-weight-5 {
    background-color: #0a3f8f !important;
}

/* Job details collapsible section */
#jobDetails {
    font-size: 0.9rem;
}

/* Tooltip customization */
.tooltip {
    font-size: 0.8rem;
}

.tooltip-inner {
    max-width: 300px;
    padding: 8px 12px;
}

/* Semantic match indicator */
.matching-skills .fa-exchange-alt {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .circle-icon {
        width: 60px;
        height: 60px;
    }

    .circle-icon i {
        font-size: 1.5rem;
    }

    .match-explanations ul {
        padding-left: 0;
    }

    .match-explanations li {
        font-size: 0.8rem;
    }
}


/*New Style*/
.badge.bg-info {
    background-color: #e9ecef !important;
    color: #495057 !important;
    font-weight: 500;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.match-confidence .badge {
    font-size: 0.9rem;
    padding: 0.35em 0.65em;
    background: #2ac851 !important;
    font-weight: 400;
}

body {
    background: #ECF6FF;
    background: linear-gradient(180deg, rgba(236, 246, 255, 1) 0%, rgba(236, 246, 255, 1) 25%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 1) 60%, rgba(236, 246, 255, 1) 100%);
}

.circle-icon.mb-3.cvicon {
    background: #dbe8f9;
    border-color:#dbe8f9;
}

.circle-icon.mb-3.skillicon i {
    color: #9f56ff;
}
.circle-icon.mb-3.skillicon {
    background: #f2e9fe;
    border-color:#f2e9fe;
}

.circle-icon.mb-3.jobicon i {
    color: #009b82;
}
.circle-icon.mb-3.jobicon {
    background: #cef9f2;
    border-color:#cef9f2;
}

.pageHeader {
    padding-top: 55px;
    padding-bottom: 10px;
}

.pageHeader.Processingheader {
    margin-bottom: 20px;
}

.progressing-row .card {
    border-radius: 12px !important;
}
/* --- Styles for the multi-step processing UI --- */
.processing-steps {
    list-style: none;
    padding-left: 0;
    text-align: left;
    max-width: 450px;
    margin: 1rem auto 0; /* Reduced top margin */
}

.processing-step {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    opacity: 0.4;
    transition: opacity 0.4s ease-in-out, background-color 0.4s ease-in-out;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.processing-step.active {
    opacity: 1;
    font-weight: 500;
    background-color: #f0f2f4;
}

.processing-step .icon {
    width: 30px;
    height: 30px;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.processing-step .spinner-border {
    width: 1.25rem;
    height: 1.25rem;
}

.Resultsrow .card-header.bg-success.text-white h3 ,.row.Resultsrow .card-header.bg-primary.text-white h3 {
    font-size: 18px;
    font-weight: 400;
}
.Resultsrow .card-header.bg-success.text-white {
    background: #2ac851 !important;
}
.Resultsrow .badge.bg-primary.text-white.mb-1.me-1, .skill-tags.mb-4 span.badge.bg-secondary.text-white.mb-1.me-1 {
    border: 1px solid #6e9ce1 !important;
    border-radius: 50px;
    background: #d8e5f5 !important;
    color: #034fbf !important;
    font-size: 11px;
}
.Resultsrow h5.mb-3 {
    font-size: 17px;
    font-weight: 400;
}
ul.list-group.mb-4 li {
    border: 0px !important;
    padding: 0px !important;
    font-size: 14px !important;
    padding-bottom: 6px !important;
}

ul.list-group.mb-4 {
    border-bottom: none;
    border-radius: 0px !important;
    padding-bottom: 8px;
    margin-bottom: 17px !important;
}
.match-explanations .list-group-item {
    padding: 0.5rem 1rem;
    font-size: 14px !important;
    background: transparent !important;
    border: 0px;
    padding: 0px;
    line-height: normal;
}
.Resultsrow h5.mb-2 ,.matching-skills.mb-3 h6{
    font-size: 17px;
    font-weight: 400;
}
.job-card.mb-4 p.card-text {
    font-size: 16px !important;
    line-height: normal;
    font-size: 15px !important;
}
.job-card.mb-4 h4.card-title.mb-0 {
    font-size: 20px !important;
    font-weight: 400;
}
.action-buttons {
    display: flex;
}
.action-buttons button i {
    font-size: 12px;
}
.action-buttons button {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #9797a5;
    color: #2b2a2a;
    font-size: 14px;
    line-height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}
button.btn.btn-sm.btn-outline-primary.ms-2 {
    background: #1068DE;
    color: #fff;
}

.job-card .card {
    transition: transform 0.2s ease;
    border: 0px !important;
    border-radius: 0px !important;
    padding: 0px !important;
    box-shadow: none !important;
    transform: unset !important;
}

.job-card.mb-4 .card-body {
    padding: 0;
    box-shadow: none !important;
    transform: unset !important;
}

.job-card.mb-4 {
    border-bottom: 4px solid #ddd;
    padding-bottom: 25px;
    transform: unset !important;
}
.job-card.mb-4 p.card-text {
    font-size: 16px !important;
    line-height: normal;
    font-size: 15px !important;
    color: hsl(0deg 0% 41.88%);
}

.job-card.mb-4 .mt-3 .card.card-body.bg-light {
    border-radius: 8px !important;
    padding: 15px !important;
    background: #f8f9fa !important;
    font-size: 14px !important;
}

.matching-skills > div {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

.pageHeader, .Processingheader {
    position: relative;
    padding-top: 20px;
    padding-bottom: 20px;
}

.location-selector-wrapper {
    width: auto;
    min-width: 180px;
}

@media screen and (max-width: 767px) {
    form#upload-form {
        max-width: 90%;
    }
    
    .card.mt-4.shadow.how-it-works .row .col-md-4.text-center.mb-3 {
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .card.mt-4.shadow.how-it-works .row {
        flex-direction: column;
        align-items: center;
    }
    
    .card.mt-4.shadow.how-it-works .row {
    max-width: 100%;
    margin: 0 auto;
    margin-bottom: 25px;
}
.card.mt-4.shadow.how-it-works .row .col-md-4.text-center.mb-3 {
    max-width: 100%;
    margin-bottom: 20px;
    margin: 0;
}
.card.mt-4.shadow.how-it-works .row .col-md-4.text-center.mb-3 p {
    font-size: 14px;
}
.card.mt-4.shadow.how-it-works h3.card-title.mb-0 {
    font-size: 20px;
    margin-bottom: 25px !important;
    margin-top: 20px;
}
.pageHeader h5 {
    font-size: 15px;
}
div#upload-area h4 {
    font-size: 18px;
}
div#upload-area {
    padding: 25px !important;
}
div#upload-area h5 {
    font-size: 14px;
}
div#upload-area small.text-muted {
    font-size: 14px;
}
.progressing-row .card.shadow {
    max-width: 100%;
    border-radius: 6px !important;
}
.pageHeader {
    padding-top: 35px;
}
.progressing-row h4.mb-3 {
    font-size: 16px;
}
.progressing-row .text-muted {
    font-size: 14px !important;
}
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.action-buttons button {
    margin: 0px !important;
}
}

/* --- Results Page Redesign --- */

/* Add a pointer cursor to show the card body is clickable */
.card-body-clickable {
    cursor: pointer;
}

.analysis-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
}
.results-page-container .job-card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}
.results-page-container .job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}
.results-page-container .job-card .card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.results-page-container .job-card .job-title {
    font-weight: 600;
    color: #212529;
    font-size: 1.1rem;
}
.results-page-container .confidence-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4em 0.8em;
    border-radius: 50rem;
    color: #fff;
    flex-shrink: 0;
    margin-left: 1rem;
}
.results-page-container .job-description-preview {
    font-size: 0.9rem;
    color: #212529;
    margin-top: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    height: calc(1.5 * 0.9rem * 3);
}
.results-page-container .card-footer {
    background-color: transparent;
    border-top: none;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.results-page-container .card-footer .btn {
    border-radius: 8px;
    font-weight: 500;
}
.results-page-container .card-footer .btn-primary.details-btn .fa-chevron-down {
    transition: transform 0.3s ease;
}
.results-page-container .card-footer .btn-primary.details-btn[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}
.results-page-container .matching-skills h6 {
    color: #212529;
}
.job-details-collapse {
    padding: 1.25rem;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    font-size: 0.9rem;
}

/* --- Explicit Section Spacing --- */

.salary-details-section {
    margin-bottom: 2.0rem;
}

.match-explanations {
    margin-bottom: 1.5rem;
}

.training-recommendations {
    margin-bottom: 1.5rem;
}
.job-details-collapse h6 {
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #343a40;
}
.job-details-collapse .list-group-item {
    padding: 0.5rem 0;
    background-color: transparent;
    border: none;
}
/* Reset bottom margin on the last element within each section to prevent double-spacing */
.salary-details-section .row,
.match-explanations .list-group,
.training-recommendations .list-group {
    margin-bottom: 0;
}

/* --- Dynamic Match Percentage Badge Styles --- */

/* Excellent Match (> 85%): */
.results-page-container .confidence-badge.badge-match-excellent {
    background-color: #d1e7dd !important; /* Light green */
    color: #0a3622 !important;            /* Dark green text */
}

/* Good Match (70-84%): */
.results-page-container .confidence-badge.badge-match-good {
    background-color: #cfe2ff !important; /* Light blue */
    color: #052c65 !important;            /* Dark blue text */
}

/* Fair Match (50-69%): */
.results-page-container .confidence-badge.badge-match-fair {
    background-color: #fff3cd !important; /* Light yellow */
    color: #664d03 !important;            /* Dark yellow text */
}

/* Low Match (< 50%): */
.results-page-container .confidence-badge.badge-match-low {
    background-color: #e9ecef !important; /* Light gray */
    color: #495057 !important;            /* Dark gray text */
}

.results-page-container .card-footer .btn.save-job-btn {
    color: #212529;
    border-color: #ced4da;
}
.results-page-container .card-footer .btn.save-job-btn:hover {
    background-color: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
}

.results-page-container .card-footer .btn.save-job-btn.saved {
    background-color: #d1e7dd !important;
    color: #0a3622 !important;
    border-color: #a3cfbb !important;
    cursor: default;
}

.results-page-container .card-footer .btn.save-job-btn.saved:hover {
    background-color: #d1e7dd !important;
    color: #0a3622 !important;
    border-color: #a3cfbb !important;
}

/* --- Save Job Email Form --- */
.save-job-wrapper .email-capture-form .input-group {
    max-width: 700px;
    border-radius: 50rem; /* Pill shape for the whole group */
    border: 1px solid #dee2e6;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    overflow: hidden;
}

.save-job-wrapper .email-capture-form .input-group:hover,
.save-job-wrapper .email-capture-form .input-group:focus-within {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.save-job-wrapper .email-capture-form .input-group > .form-control,
.save-job-wrapper .email-capture-form .input-group > .btn {
    border: none;
}

.save-job-wrapper .email-capture-form .input-group > .form-control:focus {
    box-shadow: none;
    z-index: 2;
}

/* --- Job Details Button Alignment & Style --- */

.job-details-collapse .button-container {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}
.job-details-collapse .button-container .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}
.job-details-collapse .button-container .btn-outline-secondary {
    color: #212529;
    border-color: #ced4da;
}
.job-details-collapse .button-container .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: #212529;
}

/* --- CV Analysis Sidebar Style --- */

/* Add a colored top border to make the sidebar stand out */
.cv-analysis-card {
    border-top: 4px solid #0d6efd;
    border-radius: 12px !important;
}

/* --- Location Dropdown --- */

.location-dropdown-btn {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    color: #212529;
    font-weight: 500;
    border-radius: 50rem; /* Pill shape */
    padding: 0.5rem 1rem;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
}
.location-dropdown-btn:hover,
.location-dropdown-btn:focus,
.location-dropdown-btn.show {
    background-color: #ffffff;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.location-dropdown-btn .fa-map-marker-alt {
    color: #0d6efd;
}
.location-dropdown-btn::after {
    display: none;
}
.location-selector-wrapper .dropdown-menu {
    border-radius: 10px;
    border: 1px solid #e9ecef;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
}
.location-selector-wrapper .dropdown-item {
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    color: #495057;
}
.location-selector-wrapper .dropdown-item:hover,
.location-selector-wrapper .dropdown-item:focus {
    background-color: #f0f2f4;
    color: #212529;
}

/* --- Job Search Bar --- */

.search-bar-wrapper {
    position: relative;
}
.search-bar-wrapper .search-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #0d6efd;
    pointer-events: none;
}
.search-bar-wrapper .form-control {
    padding-left: 2.75rem;
    border-radius: 50rem; /* Pill shape */
    height: 48px;
    border: 1px solid #dee2e6;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.search-bar-wrapper .form-control:hover,
.search-bar-wrapper .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* --- Salary Display Styles --- */

.salary-preview {
    font-size: 0.9rem;
    margin-top: -1.2rem;
    margin-bottom: 0.75rem;
}
.salary-details-section h6 {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    color: #343a40;
}
.salary-item {
    background-color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #0d6efd;
    height: 100%;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.salary-item:hover {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.salary-item .salary-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.salary-item .salary-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212529;
}