/**
 * SPL Study Mate CSS - Shared styles for Study Mate functionality
 * Universal styles for both curriculum and competency SPL interfaces
 */

/* Study Mate Messages in Main Chat */
.study-mate-message {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-left: 4px solid #4caf50;
    margin: 0 10px;
    position: relative;
}

.study-mate-message::before {
    content: "🎓 Study Mate";
    position: absolute;
    top: -8px;
    left: 8px;
    background: #4caf50;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Proactive Study Mate Popup */
.mate-popup {
    position: fixed;
    bottom: 100px;
    right: 50%;
    transform: translateX(50%);
    background: rgba(76, 175, 80, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(76, 175, 80, 0.4);
    z-index: 1001;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(15px);
    border: 2px solid #4caf50;
    color: white;
    text-align: center;
    animation: popIn 0.6s ease;
    max-width: 400px;
}

@keyframes popIn {
    from {
        transform: translateX(50%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateX(50%) scale(1);
        opacity: 1;
    }
}

.mate-popup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.mate-popup-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.mate-popup-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mate-popup-yes {
    background: white;
    color: #4caf50;
}

.mate-popup-yes:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.mate-popup-no {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.mate-popup-no:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Post-Mate Evaluation Dialog */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    display: none;
    backdrop-filter: blur(5px);
}

.mate-evaluation-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    z-index: 1002;
    display: none;
    flex-direction: column;
    min-width: 500px;
    max-width: 600px;
    backdrop-filter: blur(15px);
    border: 2px solid #4caf50;
    animation: popIn 0.4s ease;
}

.evaluation-header {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    padding: 20px;
    border-radius: 18px 18px 0 0;
    text-align: center;
}

.evaluation-header h3 {
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 20px;
}

.evaluation-body {
    padding: 25px;
}

.mate-answer-review {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
}

.mate-answer-review h4 {
    margin: 0 0 10px 0;
    color: #4caf50;
    font-size: 16px;
}

.mate-answer-review p {
    margin: 0;
    line-height: 1.5;
    color: #333;
}

.evaluation-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.evaluation-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.evaluation-option:hover {
    border-color: #4caf50;
    background: #f8f9fa;
    transform: translateY(-1px);
}

.evaluation-option.selected {
    border-color: #4caf50;
    background: #e8f5e9;
}

.option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin-right: 15px;
    position: relative;
    transition: all 0.2s ease;
}

.evaluation-option.selected .option-radio {
    border-color: #4caf50;
    background: #4caf50;
}

.evaluation-option.selected .option-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.option-content {
    flex: 1;
}

.option-title {
    font-weight: bold;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.option-subtitle {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.improve-input-area {
    margin-top: 15px;
    display: none;
}

.improve-input-area textarea {
    width: 100%;
    height: 80px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.improve-input-area textarea:focus {
    outline: none;
    border-color: #4caf50;
}

.evaluation-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
}

.eval-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eval-btn-cancel {
    background: #f5f5f5;
    color: #666;
    border: 2px solid #ddd;
}

.eval-btn-cancel:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.eval-btn-submit {
    background: #4caf50;
    color: white;
}

.eval-btn-submit:hover:not(:disabled) {
    background: #45a049;
    transform: translateY(-1px);
}

.eval-btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mate-popup {
        right: 10px;
        left: 10px;
        transform: none;
        max-width: none;
    }
    
    .mate-evaluation-dialog {
        min-width: auto;
        max-width: 90vw;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .evaluation-body {
        padding: 15px;
    }
    
    .mate-popup-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .mate-popup-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mate-evaluation-dialog {
        max-width: 95vw;
        min-width: auto;
    }
    
    .evaluation-header {
        padding: 15px;
    }
    
    .evaluation-header h3 {
        font-size: 18px;
    }
    
    .evaluation-actions {
        flex-direction: column;
    }
    
    .eval-btn {
        width: 100%;
    }
}