/* Global Styles */
#tcat-job-board-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    gap: 30px;
    display: flex;
    flex-wrap: wrap;
}

/* Job List and Overview Boxes */
#tcat-job-list,
#tcat-job-overview {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 20px;
    flex: 1 1 48%;
    max-height: 600px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Filters */
#tcat-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

#tcat-filter-form select,
#tcat-filter-form button {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    flex: 1 1 100px;
}

#tcat-filter-form button {
    background-color: #0073aa;
    color: white;
    border: none;
    cursor: pointer;
}

#tcat-filter-form button:hover {
    background-color: #005f8d;
}

/* Job Cards */
.tcat-job-card {
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
    margin-bottom: 15px;
    background: #fafafa;
    cursor: pointer;
}

.tcat-job-card:hover {
    border-color: #0073aa;
    background-color: #f0f8ff;
}

.tcat-job-card.selected {
    border-color: #0073aa;
    background-color: #e6f3ff;
}

/* Highlight for Closing Date */
.tcat-job-card p strong:contains("Application Closing Date") {
    display: block;
    margin-top: 10px;
    color: #c0392b;
    background: rgba(255, 230, 230, 0.6);
    padding: 5px 8px;
    border-radius: 4px;
    font-weight: bold;
}

/* Injected Overview Table */
#tcat-job-overview table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
    font-size: 14px;
}

#tcat-job-overview table td {
    padding: 8px;
    border: 1px solid #ddd;
    vertical-align: top;
}

#tcat-job-overview h2,
#tcat-job-overview h3 {
    margin-top: 20px;
}

/* Apply Button */
#tcat-job-overview .apply-now-button {
    padding: 12px 24px;
    background-color: #28a745;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
}

#tcat-job-overview .apply-now-button:hover {
    background-color: #218838;
}

/* JS-Injection highlight span */
.highlight-closing-date {
    background-color: rgba(255, 230, 230, 0.6);
    color: #c0392b;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 4px;
}

/* ============================= */
/* Responsive Design Enhancements */
/* ============================= */

@media (max-width: 1024px) {
    #tcat-job-board-wrapper {
        gap: 20px;
    }

    #tcat-job-list,
    #tcat-job-overview {
        flex: 1 1 100%;
        max-height: none;
    }
}

@media (max-width: 768px) {
    #tcat-filter-form {
        flex-direction: column;
        gap: 8px;
    }

    #tcat-filter-form select,
    #tcat-filter-form button {
        width: 100%;
    }

    .tcat-job-card h3 {
        font-size: 16px;
    }

    #tcat-job-overview table td {
        font-size: 13px;
        padding: 6px;
    }

    #tcat-job-overview .apply-now-button {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
    #tcat-job-board-wrapper {
        flex-direction: column;
    }
    .tcat-panel {
        width: 100% !important;
        max-height: none !important;
        overflow: visible !important;
    }
}

@media (max-width: 480px) {
    .tcat-job-card {
        padding: 12px;
    }

    #tcat-job-overview table td {
        font-size: 12px;
    }
}