/* ============================================================
   quiz_ui.css —— 通用弹窗（替代浏览器原生 alert / confirm）
   配套：static/js/quiz_ui.js
   用法（JS 会自动注入 DOM，无需页面内写任何标签）：
       quizAlert('正文')
       quizAlert('正文', {title:'标题', icon:'⚠️', okText:'知道了', detail:'次要说明'})
       quizConfirm('确定删除？', {onOk: fn, onCancel: fn})
   ============================================================ */

.quiz-ui-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.quiz-ui-mask.quiz-ui-show { display: flex; }

.quiz-ui-box {
    background: #fff;
    border-radius: 12px;
    max-width: 460px;
    width: 88%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    overflow: hidden;
    font-family: inherit;
    animation: quiz-ui-in .16s ease-out;
}
@keyframes quiz-ui-in {
    from { opacity: 0; transform: translateY(-8px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

.quiz-ui-header {
    padding: 16px 20px;
    background: #1f2937;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.quiz-ui-icon { flex: 0 0 auto; }
.quiz-ui-title { flex: 1 1 auto; }

.quiz-ui-body {
    padding: 22px 20px;
    font-size: 15px;
    line-height: 1.75;
    color: #333;
    white-space: pre-line;
    text-align: left;
    max-height: 60vh;
    overflow-y: auto;
}

/* 次要说明（小字、浅色，用于补充原因/下一步） */
.quiz-ui-detail {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
    font-size: 13.5px;
    line-height: 1.7;
    color: #6b7280;
    white-space: pre-line;
}

.quiz-ui-footer {
    padding: 0 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.quiz-ui-btn {
    padding: 9px 26px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
    transition: filter .15s;
}
.quiz-ui-btn:hover { filter: brightness(1.12); }
.quiz-ui-btn:active { filter: brightness(.94); }

.quiz-ui-btn-ok    { background: #1f2937; color: #fff; }
.quiz-ui-btn-gray  { background: #e5e7eb; color: #374151; }
.quiz-ui-btn-danger{ background: #dc2626; color: #fff; }
