﻿/* ============================================
   INTERACTIVE MODULES STYLES
   Case Study & Quick Check Components
   ============================================ */

/* Case Study Block */
.case-study-block {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(99, 102, 241, 0.1));
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    padding: 32px;
    margin: 32px 0;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

.case-study-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6, #6366f1);
}

.case-study-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.case-study-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 8px rgba(139, 92, 246, 0.5));
}

.case-study-title {
    font-size: 20px;
    font-weight: 700;
    color: #a78bfa;
    margin: 0;
}

.case-study-content {
    color: #e2e8f0;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.case-study-content p {
    margin-bottom: 12px;
}

.case-study-highlight {
    background: rgba(139, 92, 246, 0.15);
    border-left: 3px solid #8b5cf6;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-style: italic;
    color: #c4b5fd;
}

/* Quick Check Block */
.quick-check-block {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    margin: 24px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-check-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.quick-check-block.locked {
    opacity: 0.5;
}

.quick-check-block.locked .quick-check-question,
.quick-check-block.locked .quick-check-options {
    pointer-events: none;
}

/* Quiz Unlock Message - всегда активен, даже когда quiz locked */
.quiz-unlock-message {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto !important;
}

.quiz-unlock-message p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.quiz-unlock-message .audio-completion-trigger {
    margin: 0 auto;
    display: inline-flex;
    pointer-events: auto !important;
}

.quick-check-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.quick-check-icon {
    font-size: 28px;
}

.quick-check-title {
    font-size: 18px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
}

.quick-check-question {
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 16px;
    line-height: 1.6;
}

.quick-check-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
}

.quick-check-option {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.quick-check-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(4px);
}

.quick-check-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #6366f1;
}

.quick-check-option label {
    flex: 1;
    cursor: pointer;
    font-size: 15px;
    color:#e2e8f0;
    line-height: 1.5;
}

/* Correct Answer State */
.quick-check-option.correct {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.5);
    animation: correctPulse 0.6s ease;
}

.quick-check-option.correct::after {
    content: '✓';
    position: absolute;
    right: 20px;
    font-size: 24px;
    color: #10b981;
    font-weight: bold;
    animation: checkmark 0.4s ease;
}

/* Wrong Answer State */
.quick-check-option.wrong {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    animation: wrongShake 0.5s ease;
}

.quick-check-option.wrong::after {
    content: '✗';
    position: absolute;
    right: 20px;
    font-size: 24px;
    color: #ef4444;
    font-weight: bold;
}

/* Disabled state after answer */
.quick-check-option.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Feedback Message */
.quick-check-feedback {
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.6;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
}

.quick-check-feedback.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.quick-check-feedback.correct {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.quick-check-feedback.wrong {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.quick-check-feedback strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

/* Audio Completion Trigger */
.audio-completion-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    color: #a5b4fc;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.audio-completion-trigger:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.audio-completion-trigger.completed {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    pointer-events: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes correctPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

@keyframes wrongShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

@keyframes checkmark {
    from {
        opacity: 0;
        transform: scale(0) rotate(-45deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .case-study-block {
        padding: 20px;
        margin: 20px 0;
        border-radius: 16px;
    }

    .case-study-icon {
        font-size: 24px;
    }

    .case-study-title {
        font-size: 17px;
    }

    .case-study-content {
        font-size: 14px;
    }

    .case-study-highlight {
        padding: 12px;
        font-size: 13px;
    }

    .quick-check-block {
        padding: 18px;
        margin: 20px 0;
        border-radius: 16px;
    }

    .quick-check-icon {
        font-size: 24px;
    }

    .quick-check-title {
        font-size: 16px;
    }

    .quick-check-question {
        font-size: 15px;
        margin-bottom: 14px;
    }

    .quick-check-options {
        gap: 10px;
    }

    .quick-check-option {
        padding: 12px 14px;
    }

    .quick-check-option label {
        font-size: 14px;
        line-height: 1.4;
    }

    /* Larger touch targets for mobile */
    .quick-check-option input[type="radio"] {
        width: 22px;
        height: 22px;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .quick-check-feedback {
        padding: 12px 16px;
        font-size: 13px;
        margin-top: 12px;
    }

    .audio-completion-trigger {
        padding: 10px 16px;
        font-size: 13px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .case-study-block {
        padding: 16px;
        margin: 16px 0;
    }

    .case-study-title {
        font-size: 16px;
    }

    .case-study-content {
        font-size: 13px;
    }

    .quick-check-block {
        padding: 16px;
        margin: 16px 0;
    }

    .quick-check-header {
        margin-bottom: 12px;
    }

    .quick-check-title {
        font-size: 15px;
    }

    .quick-check-question {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .quick-check-options {
        gap: 8px;
    }

    .quick-check-option {
        padding: 10px 12px;
    }

    .quick-check-option label {
        font-size: 13px;
    }

    .quick-check-option input[type="radio"] {
        width: 24px;
        height: 24px;
        margin-right: 10px;
    }

    .quick-check-option.correct::after,
    .quick-check-option.wrong::after {
        right: 12px;
        font-size: 20px;
    }

    .quick-check-feedback {
        padding: 10px 12px;
        font-size: 12px;
    }

    .quick-check-feedback strong {
        font-size: 13px;
        margin-bottom: 6px;
    }
}

/* Extra small devices (very small phones) */
@media (max-width: 360px) {

    .case-study-block,
    .quick-check-block {
        padding: 14px;
        margin: 14px 0;
        border-radius: 12px;
    }

    .case-study-title,
    .quick-check-title {
        font-size: 14px;
    }

    .quick-check-question {
        font-size: 13px;
    }

    .quick-check-option {
        padding: 8px 10px;
    }

    .quick-check-option label {
        font-size: 12px;
    }
}

/* Landscape mode optimization */
@media (max-height: 500px) and (orientation: landscape) {

    .case-study-block,
    .quick-check-block {
        padding: 16px;
        margin: 16px 0;
    }

    .quick-check-header {
        margin-bottom: 10px;
    }

    .quick-check-question {
        margin-bottom: 10px;
    }

    .quick-check-options {
        gap: 8px;
    }
}