/* Modern Jobs Listing Styles - Horizontal Filter Bar */

/* Search Section */
.search-section {
    margin-bottom: 20px;
}

.search-form {
    max-width: 800px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>');
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1; /* Ensure icon stays above the text */
    pointer-events: none; /* Let clicks pass through to the input */
}

/* More specific selector to override default input styles */
.search-input-wrapper input[type="text"].search-input {
    flex: 1;
    height: 50px;
    padding: 10px 120px 10px 46px;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.search-button {
    position: absolute;
    right: 5px;
    height: 40px;
    padding: 0 20px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-button:hover {
    background-color: #005a87;
}

/* Filter Bar */
.filter-bar {
    background-color: white;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.filter-chip.active {
    background-color: #e6f2ff;
    border-color: #0073aa;
}

.chip-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s;
}

.filter-chip.active .dropdown-icon {
    transform: rotate(180deg);
}

/* Filter Dropdown */
.filter-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    min-width: 280px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.filter-chip.active .filter-dropdown {
    display: block;
    animation: fadeIn 0.2s;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.dropdown-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

/* Add this to your govjobs-public.css file */
.close-dropdown {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 8px;  /* Increased padding for better touch area */
    width: 36px;   /* Increased width */
    height: 36px;  /* Increased height */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
    z-index: 1010; /* Higher z-index to ensure it's clickable */
}

.close-dropdown:hover {
    color: #333;
}

.dropdown-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 12px 0;
}

.hidden-select {
    display: none;
}

.dropdown-options {
    display: flex;
    flex-direction: column;
}

.dropdown-option {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dropdown-option:hover {
    background-color: #f5f5f5;
}

.dropdown-option input[type="radio"] {
    margin-right: 10px;
}

/* Reset All Button */
.reset-all-wrapper {
    margin-left: auto;
}

.reset-all-button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-all-button:hover {
    background-color: #e1e1e1;
    color: #333;
}

.reset-icon {
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"></path><path d="M3 3v5h5"></path></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

/* Active Filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.active-filter {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background-color: #e6f2ff;
    border-radius: 4px;
    font-size: 13px;
}

.filter-category {
    font-weight: 600;
    color: #0073aa;
}

.filter-value {
    color: #333;
}

/* Fix for X icon hover */
.remove-filter {
    width: 16px;
    height: 16px;
    background: none;
    border: none;
    padding: 0;
    margin-left: 3px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.remove-filter:hover {
    color: #333;
    background-color: rgba(0, 0, 0, 0.05); /* Light gray background on hover */
}

/* Jobs Count */
.jobs-count {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
}

/* Hidden Form */
.hidden-form {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modern Jobs Grid Styles - UPDATED FOR CLICKABLE CARDS */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Fixed job card structure with visible icons */
.job-card {
    position: relative;
    height: 100%;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.job-card.urgent {
    border-left: 4px solid #ff4b4b;
}

.job-card.expired {
    opacity: 0.7;
}

.job-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.job-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Job Card Header */
.job-card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    z-index: 2;
}

.job-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.3;
    color: #333;
}

.job-card-link:hover .job-title {
    color: #0073aa;
}

.job-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-remote {
    background-color: #4caf50;
    color: white;
}

.badge-deadline {
    background-color: #ff4b4b;
    color: white;
}

/* Job Card Body */
.job-card-body {
    padding: 15px 20px;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

.job-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.job-meta-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
    position: relative;
    z-index: 2;
    margin-bottom: 8px;
}

/* Icon styling definitions */
.meta-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    position: relative;
    z-index: 2;
}

/* Define specific icons with SVG data URLs */
.department-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>');
}

.location-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>');
}

.job-type-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path></svg>');
}

.category-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline></svg>');
}

.remote-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg>');
}

.meta-label {
    font-weight: 600;
    margin-right: 5px;
}

/* Job Card Footer */
.job-card-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Left and right sides of the footer */
.footer-left, .footer-right {
    display: flex;
    align-items: center;
}

/* This ensures the right side always stays on the right */
.footer-right {
    margin-left: auto;
}

.job-deadline {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: #666;
}

.days-left {
    font-weight: 600;
    color: #0073aa;
}

.job-deadline.expired {
    color: #999;
}

.salary-text {
    font-weight: 600;
    color: #0073aa;
    padding: 4px 8px;
    background-color: #e6f7ff;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
}

/* Loading and empty states */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    grid-column: 1 / -1;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-jobs-found {
    grid-column: 1 / -1;
    padding: 40px;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

.error-message {
    grid-column: 1 / -1;
    padding: 20px;
    text-align: center;
    background-color: #fff2f2;
    border-radius: 8px;
    color: #d63638;
}

/* Loading indicator for filters */
.filter-group select.loading {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10" stroke-dasharray="32" stroke-dashoffset="16"><animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 12 12;360 12 12" keyTimes="0;1"></animateTransform></circle></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

/* Pagination */
.jobs-pagination {
    margin: 30px 0;
    text-align: center;
}

.pagination-links {
    display: inline-flex;
    gap: 5px;
}

.page-numbers {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #0073aa;
    text-decoration: none;
    transition: background-color 0.2s;
}

.page-numbers:hover {
    background-color: #f1f1f1;
}

.page-numbers.current {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

.page-numbers.prev,
.page-numbers.next {
    padding: 8px 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-chips {
        overflow-x: auto;
        padding-bottom: 5px;
        /* flex-wrap: nowrap; */
    }
    
    .filter-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
    
    .dropdown-content {
        max-height: 50vh;
    }
    
    .jobs-grid {
        grid-template-columns: 1fr;
    }
    
    .job-card-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .footer-right {
        align-self: flex-end;
    }
	.close-dropdown {
        padding: 10px;
        width: 44px;
        height: 44px;
    }
}