/* Feedback Styles for Hindi Interactive Lesson */

/* Base Feedback Message */
.feedback-message {
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: var(--form-border-radius-md);
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.3s ease;
    position: relative;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
}

.feedback-message.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success Feedback */
.feedback-message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.feedback-message.success::before {
    content: "✓ ";
    font-weight: bold;
    margin-right: 8px;
}

/* Error Feedback */
.feedback-message.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.feedback-message.error::before {
    content: "✗ ";
    font-weight: bold;
    margin-right: 8px;
}

/* Warning Feedback */
.feedback-message.warning {
    background-color: #fff8e1;
    color: #f57f17;
    border-left: 4px solid #ffb300;
}

.feedback-message.warning::before {
    content: "⚠ ";
    font-weight: bold;
    margin-right: 8px;
}

/* Info Feedback */
.feedback-message.info {
    background-color: #e3f2fd;
    color: #0d47a1;
    border-left: 4px solid #2196f3;
}

.feedback-message.info::before {
    content: "ℹ ";
    font-weight: bold;
    margin-right: 8px;
}

/* Feedback with close button */
.feedback-message.dismissible {
    padding-right: 45px;
}

.feedback-message.dismissible .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.feedback-message.dismissible .close-btn:hover {
    opacity: 1;
}

/* Question feedback styles */
.question-feedback {
    margin-top: 12px;
    padding: 10px 15px;
    border-radius: var(--form-border-radius-sm);
    font-size: 0.95rem;
    line-height: 1.5;
    display: none;
}

.question-feedback.correct {
    display: block;
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 3px solid #4caf50;
}

.question-feedback.incorrect {
    display: block;
    background-color: #ffebee;
    color: #c62828;
    border-left: 3px solid #f44336;
}

.question-feedback.warning {
    display: block;
    background-color: #fff8e1;
    color: #f57f17;
    border-left: 3px solid #ffb300;
}

/* Narrator fallback */
.narrator-fallback {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: var(--form-border-radius-md);
    padding: 20px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    max-width: 80%;
    z-index: 1050;
    transition: all 0.4s ease;
}

.narrator-fallback.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
}

.narrator-fallback .fallback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.narrator-fallback .fallback-header h4 {
    margin: 0;
    color: #5c4033;
}

.narrator-fallback .fallback-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.narrator-fallback p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

/* Achievement popup */
.achievement-popup {
    position: fixed;
    top: 100px;
    right: -400px;
    background-color: #fff;
    border-radius: var(--form-border-radius-md);
    padding: 20px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    width: 300px;
    border-left: 4px solid #4caf50;
    transition: right 0.5s ease-out;
    z-index: 1050;
}

.achievement-popup.show {
    right: 20px;
}

.achievement-title {
    font-weight: bold;
    color: #4caf50;
    margin-bottom: 10px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.achievement-desc {
    color: #555;
    margin: 0;
}
