/**
 * Task Management Styles
 * Specific styling for the task management interface
 */

/* Task List Table Improvements */
.task-table {
    font-size: 0.9rem;
}

.task-table th {
    background-color: #2d3748;
    border-color: #4a5568;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.task-table td {
    vertical-align: middle;
    border-color: #4a5568;
}

.task-table .task-id {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #a0aec0;
}

.task-table .container-name {
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

/* Status Badges */
.status-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
}

.status-active {
    background-color: #48bb78 !important;
}

.status-deactivated {
    background-color: #718096 !important;
}

.status-expired {
    background-color: #f56565 !important;
}

/* Action Buttons */
.task-actions {
    white-space: nowrap;
}

.task-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.task-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.task-actions .btn-group .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.task-actions .btn-group .btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
}

/* Edit Modal Improvements */
.edit-task-modal .modal-content {
    border: 1px solid #4a5568;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.edit-task-modal .modal-header {
    border-bottom: 1px solid #4a5568;
    background-color: #2d3748;
}

.edit-task-modal .modal-footer {
    border-top: 1px solid #4a5568;
    background-color: #2d3748;
}

.edit-task-modal .form-label {
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.edit-task-modal .form-control,
.edit-task-modal .form-select {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    color: #e2e8f0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.edit-task-modal .form-control:focus,
.edit-task-modal .form-select:focus {
    background-color: #2d3748;
    border-color: #4299e1;
    box-shadow: 0 0 0 0.2rem rgba(66, 153, 225, 0.25);
    color: #e2e8f0;
}

.edit-task-modal .form-control:disabled,
.edit-task-modal .form-select:disabled {
    background-color: #1a202c;
    border-color: #2d3748;
    color: #718096;
    opacity: 0.6;
}

/* Form Field Groups */
.field-group {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.field-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #a0aec0;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Schedule Details Display */
.schedule-details {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    background-color: #1a202c;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #2d3748;
}

.schedule-details code {
    background-color: transparent;
    color: #4299e1;
    font-size: inherit;
}

/* Filter Controls */
.task-filters {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.task-filters .form-select {
    background-color: #1a202c;
    border: 1px solid #4a5568;
    color: #e2e8f0;
    font-size: 0.875rem;
}

.task-filters .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Loading States */
.task-loading {
    text-align: center;
    padding: 2rem;
    color: #a0aec0;
}

.task-loading .spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.2rem;
}

/* Empty States */
.task-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #718096;
}

.task-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.task-empty .empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.task-empty .empty-description {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .task-table {
        font-size: 0.8rem;
    }
    
    .task-table th,
    .task-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .task-actions .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .edit-task-modal .modal-dialog {
        margin: 0.5rem;
    }
    
    .field-group {
        padding: 0.75rem;
    }
}

/* Animation Improvements */
.task-row {
    transition: background-color 0.2s ease;
}

.task-row:hover {
    background-color: rgba(74, 85, 104, 0.3) !important;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success/Error Message Styling */
.task-message {
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.task-message.alert-success {
    background-color: rgba(72, 187, 120, 0.1);
    border: 1px solid #48bb78;
    color: #68d391;
}

.task-message.alert-danger {
    background-color: rgba(245, 101, 101, 0.1);
    border: 1px solid #f56565;
    color: #fc8181;
}

/* Checkbox Styling */
.task-checkbox {
    transform: scale(1.1);
    accent-color: #4299e1;
}

.task-checkbox:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tooltip Improvements */
.task-tooltip {
    font-size: 0.75rem;
    max-width: 200px;
}

/* System Task Styling */
.system-task-row {
    /* No special background color - same as regular tasks */
}

.system-task-row:hover {
    /* Use same hover effect as regular tasks */
    background-color: rgba(74, 85, 104, 0.3) !important;
}

.system-task-row .badge.bg-warning {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.system-task-row .task-actions .text-muted {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Form Validation States */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #f56565;
    box-shadow: 0 0 0 0.2rem rgba(245, 101, 101, 0.25);
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: #48bb78;
    box-shadow: 0 0 0 0.2rem rgba(72, 187, 120, 0.25);
}

/* Dark Mode Specific Adjustments */
.bg-dark .task-table {
    --bs-table-bg: #1a202c;
    --bs-table-striped-bg: #2d3748;
    --bs-table-hover-bg: rgba(74, 85, 104, 0.2);
}

/* Print Styles */
@media print {
    .task-actions,
    .task-filters,
    .edit-task-modal {
        display: none !important;
    }
    
    .task-table {
        color: #000 !important;
        background: #fff !important;
    }
    
    .task-table th,
    .task-table td {
        border: 1px solid #000 !important;
    }
} 