/* ============================================
   JOB VACANCIES - TABLE VIEW
   ============================================ */

/* Main wrapper - constrains all content */
.job-vacancies-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Heading */
.job-vacancies-heading-wrapper {
    text-align: center;
    margin-bottom: 30px;
}

.job-vacancies-heading {
    margin: 0;
    font-size: 1.8rem;
}

/* Job Table Wrapper - PREVENTS OVERFLOW */
.job-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Search and Filter Bar */
.job-search-filter-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.job-search-input,
.job-filter-select {
    padding: 12px 20px !important;
    border: 1px solid #ddd !important;
    border-radius: 5px !important;
    font-size: 14px !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
    /* FIX THE HEIGHT ISSUE */
    height: auto !important;
    min-height: 44px !important;
    max-height: 48px !important;
    line-height: normal !important;
}

.job-search-input {
    flex: 1 1 250px;
    min-width: 0;
    max-width: 350px;
}

.job-filter-select {
    flex: 0 0 auto;
    width: auto;
    min-width: 180px;
    max-width: 250px;
    cursor: pointer;
}

/* Job Table Container */
.job-table-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-width: 0;
}

.job-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    padding: 20px;
    background-color: #ffffff;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.job-table-row:nth-child(even) {
    background-color: #f5f5f5;
}

.job-table-row:hover {
    background-color: #e8e8e8;
}

.job-table-cell {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-title-cell {
    font-weight: 600;
    color: #000;
    font-size: 16px;
}

.job-date-cell,
.job-location-cell,
.job-type-cell {
    color: #666;
    font-size: 14px;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .job-vacancies-wrapper {
        padding: 0 15px;
    }
    
    .job-search-filter-bar {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .job-search-input,
    .job-filter-select {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
    }
    
    .job-table-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 15px;
    }
    
    .job-vacancies-heading {
        font-size: 1.4rem;
    }
}

/* HR Job CRUD Styling */
.hr-job-crud-header {
    margin-bottom: 20px;
}

.hr-job-crud-title {
    margin: 0 0 20px 0;
    font-size: 1.8rem;
    text-align: center;
}

.hr-job-crud-header-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.hr-job-search-bar {
    margin-bottom: 30px;
}

.hr-job-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.hr-job-search-input {
    flex: 0 0 auto;
    width: 350px;
    max-width: 350px;
}

/* Table Styling */
.hr-job-crud-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-bottom: 20px;
}

.hr-job-crud-table thead {
    background-color: #f5f5f5;
}

.hr-job-crud-table th,
.hr-job-crud-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.hr-job-crud-table th {
    font-weight: 600;
    color: #333;
}

.hr-job-crud-table tbody tr:hover {
    background-color: #f9f9f9;
}

.hr-job-status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.hr-job-status-pill--active {
    background-color: #28a745;
    color: #ffffff;
}

.hr-job-status-pill--inactive {
    background-color: #dc3545;
    color: #ffffff;
}

.hr-job-crud-actions-cell {
    white-space: nowrap;
}

/* Pagination */
.hr-job-crud-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.hr-job-crud-pagination-info {
    color: #666;
    font-size: 14px;
}

.hr-job-crud-pagination .button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .job-vacancies-wrapper {
        padding: 0 10px;
    }
    
    .job-search-input,
    .job-filter-select {
        padding: 10px 15px !important;
        font-size: 13px !important;
        min-height: 40px !important;
    }
    
    .job-vacancies-heading {
        font-size: 1.2rem;
    }
    
    .job-table-row {
        padding: 12px;
    }
}
/* Job Table Wrapper - PREVENTS OVERFLOW */
.job-table-wrapper {
    width: 100%;
    overflow-x: auto; /* Allow horizontal scroll on very small screens */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Job Table Container */
.job-table-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-width: 0; /* Allow shrinking */
}

.job-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    padding: 20px;
    background-color: #ffffff;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    min-width: 0; /* Allow grid items to shrink */
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .job-vacancies-wrapper {
        padding: 0 10px;
    }
    
    .job-search-input,
    .job-filter-select {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .job-vacancies-heading {
        font-size: 1.2rem;
    }
    
    .job-table-row {
        padding: 12px;
    }
}

/* ============================================
   JOB DETAIL PAGE - RIOT GAMES INSPIRED
   ============================================ */

.job-detail {
    background-color: #f8f9fa;
    min-height: 100vh;
    padding: 60px 20px;
}

.job-detail-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 60px;
}

/* Title Section */
.job-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.job-detail-date {
    font-size: 0.95rem;
    color: #666;
    margin: 0 0 40px 0;
    font-weight: 400;
}

.job-detail-date strong {
    font-weight: 600;
    color: #333;
}

/* Section Styling */
.job-detail-section {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e5e5e5;
}

.job-detail-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.job-detail-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 20px 0;
    letter-spacing: -0.01em;
}

.job-detail-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
    margin: 0 0 16px 0;
}

.job-detail-section p:last-child {
    margin-bottom: 0;
}

/* Lists within sections */
.job-detail-section ul,
.job-detail-section ol {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.job-detail-section li {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 12px;
}

.job-detail-section li:last-child {
    margin-bottom: 0;
}

/* Back Button */
.back-button {
    display: inline-block;
    margin-top: 40px;
    padding: 14px 32px;
    background-color: #111;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 2px solid #111;
    text-align: center;
}

.back-button:hover {
    background-color: #333;
    border-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-button:active {
    transform: translateY(0);
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .job-detail {
        padding: 40px 15px;
    }
    
    .job-detail-container {
        padding: 40px 30px;
    }
    
    .job-detail-title {
        font-size: 2rem;
    }
    
    .job-detail-section h2 {
        font-size: 1.3rem;
    }
    
    .job-detail-section {
        margin-bottom: 36px;
        padding-bottom: 24px;
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .job-detail {
        padding: 30px 10px;
    }
    
    .job-detail-container {
        padding: 30px 20px;
        border-radius: 4px;
    }
    
    .job-detail-title {
        font-size: 1.6rem;
    }
    
    .job-detail-date {
        font-size: 0.9rem;
        margin-bottom: 30px;
    }
    
    .job-detail-section h2 {
        font-size: 1.2rem;
        margin-bottom: 16px;
    }
    
    .job-detail-section p,
    .job-detail-section li {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .job-detail-section {
        margin-bottom: 32px;
        padding-bottom: 20px;
    }
    
    .back-button {
        width: 100%;
        margin-top: 30px;
        padding: 12px 24px;
    }
}
