/* Job Search Engine Styles */
#jse-search-form {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#jse-search {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
}

.jse-form-group {
    flex: 1;
    min-width: 120px;
    position: relative;
}

#jse-search input,
#jse-search select,
#jse-search button {
    width: 100%;
    padding: 8px; /* Removed extra left padding for icons */
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.3s ease;
    height: 40px; /* Consistent height for all elements */
    box-sizing: border-box;
}

#jse-search input:focus,
#jse-search select:focus {
    outline: none;
    border-color: #1e3a8a;
}

#jse-search button {
    background-color: #1e3a8a;
    color: white;
    border: none;
    cursor: pointer;
    padding: 8px 24px;
    transition: background-color 0.3s ease;
    flex: 0 0 auto; /* Prevent button from stretching */
    min-width: 100px; /* Consistent button width */
}

#jse-search button:hover {
    background-color: #1e40af;
}

#jse-results.data-adsense {
    max-width: 1000px;
    margin: 16px auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    overflow-y: auto;
}

.jse-job-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 10px 36px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jse-job-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.jse-job-card h3 {
    margin: 0 0 2px;
    font-size: 1.4em;
    color: #1f2937;
    font-weight: 700;
}

.jse-posted {
    margin: 2px 0;
    font-size: 0.75em;
    color: #6b7280;
}

.jse-job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 2px 0;
}

.jse-tag {
    display: inline-block;
    padding: 3px 6px;
    font-size: 0.65em;
    border-radius: 16px;
    transition: none;
    color: #1f2937;
}

.jse-company {
    background-color: #bae6fd; /* Light blue pastel */
    color: #075985; /* Darker blue for contrast */
    order: 1;
}

.jse-city {
    background-color: #d1fae5; /* Light green pastel */
    color: #065f46; /* Darker green for contrast */
    order: 2;
}

.jse-salary {
    background-color: #fefcbf; /* Light yellow pastel */
    color: #a16207; /* Darker yellow for contrast */
    order: 3;
}

.jse-work-schedule {
    background-color: #e9d5ff; /* Light purple pastel */
    color: #6b21a8; /* Darker purple for contrast */
    order: 4;
}

.jse-excerpt {
    margin: 2px 0;
    font-size: 0.8em;
    color: #4b5563;
}

.jse-view-button {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 6px 12px;
    background-color: #1e3a8a;
    color: white;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 0.85em;
    transition: background-color 0.3s ease;
    min-width: 44px;
    text-align: center;
}

.jse-view-button:hover,
.jse-view-button:active,
.jse-view-button:focus {
    background-color: #1e40af;
    text-decoration: none !important;
}

.jse-no-jobs {
    max-width: 400px;
    margin: 16px auto;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.jse-no-jobs p {
    margin: 0;
    font-size: 1em;
    color: #4b5563;
}

/* Single Job Page Styles */
.jse-job-details {
    max-width: 800px;
    margin: 10px auto 20px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.jse-job-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 8px;
}

.jse-job-details li {
    padding: 6px 0;
    font-size: 0.9em;
    color: #4b5563;
    line-height: 1.4;
    border-bottom: none;
}

.jse-job-details li strong {
    color: #1f2937;
    font-weight: 600;
    font-size: 0.95em;
}

.jse-job-details li span {
    text-align: left;
}

/* Desktop and iPad */
@media (min-width: 600px) {
    #jse-results {
        grid-template-columns: repeat(2, 1fr);
    }
    .jse-job-tags {
        gap: 6px; /* Ensure consistent spacing */
    }
}

/* Mobile */
@media (max-width: 599px) {
    #jse-results {
        grid-template-columns: 1fr;
    }
    #jse-search {
        flex-direction: column;
        flex-wrap: wrap;
    }
    #jse-search input,
    #jse-search select,
    #jse-search button {
        width: 100%;
        padding: 8px;
        height: 40px;
    }
    #jse-search button {
        padding: 8px;
        min-width: 100%;
    }
    .jse-form-group {
        width: 100%;
    }
    .jse-job-details ul {
        grid-template-columns: 1fr;
    }
    .jse-job-details li strong,
    .jse-job-details li span {
        display: block;
        text-align: left;
    }
    .jse-job-tags {
        flex-wrap: wrap;
        gap: 4px; /* Slightly reduced gap for mobile */
    }
    .jse-job-card {
        padding-bottom: 44px; /* Extra padding for button on mobile */
    }
}