/* === BACKEND CONFIGURATION UI === */
.wpsl-h5p-admin-wrapper { display: flex; border: 1px solid #ccd0d4; background: #fff; margin-top: 10px; min-height: 480px; }
.wpsl-admin-sidebar { width: 230px; border-right: 1px solid #ccd0d4; background: #f6f7f7; padding: 12px; box-sizing: border-box; }
.wpsl-sidebar-header { font-weight: bold; padding-bottom: 8px; border-bottom: 2px solid #ccd0d4; margin-bottom: 10px; }

#wpsl-question-nav-list { list-style: none; margin: 0 0 15px 0; padding: 0; }
#wpsl-question-nav-list li { padding: 10px; background: #fff; border: 1px solid #ccd0d4; margin-bottom: 6px; cursor: move; border-radius: 3px; position: relative; padding-right: 25px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#wpsl-question-nav-list li.ui-sortable-placeholder { background: #f0f7ff; border: 1px dashed #2271b1; visibility: visible !important; height: 38px; }
#wpsl-question-nav-list li.active { background: #2271b1; color: #fff; border-color: #2271b1; }
#wpsl-question-nav-list li .close-x { position: absolute; right: 8px; top: 10px; color: #999; cursor: pointer; }
#wpsl-question-nav-list li.active .close-x { color: #fff; }

.wpsl-admin-content-pane { flex: 1; padding: 20px; box-sizing: border-box; }
.wpsl-form-group { margin-bottom: 15px; }
.wpsl-form-group label { display: block; font-weight: bold; margin-bottom: 6px; }
.wpsl-h5p-box { border: 1px solid #ccd0d4; border-radius: 3px; margin: 15px 0; }
.wpsl-box-header { background: #7d848c; color: #fff; padding: 8px 12px; font-weight: bold; }
.wpsl-box-body { padding: 15px; background: #f6f7f7; }
.wpsl-media-upload-ui { display: flex; gap: 10px; width: 100%; }
.wpsl-media-upload-ui input { flex: 1; }
.wpsl-answer-item { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; background: #fff; border: 1px solid #ccd0d4; padding-right: 8px; }
.wpsl-answer-item input { flex: 1; border: none !important; padding: 6px; background: transparent; }
.wpsl-answer-item .remove-item-x { color: #d93025; cursor: pointer; font-weight: bold; }
.wpsl-form-row { display: flex; gap: 15px; }
.wpsl-col { flex: 1; }

/* === FRONTEND PLAIN MODERN UI (Hỗ trợ đa Class độc lập) === */
.wpsl-quiz-container .wpsl-card { background: #fafafa; border: 1px solid #e2e2e2; border-radius: 4px; padding: 30px; max-width: 750px; margin: 20px auto; font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; min-height: auto; position: relative; }
.wpsl-screen-panel { width: 100%; }
.wpsl-screen-title { font-size: 24px; color: #333; font-weight: 500; margin-top: 0; margin-bottom: 15px; text-align: center; }
.wpsl-task-display-text { font-size: 24px; color: #000000; font-weight: 400; margin-bottom: 20px; line-height: 1.4; }
.wpsl-media-render-zone img { max-width: 100%; height: auto; border-radius: 4px; border: 1px solid #e0e0e0; }
.wpsl-media-render-zone video { width: 100%; max-height: 360px; background: #000; border-radius: 4px; }

.wpsl-media-audio-player { background: #2196f3; color: white; border: none; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.1); transition: background 0.2s; }
.wpsl-media-audio-player:hover { background: #1976d2; }
.wpsl-media-audio-player svg { width: 20px; height: 20px; fill: white; }

.wpsl-mode-selection-zone { display: flex; flex-direction: column; gap: 15px; max-width: 500px; margin: 0 auto; }
.wpsl-mode-btn { display: flex; align-items: center; gap: 20px; padding: 18px 25px; background: #fff; border: 1px solid #e2e2e2; border-radius: 6px; cursor: pointer; text-align: left; transition: all 0.2s; }
.wpsl-mode-btn:hover { border-color: #1976d2; background: #f0f7ff; }
.wpsl-mode-btn .dashicons { font-size: 32px; width: 32px; height: 32px; color: #1976d2; }
.wpsl-mode-info strong { display: block; font-size: 18px; color: #222; margin-bottom: 4px; }
.wpsl-mode-info small { font-size: 13px; color: #666; }

.wpsl-action-area-minimal { display: flex; align-items: center; gap: 15px; margin: 25px 0 25px 0; }
.wpsl-minimal-mic-btn { background: #1976d2; color: white; border: none; padding: 10px 22px; border-radius: 20px; font-size: 15px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); transition: background 0.2s; }
.wpsl-minimal-mic-btn.recording { background: #d32f2f; }
.wpsl-minimal-mic-btn:disabled { background: #ccc; cursor: not-allowed; box-shadow: none; }
.wpsl-minimal-mic-btn .dashicons { font-size: 18px; width: 18px; height: 18px; }

.wpsl-wave-line { display: flex; align-items: center; gap: 3px; height: 20px; }
.wpsl-wave-line span { display: block; width: 2px; height: 8px; background: #1976d2; animation: wpsl_wave_play 0.5s infinite alternate; }
@keyframes wpsl_wave_play { from { height: 4px; } to { height: 18px; } }

.wpsl-user-output { display: inline-block; padding: 6px 14px; border-radius: 4px; font-size: 16px; font-weight: 500; margin-bottom: 5px; min-height: 24px; }
.wpsl-user-output.processing { border: 1px dashed #999; background: #f0f0f0; color: #777; animation: wpsl_pulse 1.5s infinite; }
.wpsl-user-output.correct { background: #e6f4ea; color: #137333; border: 1px solid #137333; padding-right: 30px; position: relative; }
.wpsl-user-output.correct::after { content: "✔"; position: absolute; right: 10px; }
.wpsl-user-output.wrong { background: #fce8e6; color: #c5221f; border: 1px solid #c5221f; padding-right: 30px; position: relative; }
.wpsl-user-output.wrong::after { content: "✖"; position: absolute; right: 10px; }

@keyframes wpsl_pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

.wpsl-test-log-row { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding: 8px 0; font-size: 15px; }
.wpsl-test-log-row:last-child { border-bottom: none; }
.wpsl-log-correct { color: #137333; font-weight: bold; }
.wpsl-log-wrong { color: #c5221f; font-weight: bold; }

.wpsl-restart-btn { background: #1976d2; color: white; border: none; padding: 12px 26px; border-radius: 30px; font-weight: bold; cursor: pointer; font-size: 16px; box-shadow: 0 2px 5px rgba(0,0,0,0.15); transition: background 0.2s; }
.wpsl-restart-btn:hover { background: #1565c0; }

.wpsl-footer-navigation-bar { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #e8e8e8; padding-top: 20px; margin-top: 20px; position: relative; }
.wpsl-dots-indicator { display: flex; gap: 8px; position: absolute; left: 50%; transform: translateX(-50%); }
.wpsl-dots-indicator span { width: 9px; height: 9px; background: #e0e0e0; border-radius: 50%; display: block; }
.wpsl-dots-indicator span.active { background: #1976d2; }

.wpsl-arrow-nav-group { display: flex; gap: 10px; margin-left: auto; }
.wpsl-arrow-btn { width: 42px; height: 42px; border-radius: 50%; border: none; background: #1976d2; color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.wpsl-arrow-btn:hover { background: #1565c0; }
.wpsl-arrow-btn:disabled { background: #e0e0e0; color: #9e9e9e; cursor: not-allowed; box-shadow: none; }
.wpsl-arrow-btn .dashicons { font-size: 20px; width: 20px; height: 20px; }

.final-mode .wpsl-arrow-nav-group, .final-mode .wpsl-dots-indicator { display: none !important; }