/* ==========================================================
   前台「随机一题」：只随机弹出的答题面板，无常驻入口
   - 颜色全部走 fragments.html 的主题变量，三套主题自动适配
   - 面板内容由 quiz-random.js 动态渲染
   ========================================================== */

/* 弹层：固定高度 + 题目区滚动 + 底部固定操作栏 */
.layui-layer.rq-layer {
	background: var(--q-card);
	color: var(--q-text);
	border-radius: 12px;
	overflow: hidden;
}

.layui-layer.rq-layer .layui-layer-title {
	height: 44px;
	line-height: 44px;
	padding: 0 44px 0 16px;
	background: var(--q-card);
	color: var(--q-text);
	border-bottom: 1px solid var(--q-line);
	font-size: 15px;
	font-weight: bold;
}

.layui-layer.rq-layer .layui-layer-setwin {
	top: 14px;
	right: 12px;
}

/* 标题栏「不启用」：灰色、不显眼，仅停用随机弹题 */
.rq-disable-tag {
	float: right;
	margin-right: 4px;
	position: relative;
	z-index: 2;
	font-size: 12px;
	font-weight: normal;
	line-height: 44px;
	color: var(--q-muted);
	opacity: .55;
	cursor: pointer;
	user-select: none;
}

.rq-disable-tag:hover {
	opacity: .9;
}

.layui-layer.rq-layer .layui-layer-content {
	height: calc(100% - 44px) !important;
	padding: 0 !important;
	overflow: hidden !important;
}

.rq-body {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	padding: 0;
	color: var(--q-text);
	box-sizing: border-box;
}

.rq-scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 14px 16px 10px;
	-webkit-overflow-scrolling: touch;
}

.rq-footer {
	flex: 0 0 auto;
	padding: 10px 16px 14px;
	border-top: 1px solid var(--q-line);
	background: var(--q-card);
}

.rq-footer .btn {
	height: 42px;
	font-size: 15px;
}

.rq-footer .rq-tip {
	margin-top: 8px;
	text-align: center;
}

.rq-loading {
	padding: 40px 0;
	text-align: center;
	font-size: 13px;
	color: var(--q-muted);
}

.rq-meta {
	margin-bottom: 8px;
}

.rq-meta .label {
	font-weight: normal;
}

.rq-title {
	font-size: 15px;
	font-weight: bold;
	line-height: 1.6;
	word-break: break-word;
}

.rq-media {
	margin: 8px 0;
}

.rq-media img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 8px auto;
	border: 1px solid var(--q-line);
	border-radius: 6px;
}

.rq-media video {
	width: 100%;
	max-width: 100%;
	max-height: 220px;
	background: #000;
	border-radius: 6px;
}

.rq-media audio {
	width: 100%;
	max-width: 100%;
}

.rq-options {
	margin-top: 12px;
}

/* 选项复用 fragments.html 的 .opt-label 外观，这里放大点击区域并补内容换行 */
.rq-options .opt-label {
	padding: 13px 12px;
	font-size: 15px;
	word-break: break-word;
}

.rq-options .rq-opt-media img {
	max-width: 200px;
	max-height: 140px;
	border: 1px solid var(--q-line);
	border-radius: 6px;
	margin-top: 6px;
}

.rq-options .rq-opt-media video {
	max-width: 240px;
	max-height: 160px;
	background: #000;
	border-radius: 6px;
	margin-top: 6px;
}

.rq-options .rq-opt-media audio {
	width: 100%;
	max-width: 260px;
	margin-top: 6px;
}

.rq-submit {
	margin-top: 10px;
}

.rq-tip {
	margin-top: 10px;
	font-size: 12px;
	line-height: 1.6;
	color: var(--q-muted);
}

/* 判分结果：展示 2 秒后自动关闭 */
.rq-result {
	padding: 12px 4px 6px;
	text-align: center;
}

.rq-result > i {
	font-size: 46px;
	line-height: 1;
}

.rq-result-ok > i {
	color: var(--q-ok);
}

.rq-result-bad > i {
	color: #f5222d;
}

.rq-result-title {
	margin-top: 10px;
	font-size: 17px;
	font-weight: bold;
}

.rq-result-ok .rq-result-title {
	color: var(--q-ok);
}

.rq-result-bad .rq-result-title {
	color: #f5222d;
}

.rq-reward {
	margin-top: 12px;
	font-size: 14px;
	line-height: 1.8;
}

.rq-reward .rq-food {
	color: var(--q-primary);
	font-weight: bold;
}

.rq-answer {
	margin-top: 10px;
	padding: 8px 10px;
	border-radius: 6px;
	background: var(--q-opt-checked-bg);
	font-size: 13px;
	line-height: 1.7;
	color: var(--q-text);
	word-break: break-word;
}

.rq-result .rq-tip {
	margin-top: 12px;
}
