/* Analytics Engineering LMS - Practice Hub Styles */

/* Practice Hub Container */
.ae-practice-hub {
    max-width: 100%;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Practice Hub Hero Banner */
.practice-hub-hero {
    background: linear-gradient(135deg, #2563eb 0%, #9333ea 50%, #4f46e5 100%) !important;
    padding: 20px 24px !important;
    color: white !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 300 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 24px !important;
}

.practice-hub-hero h1 {
    font-size: 28px !important;
    font-weight: bold !important;
    margin: 0 !important;
    color: white !important;
    flex: 1 !important;
}

/* Practice Stats Banner */
.practice-stats-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
    padding: 0 20px;
}

.practice-stats-banner .stat-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.practice-stats-banner .stat-icon {
    font-size: 32px;
}

.practice-stats-banner .stat-content {
    flex: 1;
}

.practice-stats-banner .stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #111827;
    margin-bottom: 4px;
}

.practice-stats-banner .stat-label {
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Practice Section Header */
.practice-section-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 0 20px;
}

.practice-section-header h2 {
    font-size: 28px;
    font-weight: bold;
    color: #111827;
    margin-bottom: 8px;
}

.practice-section-header p {
    font-size: 16px;
    color: #6b7280;
}

/* Practice Views */
.practice-view {
    display: none;
    padding: 20px;
}

.practice-view.active {
    display: block;
}

/* Practice Modules Grid */
.practice-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.practice-module-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

.practice-module-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.practice-module-card .module-card-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.practice-module-card h3 {
    font-size: 18px;
    font-weight: bold;
    color: #111827;
    margin-bottom: 16px;
}

.module-practice-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.module-stat {
    flex: 1;
    text-align: center;
}

.module-stat-value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 4px;
}

.module-stat-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-start-practice {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-start-practice:hover {
    background: #1d4ed8;
}

/* Difficulty Options */
.difficulty-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.difficulty-card {
    background: white;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.difficulty-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.difficulty-card .difficulty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.difficulty-card h3 {
    font-size: 22px;
    font-weight: bold;
    color: #111827;
    margin-bottom: 8px;
}

.difficulty-card p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}

.btn-select-difficulty {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-select-difficulty:hover {
    background: #1d4ed8;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-bottom: 20px;
}

.btn-back:hover {
    background: #e5e7eb;
}

/* Practice Question Card */
.practice-question-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.question-number {
    font-size: 14px;
    font-weight: 600;
    color: #9333ea;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-timer {
    font-size: 14px;
    color: #6b7280;
}

.question-text {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    line-height: 1.6;
    margin-bottom: 24px;
}

.answer-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.choice-option {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.choice-option:hover {
    background: #f3f4f6;
    border-color: #2563eb;
}

.choice-option.selected {
    background: #eff6ff;
    border-color: #2563eb;
}

.choice-option.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.choice-option.correct {
    background: #f0fdf4;
    border-color: #22c55e;
}

.choice-option.incorrect {
    background: #fef2f2;
    border-color: #ef4444;
}

.choice-letter {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #374151;
}

.choice-option.selected .choice-letter {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.choice-option.correct .choice-letter {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.choice-option.incorrect .choice-letter {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.choice-text {
    flex: 1;
    font-size: 16px;
    color: #374151;
    line-height: 1.5;
}

.btn-submit-answer {
    width: 100%;
    padding: 14px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-submit-answer:hover:not(:disabled) {
    background: #1d4ed8;
}

.btn-submit-answer:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Answer Feedback */
#answer-feedback {
    margin-top: 24px;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    display: none;
}

#answer-feedback.correct {
    background: #f0fdf4;
    border: 2px solid #22c55e;
}

#answer-feedback.incorrect {
    background: #fef2f2;
    border: 2px solid #ef4444;
}

.feedback-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.feedback-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 12px;
}

#answer-feedback.correct .feedback-title {
    color: #16a34a;
}

#answer-feedback.incorrect .feedback-title {
    color: #dc2626;
}

.feedback-text {
    font-size: 16px;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 16px;
}

.feedback-xp {
    font-size: 20px;
    font-weight: bold;
    color: #9333ea;
    margin-bottom: 20px;
}

.feedback-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-next-question,
.btn-finish-session {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-next-question {
    background: #2563eb;
    color: white;
}

.btn-next-question:hover {
    background: #1d4ed8;
}

.btn-finish-session {
    background: #f3f4f6;
    color: #374151;
}

.btn-finish-session:hover {
    background: #e5e7eb;
}

/* Loading Spinner */
#practice-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f4f6;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#practice-loading p {
    font-size: 16px;
    color: #6b7280;
}

/* Practice CTA on Course Page */
.ae-lms-practice-cta {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.practice-cta-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.practice-cta-icon {
    font-size: 64px;
    flex-shrink: 0;
}

.practice-cta-text {
    flex: 1;
}

.practice-cta-text h3 {
    font-size: 22px;
    font-weight: bold;
    color: #111827;
    margin-bottom: 8px;
}

.practice-cta-text p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 12px;
}

.practice-cta-features {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.practice-cta-feature {
    display: inline-block;
    padding: 6px 12px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.btn-practice-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.btn-practice-cta:hover {
    background: #1d4ed8;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .practice-hub-hero {
        padding: 14px 16px !important;
    }
    
    .practice-hub-hero h1 {
        font-size: 22px !important;
    }
    
    .practice-stats-banner {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 16px;
    }
    
    .practice-stats-banner .stat-item {
        padding: 16px;
    }
    
    .practice-section-header {
        padding: 0 16px;
    }
    
    .practice-section-header h2 {
        font-size: 24px;
    }
    
    .practice-view {
        padding: 16px;
    }
    
    .practice-modules-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .difficulty-options {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .practice-question-card {
        padding: 20px;
    }
    
    .question-text {
        font-size: 18px;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .feedback-actions {
        flex-direction: column;
    }
    
    .btn-next-question,
    .btn-finish-session {
        width: 100%;
    }
    
    .practice-cta-content {
        flex-direction: column;
        text-align: center;
    }
    
    .practice-cta-features {
        justify-content: center;
    }
    
    .btn-practice-cta {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .practice-stats-banner .stat-value {
        font-size: 24px;
    }
    
    .practice-stats-banner .stat-label {
        font-size: 11px;
    }
    
    .choice-option {
        padding: 12px;
    }
    
    .choice-letter {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .choice-text {
        font-size: 14px;
    }
}