/* Answer Highlighting CSS Styles */

/* Base feedback styling */
.asc-answer-feedback {
    position: relative;
    transition: all 0.3s ease;
    z-index: 10;
}

/* Correct answer styling */
.asc-answer-correct {
    background-color: #10b981 !important; /* Green success color */
    border-color: #059669 !important;
    color: white !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    transform: scale(1.05);
}

.asc-answer-correct:hover {
    background-color: #10b981 !important;
    transform: scale(1.05);
}

/* Incorrect answer styling */
.asc-answer-incorrect {
    background-color: #ef4444 !important; /* Red error color */
    border-color: #dc2626 !important;
    color: white !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.asc-answer-incorrect:hover {
    background-color: #ef4444 !important;
}

/* Feedback icons */
.asc-feedback-icon {
    display: inline-block;
    margin-left: 8px;
    font-weight: bold;
    font-size: 1.2em;
    animation: asc-icon-pop 0.3s ease-out;
}

.asc-feedback-icon--correct {
    color: #ffffff;
}

.asc-feedback-icon--incorrect {
    color: #ffffff;
}

/* Correct answer hint */
.asc-correct-answer-hint {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1f2937, #374151);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    margin-top: 8px;
    min-width: 200px;
    text-align: center;
}

.asc-hint-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.asc-hint-label {
    font-size: 0.875rem;
    color: #d1d5db;
    font-weight: 500;
}

.asc-hint-answer {
    font-size: 1rem;
    color: #10b981;
    font-weight: 700;
}

/* Position hint relative to answer options */
.asc-answer-options {
    position: relative;
}

.asc-answer-options .asc-correct-answer-hint {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
}

/* Animations */
@keyframes asc-correct-pulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.7);
    }
    100% { 
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    }
}

@keyframes asc-incorrect-shake {
    0%, 100% { 
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% { 
        transform: translateX(-8px);
    }
    20%, 40%, 60%, 80% { 
        transform: translateX(8px);
    }
}

@keyframes asc-icon-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes asc-hint-slideIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .asc-correct-answer-hint {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin-top: 0;
        max-width: 90vw;
    }
    
    .asc-answer-options .asc-correct-answer-hint {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/* Enhanced button focus states for highlighting */
.asc-answer-button:focus {
    outline: 2px solid var(--game-primary, #3b82f6);
    outline-offset: 2px;
}

.asc-answer-button[data-last-clicked="true"] {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
    .asc-correct-answer-hint {
        background: linear-gradient(135deg, #111827, #1f2937);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .asc-answer-correct {
        background-color: #008000 !important;
        border: 3px solid #ffffff !important;
    }
    
    .asc-answer-incorrect {
        background-color: #cc0000 !important;
        border: 3px solid #ffffff !important;
    }
    
    .asc-correct-answer-hint {
        border: 2px solid #ffffff;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .asc-answer-feedback,
    .asc-feedback-icon,
    .asc-correct-answer-hint {
        animation: none !important;
        transition: none !important;
    }
    
    .asc-answer-correct {
        transform: none;
    }
    
    @keyframes asc-correct-pulse {
        0%, 100% { 
            transform: none;
        }
    }
    
    @keyframes asc-incorrect-shake {
        0%, 100% { 
            transform: none;
        }
    }
}
