/*
Plugin Name: HRC Jobs
Description: Styles for the frontend job listings.
*/

#hrc-jobs-lister-app {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hrc-jobs-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #e8eef2;
    border-radius: 5px;
    align-items: center;
}

.hrc-jobs-filters-container input[type="text"],
.hrc-jobs-filters-container select {
    flex: 1; /* Allows elements to grow and shrink */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 150px; /* Ensure a minimum width for readability */
}

.hrc-jobs-filters-container button {
    padding: 10px 15px;
    background-color: #89bfe7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.hrc-jobs-filters-container button:hover {
    background-color: #f07522;
}

.hrc-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.hrc-job-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hrc-job-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.hrc-job-title {
    font-size: 1.1em;
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
}

.hrc-job-location, .hrc-job-department {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 5px;
}

.hrc-job-description {
    font-size: 0.8em;
    color: #666;
    line-height: 1.5;
    margin-bottom: 5px;
    flex-grow: 1; /* Allows description to take available space */
}

.hrc-job-apply-button {
    display: inline-block;
    background: linear-gradient(125deg, #89bfe7, #f07522);
    color: white;
    padding: 5px 20px;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s ease;
    align-self: flex-start; /* Align button to start within the flex container */
}

.hrc-job-apply-button:hover {
    background-color: #f07522;
}

#hrc-jobs-loading-indicator, #hrc-jobs-no-results {
    text-align: center;
    padding: 20px;
    font-size: 1.1em;
    color: #555;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hrc-jobs-filters-container {
        flex-direction: column;
        align-items: stretch;
    }

    .hrc-jobs-filters-container input[type="text"],
    .hrc-jobs-filters-container select,
    .hrc-jobs-filters-container button {
        width: 100%;
        margin-right: 0;
    }

    .hrc-jobs-grid {
        grid-template-columns: 1fr; /* Single column on small screens */
    }
}
