/* Work Assignments V2 Styles */

.wm-work-assignments-v2 {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.wm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
}

.wm-header h2 {
    margin: 0;
    font-size: 28px;
}

.wm-header-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.wm-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.wm-btn-primary {
    background: #0073aa;
    color: white;
}

.wm-btn-primary:hover {
    background: #005a87;
}

.wm-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.wm-btn-secondary:hover {
    background: #ddd;
}

.wm-btn-success {
    background: #46b450;
    color: white;
}

.wm-btn-success:hover {
    background: #3a9940;
}

.wm-btn-danger {
    background: #dc3232;
    color: white;
}

.wm-btn-danger:hover {
    background: #a00;
}

.wm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Assignments Grid */
.wm-assignments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Assignment Card */
.wm-assignment-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.wm-assignment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.wm-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.wm-card-header h3 {
    margin: 0;
    font-size: 18px;
    flex: 1;
}

.wm-category-badge {
    background: #0073aa;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.wm-card-body {
    margin-bottom: 15px;
}

.wm-card-body p {
    margin: 8px 0;
    font-size: 14px;
}

.wm-description {
    color: #666;
    line-height: 1.5;
}

.wm-meta {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

.wm-card-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.wm-card-actions button {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
}

/* Modal */
.wm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.wm-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.wm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.wm-modal-header h2 {
    margin: 0;
    font-size: 22px;
}

.wm-modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
}

.wm-modal-close:hover {
    color: #000;
}

.wm-modal-body {
    padding: 20px;
}

.wm-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #ddd;
}

/* Form */
.wm-form-group {
    margin-bottom: 20px;
}

.wm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.wm-required {
    color: #dc3232;
    margin-left: 4px;
}

.wm-form-group input[type="text"],
.wm-form-group input[type="email"],
.wm-form-group input[type="number"],
.wm-form-group input[type="date"],
.wm-form-group select,
.wm-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.wm-form-group input:focus,
.wm-form-group select:focus,
.wm-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.wm-field-error {
    display: block;
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
}

/* Spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wm-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* Responsive */
@media (max-width: 768px) {
    .wm-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .wm-header-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .wm-header-actions button {
        width: 100%;
    }
    
    .wm-assignments-grid {
        grid-template-columns: 1fr;
    }
    
    .wm-modal-content {
        max-width: 100%;
        margin: 10px;
    }
}
