/* Job Bank Styles */

/* Job Card Layout Fix */
.job-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem !important;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    transition: all 0.2s;
    margin-bottom: 1.5rem;
}

.job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.job-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.job-card-selection {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.job-card-content {
    flex: 1;
    min-width: 0; /* Prevent overflow */
}

.job-card-title {
    margin: 0 0 0.5rem 0;
    color: #007bff;
    font-size: 1.1rem;
    font-weight: 600;
    word-wrap: break-word;
}

.job-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #666;
}

.job-card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.job-card-meta-item i {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.job-card-description {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.job-card-action {
    align-self: flex-start;
    margin-top: 0.5rem;
}

.job-card-apply-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.job-card-apply-btn:hover {
    background: #218838;
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .job-card {
        padding: 0.75rem !important;
    }
    
    .job-card-title {
        font-size: 1rem;
    }
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 20px;
    flex: 1;
    min-width: 150px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-card.success .stat-value {
    color: var(--success-color, #28a745);
}

.stat-card.danger .stat-value {
    color: var(--danger-color, #dc3545);
}

.stat-card.warning .stat-value {
    color: var(--warning-color, #ffc107);
}

/* Job table styles */
.job-row {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.job-row:hover {
    background-color: var(--hover-bg, rgba(255, 255, 255, 0.02));
}

.job-row.expired {
    opacity: 0.6;
}

.job-title {
    max-width: 300px;
}

.job-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.job-link:hover {
    text-decoration: underline;
}

.job-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.job-description-preview {
    font-size: 0.8rem;
    color: var(--text-muted, #868e96);
    margin-top: 6px;
    margin-bottom: 8px;
    line-height: 1.3;
    font-style: italic;
    max-width: 100%;
    overflow: hidden;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.active {
    background: var(--success-bg, rgba(40, 167, 69, 0.1));
    color: var(--success-color, #28a745);
}

.status-badge.expired {
    background: var(--danger-bg, rgba(220, 53, 69, 0.1));
    color: var(--danger-color, #dc3545);
}

.status-badge.stale {
    background: var(--warning-bg, rgba(255, 193, 7, 0.1));
    color: var(--warning-color, #ffc107);
}

.provider-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-tertiary, #f8f9fa);
    color: var(--text-primary);
    border: 1px solid var(--border-color, #dee2e6);
}

.date-cell {
    white-space: nowrap;
}

.text-muted {
    color: var(--text-secondary);
}

.small {
    font-size: 0.85rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

/* Pagination styles */
.pagination {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.page-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    padding: 0 8px;
    color: var(--text-secondary);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Provider stats */
.provider-stat {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.provider-stat:last-child {
    border-bottom: none;
}

.provider-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.provider-counts {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.provider-counts .active {
    color: var(--success-color);
}

.last-crawled {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Selected info */
.selected-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-right: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Action buttons */
.action-button.small {
    padding: 6px 12px;
    font-size: 0.9rem;
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Debug modal */
.debug-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.debug-modal .modal-content {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 30px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.debug-section {
    margin: 20px 0;
}

.debug-section h4 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.debug-section pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    overflow-x: auto;
    font-size: 0.85rem;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

/* Job Content Formatting */
.job-description-content {
    line-height: 1.6;
    color: var(--text-primary);
    font-family: system-ui, -apple-system, sans-serif;
}

.job-field {
    margin: 12px 0;
    padding: 8px 12px;
    background: var(--bg-secondary, #f8f9fa);
    border-left: 3px solid var(--primary-color, #007bff);
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.field-label {
    font-weight: 600;
    color: var(--primary-color, #007bff);
    min-width: 140px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-value {
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

.job-description-content strong {
    color: var(--primary-600, #0056b3);
    font-weight: 700;
    display: block;
    margin: 24px 0 12px 0;
    padding: 8px 0 8px 0;
    border-bottom: 2px solid var(--primary-color, #007bff);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.job-description-content br + strong {
    margin-top: 32px;
}

.job-bullet {
    margin: 12px 0 12px 20px;
    color: var(--text-secondary);
    padding: 4px 0;
    position: relative;
    line-height: 1.5;
}

.job-bullet::before {
    content: "•";
    color: var(--primary-color, #007bff);
    font-weight: bold;
    position: absolute;
    left: -16px;
}

/* Add spacing after section headers */
.job-description-content strong + .job-bullet {
    margin-top: 16px;
}

/* Add spacing between field groups */
.job-field + .job-field {
    margin-top: 8px;
}

/* Special styling for key sections */
.job-description-content .job-field:first-of-type {
    margin-top: 16px;
}

/* Job metadata section styling */
.job-metadata-section {
    background: var(--bg-tertiary, #f0f4f8);
    border: 1px solid var(--border-color, #e0e6ed);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.job-metadata-section .job-field {
    margin: 8px 0;
    padding: 6px 10px;
    background: white;
    border-left: 3px solid var(--primary-color, #007bff);
    border-radius: 4px;
}

.job-metadata-section .field-label {
    color: var(--primary-600, #0056b3);
    font-weight: 700;
    min-width: 160px;
    font-size: 0.85rem;
}