/**
 * Feedback System Styles
 * 
 * @package TridentMSLMSInstructorMarking
 */

/* Main feedback section container */
.trident-feedback-section {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.trident-feedback-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.4em;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.trident-feedback-section h4 {
    margin-top: 20px;
    margin-bottom: 15px;
    color: #444;
    font-size: 1.1em;
}

/* Student answer section */
.student-answer-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.student-answer {
    line-height: 1.6;
    color: #333;
}

/* Feedback items (read-only feedback display) */
.feedback-item {
    background: #fff;
    border-left: 4px solid #007cba;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
}

.feedback-item.instructor-feedback {
    border-left-color: #28a745;
}

.feedback-item.assessor-feedback {
    border-left-color: #fd7e14;
}

.feedback-item.iqa-feedback {
    border-left-color: #6f42c1;
}

.feedback-item.liqa-feedback {
    border-left-color: #dc3545;
}

.feedback-content {
    margin-bottom: 10px;
    line-height: 1.6;
}

.feedback-date {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* Feedback forms */
.feedback-form-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.feedback-description {
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
}

.feedback-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    margin-bottom: 15px;
}

.feedback-form textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.feedback-form.has-unsaved-changes textarea {
    border-color: #ffc107;
    background-color: #fffdf0;
}

/* Marking criteria section */
.marking-criteria-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

/* Action buttons */
.feedback-action-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.notification-button-section {
    margin: 20px 0;
    padding: 15px;
    background: #e8f4f8;
    border: 1px solid #b3d9e8;
    border-radius: 4px;
    text-align: center;
}

/* Button modifications */
.save-feedback-btn,
.require-info-btn,
.accept-answer-btn,
.notify-next-level-btn {
    min-width: 140px;
}

.require-info-btn.marked-for-info {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #212529 !important;
}

.accept-answer-btn.answer-accepted {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

.notify-next-level-btn.notification-sent {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

/* Role-specific styling */
.feedback-section.student-view {
    border-left: 4px solid #17a2b8;
}

.feedback-section.instructor-view {
    border-left: 4px solid #28a745;
}

.feedback-section.assessor-view {
    border-left: 4px solid #fd7e14;
}

.feedback-section.iqa-view {
    border-left: 4px solid #6f42c1;
}

.feedback-section.liqa-view {
    border-left: 4px solid #dc3545;
}

/* Notifications */
.trident-notification {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

/* Responsive design */
@media (max-width: 768px) {
    .trident-feedback-section {
        padding: 15px;
    }
    
    .feedback-action-buttons {
        flex-direction: column;
    }
    
    .save-feedback-btn,
    .require-info-btn,
    .accept-answer-btn,
    .notify-next-level-btn {
        width: 100%;
        min-width: auto;
    }
    
    .feedback-form textarea {
        min-height: 100px;
    }
}

/* Custom field styling integration */
.trident-mslms-custom-fields-editable {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.custom-field-group {
    margin-bottom: 20px;
}

.custom-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
}

.checkbox-label {
    font-weight: normal;
    margin: 0;
    cursor: pointer;
}

.conditional-field {
    transition: all 0.3s ease;
}

.custom-field-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

/* Status indicators */
.feedback-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.feedback-status.requires-info {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.feedback-status.accepted {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-status.pending {
    background-color: #e2e3e5;
    color: #6c757d;
    border: 1px solid #d1ecf1;
}

/* Loading states */
.masterstudy-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.masterstudy-button:disabled:hover {
    transform: none;
}

/* Error states */
.feedback-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 10px 0;
}

/* Success states */
.feedback-success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin: 10px 0;
}
