/**
 * Frontend styles for Job Board plugin.
 */

/* Wrapper */
.job-board-wrapper {
    clear: both;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Container */
.job-board-frontend {
    display: block;
    margin: 15px auto;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #1f2937;
}

.job-board-frontend * {
    box-sizing: border-box;
}

/* Filters */
.jb-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
}

.jb-search-box {
    display: flex;
    flex: 1 1 auto;
    min-width: 200px;
    max-width: 300px;
}

.jb-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
}

.jb-search-btn {
    padding: 8px 12px;
    background: #1f2937;
    border: 1px solid #1f2937;
    border-radius: 0 6px 6px 0;
    color: white;
    cursor: pointer;
}

.jb-filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.jb-filter-select {
    padding: 8px 12px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

.jb-clear-filters {
    padding: 8px 16px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
}

/* Results Info */
.jb-results-info {
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #4b5563;
}

.jb-total-count {
    font-weight: 700;
    color: #1f2937;
}

/* Grid Layout */
.jb-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.jb-grid-item {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    min-height: 250px;
}

.jb-grid-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    transition: all 0.3s;
}

.jb-grid-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.jb-level-badge {
    padding: 4px 12px;
    background: #f3f4f6;
    color: #1f2937;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.jb-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}

.jb-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px 0;
    flex-grow: 1;
}

.jb-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.jb-actions {
    margin-top: auto;
}

.jb-apply-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 10px 16px !important;
    background: #1f2937 !important;
    background-color: #1f2937 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.jb-apply-btn:hover,
.jb-apply-btn:focus,
.jb-apply-btn:active,
.jb-apply-btn:visited {
    background: #111827 !important;
    background-color: #111827 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
}

/* Table Layout */
.jb-table-wrapper {
    overflow-x: auto;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
}

.jb-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.jb-table thead {
    background: #f3f4f6;
}

.jb-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    text-transform: uppercase;
}

.jb-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.jb-table tbody tr:hover {
    background: #f9fafb;
}

.jb-table td {
    padding: 14px 16px;
    color: #1f2937;
}

.jb-col-description {
    max-width: 300px;
    color: #6b7280;
}

.jb-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.jb-apply-btn-small {
    display: inline-block !important;
    padding: 6px 12px !important;
    background: #1f2937 !important;
    background-color: #1f2937 !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.jb-apply-btn-small:hover,
.jb-apply-btn-small:focus,
.jb-apply-btn-small:active,
.jb-apply-btn-small:visited {
    background: #111827 !important;
    background-color: #111827 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
}

/* Pagination */
.jb-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.jb-pagination-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
}

.jb-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.jb-pagination-info {
    padding: 8px 16px;
    font-size: 14px;
    color: #4b5563;
}

.jb-current-page {
    font-weight: 700;
    color: #1f2937;
}

/* Loading */
.jb-loading {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    backdrop-filter: blur(4px);
}

.jb-loading.active {
    display: flex !important;
}

.jb-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #1f2937;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.jb-loading p {
    margin: 0;
    color: #1f2937;
    font-size: 15px;
    font-weight: 500;
}

.jb-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 20px 0;
}

.jb-no-results p {
    margin: 0;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .jb-filters {
        flex-direction: column;
    }
    
    .jb-search-box,
    .jb-filter-select {
        max-width: 100%;
        width: 100%;
    }
    
    .jb-grid-layout {
        grid-template-columns: 1fr;
    }
    
    .jb-table-wrapper {
        border: none;
        background: transparent;
    }
    
    .jb-table thead {
        display: none;
    }
    
    .jb-table tbody {
        display: block;
    }
    
    .jb-table tbody tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: white;
    }
    
    .jb-table td {
        display: flex;
        justify-content: space-between;
        padding: 12px;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .jb-table td:last-child {
        border-bottom: none;
    }
    
    .jb-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
        font-size: 12px;
    }
}
