/**
 * candidate-filter.css
 * Cariera Candidate Filter CSS
 * Modern UI styling for candidate filters - because candidates deserve love too
 */

/* Main container */
.candidate-sidebar-filter {
    background-color: #E5EFF7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    margin-bottom: 30px;
    padding: 18px;
}

/* Filter form */
.candidate-filters-sidebar {
    font-family: inherit;
    font-size: 14px;
}

h2.candidate-filter-search-title {
    color: #131927 !important;
    font-family: "GT Ultra Fine";
    font-size: 25px;
    font-style: normal;
    font-weight: 700;
    line-height: 35px;
    margin-bottom: 25px;
}

.candidate-title-search {
    background-color: white !important;
    color: #131927;
    font-family: Geist !important;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 16px !important;
}

/* Filter groups - The collapsible sections */
.candidate-filter-group:first-child {
    border-top: 1px solid #AFB9C1 !important;
}

.candidate-filter-group {
    border-bottom: 1px solid #AFB9C1;
    margin-bottom: 20px;
}

.candidate-filter-group:last-child {
    margin-bottom: 10px;
}

.candidate-filter-group {
    border-top: none;
}

.candidate-filter-group:nth-of-type(2) {
    border-top: 1px solid #AFB9C1;
    margin-top: 20px;
}

.candidate-filter-group:nth-of-type(7) {
    border-bottom: none;
}

/* Group headings - The clickable bits */
.candidate-filter-group h4 {
    color: #131927 !important;
    font-family: 'din-condensed', sans-serif !important;
    font-size: 20px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 22px;
    text-transform: uppercase !important;
    transition: color 0.2s;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 15px !important;
}

/* Filter content area - The hidden stuff */
.candidate-filter-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
    max-height: 0;
}

/* Filter options container */
.candidate-filter-options {
    padding-right: 5px;
    max-height: 200px;
    overflow-y: auto;
}

/* Scrollable filter options - For the long lists */
.candidate-filter-options.scrollable {
    max-height: 300px;
    overflow-y: auto;
}

/* Individual filter option */
.candidate-filter-option {
    margin-bottom: 8px;
    position: relative;
}

.candidate-filter-option input[type="checkbox"] {
    background: transparent;
    border-radius: 2px;
    border: 1px solid #13172C;
    width: 20px;
    height: 20px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    cursor: pointer;
    position: relative;
}

/* Checkmark styling - The fancy stuff */
.candidate-filter-option input[type="checkbox"]:checked::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 6px;
    width: 6px;
    height: 12px;
    border: solid #13172C;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.candidate-filter-option label {
    color: #13172C !important;
    font-family: Geist !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 22px;
    transition: color 0.2s;
    margin: 0;
    display: flex;
    align-items: center;
}

.candidate-filter-option input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    background-color: transparent;
}

/* Filter counts - Hidden because they're ugly */
.candidate-filter-count {
    display: none;
}

/* Filter actions - The buttons at the bottom */
.candidate-filter-actions {
    margin-top: 25px;
}

/* Submit button - The main event */
.candidate-filter-submit {
    border-radius: 5px;
    background: #13172C;
    color: #FFF;
    text-align: center;
    font-family: Geist;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 25px;
    border: none;
    cursor: pointer;
    flex: 1;
    padding: 13px 15px;
    transition: background-color 0.2s;
    width: 100%;
}

.candidate-filter-submit:hover {
    background-color: #fff;
    color: #13172C;
}

/* Clear filters button - The reset button */
button.candidate-clear-filters {
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #13172C !important;
    text-align: center !important;
    font-family: Geist !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 25px !important;
    text-decoration: underline;
    width: 100%;
}

/* Placeholder styling - Because consistency */
.candidate-title-search::placeholder {
    color: #B9B7B5 !important;
    font-family: Geist !important;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 16px;
}

.candidate-title-search::-webkit-input-placeholder {
    color: #B9B7B5 !important;
    font-family: Geist !important;
    font-size: 14px !important;
}

.candidate-title-search::-moz-placeholder {
    color: #B9B7B5 !important;
    font-family: Geist !important;
    font-size: 14px !important;
    opacity: 1;
}

.candidate-title-search:-ms-input-placeholder {
    color: #131927 !important;
    font-family: 'din-condensed', sans-serif !important;
    font-size: 14px !important;
}

/* Loading state - The spinny thing */
.resumes.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.resumes.loading:after {
    animation: candidate-spin 1s linear infinite;
    border-radius: 50%;
    border-top-color: #172b4d;
    content: '';
    height: 40px;
    left: 50%;
    margin-left: -20px;
    margin-top: -20px;
    position: absolute;
    top: 50%;
    width: 40px;
    z-index: 20;
}

