/**
 * Cariera Sidebar Filter CSS
 * Modern UI styling for PGA job filters with scrollable options
 */

/* Main container */
.cariera-sidebar-filter {
    background-color: #E5EFF7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    margin-bottom: 30px;
    padding: 18px;
}

/* Filter form */
.job-filters-sidebar {
    font-family: inherit;
    font-size: 14px;
}
h2.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;
}
.job-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 */
.filter-group:first-child {
    border-top: 1px solid #AFB9C1 !important;
}

.filter-group {
    border-bottom: 1px solid #AFB9C1;
    margin-bottom: 20px;
}

.filter-group:last-child {
    margin-bottom: 10px;
}

.filter-group {
    border-top: none;
}
.filter-group:nth-of-type(2) {
    border-top: 1px solid #AFB9C1;
    margin-top: 20px;
}
.filter-group:nth-of-type(9) {
    border-bottom: none;
}


/* Group headings */
.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 */
.filter-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
    max-height: 0;
}

/* Filter options container */
.filter-options {
    padding-right: 5px;
    max-height: 200px;
    overflow-y: auto;
}

/* Make certain filter option groups scrollable */
.filter-options.scrollable {
    max-height: 300px;
    overflow-y: auto;
}

/* Individual filter option */
.filter-option {
    margin-bottom: 8px;
    position: relative;
}

.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;
}

/* Optional: Add checkmark styling when checked */
.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);
}


.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;
}

.filter-option input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    background-color: transparent;
}

/* Parent and child option styling */
.filter-option.parent-option {
    font-weight: bold;
    padding: 5px 0;
    position: relative;
}

.filter-option.child-option {
    padding-left: 15px;
}

.filter-option.child-option label {
    font-size: 11px !important;
    font-family: 'GEIST', sans-serif !important;
    text-transform: unset !important;
}

/* Filter counts */
.filter-count {
    /*background-color: #CBD8E1;*/
    /*font-family: 'din-condensed', sans-serif !important;*/
    /*color: #13172b;*/
    /*font-size: 14px;*/
    /*font-weight: 500;*/
    /*margin-left: auto;*/
    /*padding: 0px 10px;*/
    display: none;
}

/* Filter actions */
.filter-actions {
    margin-top: 25px;
}

/* Buttons */
.filter-jobs {
    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%;
}

.filter-jobs:hover {
    background-color: #fff;
    color: #13172C;
}

button.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%;
}
.job-title-search::placeholder {
    color: #B9B7B5; !important;
    font-family: Geist !important;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 16px;
}

/* For WebKit browsers (Safari, Chrome) */
.job-title-search::-webkit-input-placeholder {
    color: #B9B7B5 !important;
    font-family: Geist !important;
    font-size: 14px !important;
    font-style: normal;
    font-weight: 400;
    line-height: 16px;
}

/* For Firefox */
.job-title-search::-moz-placeholder {
    color: #B9B7B5 !important;
    font-family: Geist !important;
    font-size: 14px !important;
    font-style: normal;
    font-weight: 400;
    line-height: 16px;
    opacity: 1;
}

/* For IE/Edge (legacy) */
.job-title-search:-ms-input-placeholder {
    color: #131927 !important;
    font-family: 'din-condensed', sans-serif !important;
    font-size: 14px !important;
    font-style: normal;
    font-weight: 700;
    line-height: 16px;
    text-transform: uppercase;
}

.clear-filters:hover {
    background-color: #f5f7fa;
    color: #333;
}

/* Loading state */
.job_listings.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.job_listings.loading:after {
    animation: 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 spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No results message */
.no-jobs-found {
    background-color: #f8f8f8;
    display: flex;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

/* Found jobs count */
.cariera-jobs-found-count {
   border: none !important;
}

.cariera-jobs-found-count p {
    /*color: #172b4d !important;*/
    /*font-family: "GT Ultra Fine" !important;*/
    /*font-size: 25px !important;*/
    /*font-style: normal !important;*/
    /*font-weight: 400 !important;*/
    /*line-height: 35px !important;*/
    /*margin-bottom: 10px !important;*/
    /*text-transform: none !important;*/
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-actions {
        flex-direction: column;
    }

    .filter-jobs, .clear-filters {
        width: 100%;
    }
}

/* Custom scrollbar for filter options */
.filter-options::-webkit-scrollbar {
    width: 5px;
}

.filter-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.filter-options::-webkit-scrollbar-thumb {
    background: #dfe1e6;
    border-radius: 10px;
}

.filter-options::-webkit-scrollbar-thumb:hover {
    background: #c1c7d0;
}

/* Accordion toggle styles */
.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;
}

.filter-group.active .arrow .arrow-icon {
    transform: rotate(90deg);
}



/* Error message */
.cariera-filter-error {
    background-color: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 4px;
    color: #c53030;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

/* Fade transitions */
.job_listings.loading {
    opacity: 0.7;
    pointer-events: none;
}
li.no-jobs-found p {
    color: #172b4d;
    font-family: Geist;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 25px;
    margin: 0;
    padding: 20px 0;
}

/* Mobile filter toggle button - Add to your CSS file */

/* Hide the filter toggle button on desktop */
.mobile-filter-toggle {
    display: none;
}

/* Mobile styles */
@media (max-width: 768px) {
    /* Hide the filter container by default on mobile */
    .cariera-sidebar-filter {
        display: none;
        margin-bottom: 20px;
    }

    /* Show the filter container when it has the 'active' class */
    .cariera-sidebar-filter.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    /* Style the mobile filter toggle button */
    .mobile-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;
    }

    .filter-toast {
        display: block !important;
    }

    /* Toggle button icon */
    .mobile-filter-toggle .toggle-icon {
        margin-right: 10px;
        transition: transform 0.3s ease;
    }

    /* Rotate icon when filters are showing */
    .mobile-filter-toggle.active .toggle-icon {
        transform: rotate(180deg);
    }

    /* Fade-in animation */
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}
.job-labels {
    right: 65px;
    position: absolute;
    z-index: 10;
    top: 35px;
}
.new-badge {
    color: #FFF;
    font-family: 'din-condensed', sans-serif !important;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px; /* 110% */
    text-transform: uppercase;
    background: #152A59;
    padding: 7px 13px;
}

/* Spinner overlay for filter box */
.cariera-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);
}

.cariera-filter-loading .loading-spinner {
    border: 4px solid #CBD8E1;
    border-top: 4px solid #152A59;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

.cariera-filter-loading p {
    margin: 0;
    font-size: 16px;
    color: #152A59;
    font-weight: 600;
    z-index: 1;
    font-family: Geist;
}

/* Optional container for spinner + text */
.cariera-filter-loading > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent; /* avoids blur */
    z-index: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Toast notification */
.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: toastFadeInOut 4s ease-in-out;
}

@keyframes toastFadeInOut {
    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 {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-arrow input[type="text"] {
    flex: 1;
    padding-right: 45px; /* give room for the arrow */
    height: 45px; /* or auto if your input has flexible height */
    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;
}
