/* Job Manager Styles */
.jobs-editable {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.jobs-editable h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

/* Category Filter */
.category-filter {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.filter-label {
    font-weight: bold;
    margin-bottom: 10px;
    color: #555;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-btn {
    padding: 8px 16px;
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
    border-radius: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: #dee2e6;
    transform: translateY(-1px);
}

.category-btn.active {
    background: #007bff;
    color: white;
    border-color: #0056b3;
}

/* Jobs Table */
.jobs-table-editable {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.jobs-table-editable th {
    background: #343a40;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.jobs-table-editable td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.jobs-table-editable tr:hover {
    background: #f8f9fa;
}

/* Editable Fields */
.editable {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.editable:hover {
    background-color: #e3f2fd;
}

.editable.editing {
    background-color: #fff3cd;
}

/* Priority Badges */
.priority-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
    color: white;
    font-size: 12px;
}

.priority-1 { background: #28a745; }
.priority-2 { background: #20c997; }
.priority-3 { background: #17a2b8; }
.priority-4 { background: #6c757d; }
.priority-5 { background: #ffc107; color: #212529; }
.priority-6 { background: #fd7e14; }
.priority-7 { background: #dc3545; }
.priority-8 { background: #e83e8c; }
.priority-9 { background: #6f42c1; }
.priority-10 { background: #343a40; }

/* Category and Scope Badges */
.scope-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #6c757d;
    color: white;
    border-radius: 4px;
    font-size: 12px;
}

.category-select {
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
}

/* Job Notes */
.job-notes {
    max-width: 200px;
    font-size: 14px;
    line-height: 1.4;
}

/* Action Buttons */
.button-small {
    padding: 4px 8px;
    margin: 0 2px;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid #007bff;
    background: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.button-small:hover {
    background: #0056b3;
}

.delete-job {
    background: #dc3545;
    border-color: #dc3545;
}

.delete-job:hover {
    background: #c82333;
}

/* Jobs Actions */
.jobs-actions {
    margin-top: 20px;
    text-align: center;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 10px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.button:hover {
    background: #0056b3;
}

.button-secondary {
    background: #6c757d;
}

.button-secondary:hover {
    background: #545b62;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jobs-editable {
        padding: 10px;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .jobs-table-editable {
        font-size: 14px;
    }
    
    .jobs-table-editable th,
    .jobs-table-editable td {
        padding: 8px;
    }
    
    .job-notes {
        max-width: 150px;
    }
}

/* Modal Styles - Override Astra Theme */
div.job-modal,
.job-modal {
    position: fixed !important;
    z-index: 999999 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0,0,0,0.8) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

div.job-modal.show,
.job-modal.show {
    display: flex !important;
}

div.modal-content,
.modal-content {
    background-color: #fff !important;
    padding: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
    width: 90% !important;
    max-width: 500px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    position: relative !important;
    z-index: 1000000 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Force overlay behavior - Override all themes */
body div.job-modal,
html body div.job-modal,
.site div.job-modal,
.page div.job-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999999 !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Astra specific overrides */
.ast-container div.job-modal,
.ast-page-builder-template div.job-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999999 !important;
}

.modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px !important;
    border-bottom: 1px solid #dee2e6 !important;
    background: #f8f9fa !important;
    border-radius: 8px 8px 0 0 !important;
}

.modal-header h3 {
    margin: 0 !important;
    color: #333 !important;
}

.close-modal {
    font-size: 24px !important;
    font-weight: bold !important;
    color: #aaa !important;
    cursor: pointer !important;
    line-height: 1 !important;
    transition: color 0.2s ease !important;
    background: none !important;
    border: none !important;
}

.close-modal:hover {
    color: #000 !important;
}

.form-row {
    margin-bottom: 15px !important;
    padding: 0 20px !important;
}

.form-row label {
    display: block !important;
    margin-bottom: 5px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    transition: border-color 0.2s ease !important;
    box-sizing: border-box !important;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none !important;
    border-color: #007bff !important;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25) !important;
}

.form-row textarea {
    resize: vertical !important;
    min-height: 80px !important;
}

.form-actions {
    padding: 20px !important;
    border-top: 1px solid #dee2e6 !important;
    background: #f8f9fa !important;
    text-align: right !important;
    border-radius: 0 0 8px 8px !important;
}

.form-actions .button {
    margin-left: 10px !important;
}

.button-primary {
    background: #007bff !important;
}

.button-primary:hover {
    background: #0056b3 !important;
}

/* Responsive modal */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .form-row {
        padding: 0 15px;
    }
    
    .form-actions {
        padding: 15px;
    }
    
    .form-actions .button {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
}