@keyframes candidate-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No results message - The sad face */
.no-candidates-found {
    background-color: #f8f8f8;
    display: flex;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

li.no-candidates-found p {
    color: #172b4d;
    font-family: Geist;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 25px;
    margin: 0;
    padding: 20px 0;
}

/* Found candidates count */
.cariera-candidates-found-count {
    border: none !important;
}

.cariera-candidates-found-count p {
    display: none;
}

/* Custom scrollbar - Because default scrollbars are ugly */
.candidate-filter-options::-webkit-scrollbar {
    width: 5px;
}

.candidate-filter-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.candidate-filter-options::-webkit-scrollbar-thumb {
    background: #dfe1e6;
    border-radius: 10px;
}

.candidate-filter-options::-webkit-scrollbar-thumb:hover {
    background: #c1c7d0;
}

/* Accordion toggle styles */
.candidate-filter-toggle {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 5px;
}

.arrow {
    display: inline-flex;
    transition: transform 0.3s ease;
}

.candidate-filter-group.active .arrow .arrow-icon {
    transform: rotate(90deg);
}

/* Error message - When things go wrong */
.candidate-filter-error {
    background-color: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 4px;
    color: #c53030;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

/* Loading indicator - Full screen overlay */
.candidate-filter-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
}

.candidate-filter-loading .loading-spinner {
    border: 4px solid #CBD8E1;
    border-top: 4px solid #152A59;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: candidate-spin 1s linear infinite;
    margin-right: 10px;
}

.candidate-filter-loading p {
    margin: 0;
    font-size: 16px;
    color: #152A59;
    font-weight: 600;
    z-index: 1;
    font-family: Geist;
}

.candidate-filter-loading > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    z-index: 1;
}

/* Toast notification - The notification at the top */
.candidate-filter-toast {
    display: none;
    position: fixed;
    top: 0;
    left: 50%;
    width: 100%;
    font-family: GEIST;
    text-align: center;
    transform: translateX(-50%);
    background: #ffffff;
    color: #152A59;
    padding: 12px 20px;
    border-radius: 0;
    font-size: 16px;
    z-index: 9999;
    opacity: 0;
    animation: candidateToastFadeInOut 4s ease-in-out;
}

@keyframes candidateToastFadeInOut {
    0% { opacity: 0; transform: translate(-50%, -20px); }
    10% { opacity: 1; transform: translate(-50%, 0); }
    90% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* Input with arrow - The search box */
.input-with-arrow {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-arrow input[type="text"] {
    flex: 1;
    padding-right: 45px;
    height: 45px;
    box-sizing: border-box;
    background: white !important;
    border: none;
}

.input-with-arrow .search-arrow {
    position: absolute;
    color: #fff;
    right: 0;
    top: 0;
    height: 100%;
    width: 45px;
    background-color: #152A59;
    border: none;
    border-radius: 0 4px 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.input-with-arrow .search-arrow .arrow-icon {
    stroke: #fff;
    width: 20px;
    height: 20px;
}

/* Mobile filter toggle - For small screens */
.mobile-candidate-filter-toggle {
    display: none;
}

/* Responsive adjustments - Because mobile matters */
@media (max-width: 768px) {
    .candidate-sidebar-filter {
        display: none;
        margin-bottom: 20px;
    }

    .candidate-sidebar-filter.active {
        display: block;
        animation: candidateFadeIn 0.3s ease;
    }

    .mobile-candidate-filter-toggle {
        width: 100%;
        background-color: #152A59;
        color: white;
        border: none;
        padding: 12px 15px;
        font-family: 'din-condensed', sans-serif !important;
        font-size: 18px !important;
        text-transform: uppercase;
        text-align: center;
        cursor: pointer;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 5px;
    }

    .candidate-filter-toast {
        display: block !important;
    }

    .mobile-candidate-filter-toggle .toggle-icon {
        margin-right: 10px;
        transition: transform 0.3s ease;
    }

    .mobile-candidate-filter-toggle.active .toggle-icon {
        transform: rotate(180deg);
    }

    @keyframes candidateFadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .candidate-filter-actions {
        flex-direction: column;
    }

    .candidate-filter-submit,
    .candidate-clear-filters {
        width: 100%;
    }
}

/* Overlay spinner for filter box */
.candidate-filter-overlay-spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.candidate-filter-overlay-spinner .spinner {
    border: 4px solid #CBD8E1;
    border-top: 4px solid #152A59;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: candidate-spin 1s linear infinite;
}
/**
 * Load More button - The "give me more" button
 */
.load_more_resumes,
.load-more-candidates,
[data-load-more="candidates"] {
    display: inline-block;
    width: 100%;
    max-width: 300px;
    margin: 30px auto;
    padding: 12px 24px;
    background-color: #152A59;
    color: white;
    text-align: center;
    border: none;
    border-radius: 5px;
    font-family: Geist;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load_more_resumes:hover,
.load-more-candidates:hover,
[data-load-more="candidates"]:hover {
    background-color: #1a3570;
    transform: translateY(-2px);
}

.load_more_resumes.loading,
.load-more-candidates.loading,
[data-load-more="candidates"].loading {
    opacity: 0.6;
    cursor: wait;
    pointer-events: none;
}

.load_more_resumes.disabled,
.load-more-candidates.disabled,
[data-load-more="candidates"].disabled {
    background-color: #CBD8E1;
    color: #152A59;
    cursor: not-allowed;
}

/* Center the button container */
.load-more-container {
    text-align: center;
    margin: 30px 0;
}
