/* Job Results Page Styles */
.job-results-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 20px 0;
}

.container {
    max-width: 1200px;
}

/* Job List Module Styles */
.job-list-module {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin: 15px 0;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.module-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.view-all-link {
    color: #004aad;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: #004aad;
    text-decoration: none;
}

.view-all-link i {
    font-size: 12px;
}

/* No Jobs */
.no-jobs {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-jobs-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 15px;
}

.no-jobs p {
    font-size: 16px;
    margin: 0;
}

/* Search Section */
.search-section {
    margin-bottom: 30px;
}

/* Jobs List */
.jobs-list {
    overflow: hidden;
}

/* Results Header */
.results-header {
    margin-bottom: 25px;
}

.results-info {
    text-align: center;
}

.results-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.search-term {
    color: #004aad;
    font-weight: 700;
}

.results-count {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Results Content */
.results-content {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Results Table */
.results-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    min-width: 800px; /* Đảm bảo table có chiều rộng tối thiểu */
}

.table-header {
    background: #fdd800;
}

.table-header th {
    padding: 15px 20px;
    font-weight: 600;
    color: #000;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
    font-size: 16px;
}

.job-info-column {
    width: 45%;
    min-width: 300px;
}

.company-column {
    width: 20%;
    min-width: 150px;
}

.update-time-column {
    width: 20%;
    min-width: 120px;
}

.action-column {
    width: 15%;
    min-width: 100px;
    text-align: center;
}

/* Job Rows */
.job-row {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

.job-row:hover {
    background-color: #f8f9fa;
}

.job-row:last-child {
    border-bottom: none;
}

.job-info-cell {
    padding: 10px;
}

.job-info {
    position: relative;
    padding-top: 0; /* Tạo không gian cho badge */
}

.job-badge {
    position: absolute;
    top: 2px;
    right: 0;
    background: #ff6b35;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    z-index: 1;
}

.job-badge i {
    font-size: 10px;
}

.job-title {
    position: relative;
    padding-right: 52px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    margin-top: 5px; /* Khoảng cách từ badge */
}

.job-salary {
    margin-bottom: 5px;
    font-size: 14px;
}

.salary-label {
    color: #666;
    margin-right: 5px;
}

.salary-value {
    color: #004aad;
    font-weight: 600;
}

.job-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.job-location i {
    color: #004aad;
    font-size: 12px;
}

.company-cell {
    padding: 10px;
    vertical-align: top;
}

.company-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
}

.update-time-cell {
    padding: 10px;
    vertical-align: top;
}

.update-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.update-time i {
    color: #ffc107;
    font-size: 12px;
}

.action-cell {
    padding: 10px;
    vertical-align: top;
    text-align: center;
}

.view-button {
    background: #004aad;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.view-button i {
    font-size: 0.9em;
}

.view-button:hover {
    background: #004aad;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(202, 25, 17, 0.3);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.no-results p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.no-results .btn {
    background: #004aad;
    border-color: #004aad;
    padding: 12px 24px;
    font-size: 16px;
}

.no-results .btn:hover {
    background: #004aad;
    border-color: #004aad;
}

/* Pagination */
.pagination-container {
    padding: 30px 20px;
    text-align: center;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}

.pagination {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.page-item {
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 40px;
}

.page-link:hover {
    background: #004aad;
    color: white;
    border-color: #004aad;
    text-decoration: none;
}

.page-item.active .page-link {
    background: #004aad;
    color: white;
    border-color: #004aad;
}

/* Jobs Table Container for Module */
.jobs-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.jobs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    min-width: 800px;
}

/* Responsive Design */

@media screen and (max-width: 991px) {
    .jobs-table {
        min-width: 600px;
    }

    .table-header th {
        padding: 8px 5px;
        font-size: 14px;
    }
    
    .job-info-cell,
    .company-cell,
    .update-time-cell,
    .action-cell {
        padding: 8px 5px;
    }
    .action-cell {
        min-width: 100px;
    }
    .module-title {
        font-size: 20px;
    }
    .view-all-link {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .results-title {
        font-size: 24px;
    }
    
    .results-table {
        font-size: 14px;
    }
    
    .table-header th {
        padding: 12px 10px;
        font-size: 14px;
    }
    
    .job-info-cell,
    .company-cell,
    .update-time-cell,
    .action-cell {
        padding: 15px 10px;
    }
    
    .job-title {
        font-size: 16px;
    }
    
    .company-name {
        font-size: 14px;
    }
    
    .view-button {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    /* Điều chỉnh cột cho mobile */
    .job-info-column {
        width: 50%;
        min-width: 200px;
    }
    
    .company-column {
        width: 25%;
        min-width: 100px;
    }
    
    .update-time-column {
        width: 15%;
        min-width: 80px;
    }
    
    .action-column {
        width: 10%;
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .job-results-page {
        padding: 10px 0;
    }
    
    .results-title {
        font-size: 20px;
    }
    
    .results-count {
        font-size: 14px;
    }
    
    .table-header th {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .job-info-cell,
    .company-cell,
    .update-time-cell,
    .action-cell {
        padding: 8px 5px;
    }
    
    .job-title {
        font-size: 14px;
    }
    
    .job-salary,
    .job-location,
    .update-time {
        font-size: 14px;
    }
    
    .company-name {
        font-size: 14px;
    }
    
    .view-button {
        padding: 5px 10px;
        font-size: 14px;
    }
    
    .pagination {
        gap: 3px;
    }
    
    .page-link {
        padding: 8px 12px;
        min-width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* Favorite Button Styles trong danh sách jobs - Đồng bộ với trang chi tiết */
.favorite-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    border: 1px solid #dc3545;
    background-color: white;
    color: #dc3545;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-weight: 500;
}

.favorite-btn:hover {
    background-color: #f8f9fa;
    border-color: #c82333;
    color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.favorite-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(220, 53, 69, 0.2);
}

.favorite-btn.active {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.favorite-btn.active:hover {
    background-color: #c82333;
    border-color: #c82333;
    color: white;
}

.favorite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.favorite-btn i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.favorite-btn:hover i {
    transform: scale(1.1);
}

.favorite-btn.active i {
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1);
    }
    75% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.favorite-text {
    font-weight: 500;
}

.favorite-count {
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: normal;
}

/* Favorite Button trong action cell */
.action-cell .favorite-btn {
    width: 100%;
    min-width: 120px;
    justify-content: center;
}

/* Action cell styling */
.action-cell {
    white-space: nowrap;
    vertical-align: middle;
}

.action-cell .d-flex {
    gap: 8px;
}

.action-cell .d-flex.flex-column {
    gap: 10px;
}

.action-cell .view-button {
    display: block;
    width: 100%;
    text-align: center;
    min-width: 120px;
}

/* Responsive */
@media (max-width: 768px) {
    .action-cell .favorite-btn {
        min-width: 100px;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .action-cell .view-button {
        min-width: 100px;
    }
}