/**
 * Deductions Management Styles
 * Canadian Payroll System 2025
 * Version 3.5.0
 */

/* Filters Section */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.filters .input,
.filters .select {
    flex: 1;
    min-width: 200px;
}

/* Deduction Category Badges */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.category-badge.benefits {
    background: #e7f3ff;
    color: #0066cc;
}

.category-badge.retirement {
    background: #fff3cd;
    color: #856404;
}

.category-badge.union {
    background: #d4edda;
    color: #155724;
}

.category-badge.garnishment {
    background: #f8d7da;
    color: #721c24;
}

.category-badge.charitable {
    background: #e2d5f5;
    color: #6c3fb5;
}

.category-badge.other {
    background: #e9ecef;
    color: #495057;
}

/* Calculation Type Labels */
.calc-type-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

/* Employer Contribution Styling */
.employer-contribution {
    color: #28a745;
    font-weight: 600;
}

/* YTD Amount Styling */
.ytd-amount {
    font-weight: 600;
    color: #667eea;
}

/* Sortable Table Headers */
th i.fa-sort {
    cursor: pointer;
    opacity: 0.5;
    margin-left: 0.5rem;
    transition: opacity 0.3s;
}

th i.fa-sort:hover {
    opacity: 1;
}

th i.fa-sort-up,
th i.fa-sort-down {
    opacity: 1;
    color: #667eea;
}

/* Deduction Actions */
.deduction-actions {
    display: flex;
    gap: 0.5rem;
}

.deduction-actions .btn-icon {
    padding: 0.5rem;
}

/* Priority Indicator */
.priority-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.priority-high {
    color: #dc3545;
}

.priority-medium {
    color: #ffc107;
}

.priority-low {
    color: #28a745;
}

/* Form Helper Text */
.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Deduction Summary Cards */
.deduction-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.summary-card h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.summary-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.summary-card .label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Section Styling for Deductions Page */
#deductions-page .section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#deductions-page .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

#deductions-page .section-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#deductions-page .section-header h3 i {
    color: #667eea;
}

/* Form Container Styling */
#deductions-page .form-container {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 2px solid #e9ecef;
}

#deductions-page .form-container h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

/* Form Grid Layout */
#deductions-page .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

#deductions-page .form-grid .full-width {
    grid-column: 1 / -1;
}

/* Form Actions */
#deductions-page .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

/* Table Styling */
#deductions-page .table-container {
    overflow-x: auto;
}

#deductions-page table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

#deductions-page table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#deductions-page table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

#deductions-page table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

#deductions-page table tbody tr:hover {
    background: #f8f9fa;
}

#deductions-page .no-data {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive */
@media (max-width: 768px) {
    .filters {
        flex-direction: column;
    }
    
    .filters .input,
    .filters .select {
        width: 100%;
    }
    
    .deduction-summary-grid {
        grid-template-columns: 1fr;
    }
    
    #deductions-page .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    #deductions-page .form-grid {
        grid-template-columns: 1fr;
    }
    
    #deductions-page .form-actions {
        flex-direction: column;
    }
    
    #deductions-page table {
        font-size: 0.85rem;
    }
    
    #deductions-page table th,
    #deductions-page table td {
        padding: 0.75rem 0.5rem;
    }
}
