/**
 * W_Staff Module CSS
 * 
 * @package W_Staff
 * @version 1.0.0
 */

/* Staff Management Styles */
.w-staff-container {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.w-staff-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.w-staff-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.w-staff-actions {
    display: flex;
    gap: 10px;
}

.w-staff-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.w-staff-btn-primary {
    background-color: #0073aa;
    color: white;
}

.w-staff-btn-primary:hover {
    background-color: #005a87;
    color: white;
}

.w-staff-btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.w-staff-btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Staff List Styles */
.w-staff-list {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.w-staff-list th,
.w-staff-list td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.w-staff-list th {
    background-color: #f9f9f9;
    font-weight: 600;
    color: #333;
}

.w-staff-list tr:hover {
    background-color: #f5f5f5;
}

.w-staff-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.w-staff-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: bold;
}

.w-staff-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

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

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

.w-staff-status.on-leave {
    background-color: #fff3cd;
    color: #856404;
}

/* Staff Detail Styles */
.w-staff-detail {
    max-width: 1200px;
    margin: 0 auto;
}

.w-staff-tabs {
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
}

.w-staff-tabs ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.w-staff-tabs li {
    margin-right: 20px;
}

.w-staff-tabs a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.w-staff-tabs a:hover,
.w-staff-tabs a.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.w-staff-tab-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Form Styles */
.w-staff-form {
    max-width: 800px;
}

.w-staff-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.w-staff-form-col {
    flex: 1;
}

.w-staff-form-group {
    margin-bottom: 20px;
}

.w-staff-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.w-staff-form-group input,
.w-staff-form-group select,
.w-staff-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.w-staff-form-group input:focus,
.w-staff-form-group select:focus,
.w-staff-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.w-staff-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.w-staff-form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

/* Salary Calculator Styles */
.salary-container {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.salary-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.salary-header h2 {
    margin: 0;
    font-size: 24px;
}

.staff-info {
    margin: 5px 0 0 0;
    opacity: 0.9;
}

.month-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.month-selector label {
    font-weight: 600;
}

.month-dropdown {
    padding: 5px 10px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: white;
}

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

.action-buttons .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.salary-form-columns {
    display: flex;
    gap: 30px;
    padding: 30px;
}

.salary-form-column {
    flex: 1;
}

.salary-form-column h3 {
    margin: 0 0 20px 0;
    padding: 10px 0;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

.salary-input-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.salary-input-group label {
    flex: 1;
    font-weight: 500;
    color: #555;
}

.salary-input {
    width: 150px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: right;
    font-size: 14px;
}

.salary-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
}

.salary-total {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    border-left: 4px solid #007bff;
}

.salary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
}

.salary-total-row:last-child {
    margin-bottom: 0;
    font-size: 18px;
    color: #007bff;
    border-top: 1px solid #dee2e6;
    padding-top: 10px;
}

.salary-in-words {
    font-style: italic;
    color: #666;
    margin-top: 10px;
    padding: 10px;
    background: #f1f3f4;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .w-staff-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .w-staff-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .salary-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .salary-form-columns {
        flex-direction: column;
        gap: 20px;
    }
    
    .action-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .w-staff-form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Loading States */
.w-staff-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.w-staff-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Error States */
.w-staff-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

.w-staff-success {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
    margin: 20px 0;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .w-staff-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .salary-header {
        background: #f0f0f0 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
    }
}