/* Job Statistics Styling */
.job-statistics-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.job-statistics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.job-statistics-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.job-statistics-filters input[type="search"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
    font-size: 14px;
}

/* Table Styling */
.job-statistics-table {
    width: 100%;
}

.job-statistics-table-header {
    display: flex;
    background-color: #f7f7f7;
    border-bottom: 1px solid #eee;
    padding: 12px 15px;
    font-weight: 600;
}

.job-column {
    padding: 8px 12px;
}

.job-title {
    flex: 3;
}

.job-date, .job-views, .job-applications, .job-actions {
    flex: 1;
}

.job-statistics-row {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

/* Status */
.job-status {
    display: flex;
    margin-top: 5px;
    font-size: 0.85rem;
}

.job-status-publish {
    color: #2e7d32;
}

.job-status-draft {
    color: #f57c00;
}

.job-status-expired {
    color: #d32f2f;
}

.job-status-pending {
    color: #0288d1;
}

/* Actions */
.job-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.action-button {
    display: inline-block;
    background-color: #f1f1f1;
    color: #333;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    margin-right: 10px;
    border: 1px solid #ddd;
}

.action-button.primary {
    background-color: #2271b1;
    color: white;
    border-color: #135e96;
}

.action-button:hover {
    opacity: 0.9;
}

/* Dropdown */
.actions-dropdown {
    position: relative;
    display: inline-block;
}

.actions-dropdown-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 0.9rem;
}

.actions-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
}

.actions-dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.actions-dropdown-content a:hover {
    background-color: #f1f1f1;
}

.actions-dropdown:hover .actions-dropdown-content {
    display: block;
}

/* New applications indicator */
.new-applications {
    display: flex;
    align-items: center;
    margin-top: 3px;
}

.marker-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #d32f2f;
    margin-left: 5px;
}

/* Chart */
.job-statistics-chart-container {
    padding: 20px;
    border-top: 1px solid #eee;
}

.job-statistics-chart {
    height: 300px;
    margin-top: 20px;
}

.chart-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 4px;
    text-align: center;
    padding: 20px;
}

/* Modal */
.job-statistics-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.job-statistics-modal-content {
    position: relative;
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 4px;
    width: 80%;
    max-width: 900px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .job-statistics-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .job-statistics-filters {
        margin-top: 15px;
        width: 100%;
    }
    
    .job-statistics-filters input[type="search"] {
        width: 100%;
    }
    
    .job-statistics-table-header, .job-statistics-row {
        flex-direction: column;
    }
    
    .job-column {
        padding: 5px 0;
    }
    
    .job-actions {
        justify-content: flex-start;
        margin-top: 10px;
    }
}

/* Chart and Modal Styling */
.job-statistics-modal-content {
    max-height: 80vh;
    overflow-y: auto;
}

.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-top: 20px;
}

.tab-button {
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    padding: 10px 15px;
    margin-right: 5px;
    cursor: pointer;
    position: relative;
    top: 1px;
}

.tab-button.active {
    background-color: white;
    border-bottom: 1px solid white;
}

.tab-content {
    padding: 20px 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Legend */
.chart-legend {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 0 15px;
}

.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
    border-radius: 2px;
}

/* Stats Summary */
.stats-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-top: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 15px;
}

.stats-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 10px;
}

.stats-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.stats-value {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Loading and Error states */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    text-align: center;
    color: #666;
}

.loading:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 2px solid #ddd;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin: 20px 0;
}