/*
 * 선택과목 통합형 채점 가능 상태 - 모바일 우선 / 최소 공간
 * -----------------------------------------------------------------------------
 * - 별도 현황판은 숨김.
 * - 선택과목 제목 우측에 요약 1줄만 표시.
 * - 완전 등록된 과목만 선택 가능.
 * - 등록 중/준비 중 과목은 선택 모달에서 disabled 처리.
 */

#scoreReadyPanel,
.score-ready-modal {
	display: none !important;
}

.smart-subject-card > .smart-section-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.subject-score-mini {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
	min-width: 0;
}

.subject-score-mini-text {
	display: inline-flex;
	align-items: center;
	height: 22px;
	padding: 0 7px;
	border-radius: 999px;
	background: #f8fafc;
	color: #64748b;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: -0.03em;
	white-space: nowrap;
}

.subject-score-mini.is-ready .subject-score-mini-text {
	background: #f0fdf4;
	color: #15803d;
}

.subject-score-mini.is-waiting .subject-score-mini-text {
	background: #fff7ed;
	color: #c2410c;
}

.subject-score-mini.is-error .subject-score-mini-text {
	background: #fff7ed;
	color: #b45309;
}

.subject-score-refresh {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 1px solid #e2e8f0;
	border-radius: 50%;
	background: #fff;
	color: #64748b;
	font-size: 15px;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.subject-score-refresh:active {
	background: #f8fafc;
	transform: scale(.96);
}

.subject-select-row.has-score-state {
	position: relative;
	padding-right: 14px;
	transition: border-color .15s ease, background .15s ease, opacity .15s ease;
}

.subject-score-dot {
	position: absolute;
	top: 5px;
	right: 5px;
	display: block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #cbd5e1;
}

.subject-select-row.is-score-ready {
	border-color: #bbf7d0;
}
.subject-select-row.is-score-ready .subject-score-dot {
	background: #22c55e;
}

.subject-select-row.is-score-progress {
	border-color: #fde68a;
	background: #fffdf5;
}
.subject-select-row.is-score-progress .subject-score-dot {
	background: #f59e0b;
}

.subject-select-row.is-score-waiting {
	border-color: #e2e8f0;
	background: #f8fafc;
}
.subject-select-row.is-score-waiting .subject-score-dot {
	background: #cbd5e1;
}

.subject-select-row.is-score-neutral .subject-score-dot {
	background: #94a3b8;
}

.subject-select-row:disabled {
	opacity: .52;
	cursor: not-allowed;
	transform: none !important;
}

/* 선택 모달: 상태 배지만 추가하고 기존 레이아웃은 유지함. */
.subject-modal-option {
	position: relative;
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 7px;
	text-align: left;
}

.subject-modal-score-state {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-width: 34px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	font-size: 9px;
	font-weight: 900;
	line-height: 1;
	white-space: nowrap;
}

.subject-modal-score-state::before {
	content: "";
	width: 5px;
	height: 5px;
	margin-right: 3px;
	border-radius: 50%;
	background: currentColor;
}

.subject-modal-score-state.is-ready {
	background: #f0fdf4;
	color: #15803d;
}

.subject-modal-score-state.is-progress {
	background: #fffbeb;
	color: #b45309;
}

.subject-modal-score-state.is-waiting {
	background: #f1f5f9;
	color: #64748b;
}

.subject-modal-score-state.is-skip {
	background: #f8fafc;
	color: #64748b;
}

.subject-modal-score-state.is-duplicate {
	background: #f1f5f9;
	color: #94a3b8;
}

.subject-modal-option.is-score-ready-option:not(.is-selected):not(:disabled) {
	border-color: #dcfce7;
}

.subject-modal-option.is-score-progress-option,
.subject-modal-option.is-score-waiting-option {
	background: #f8fafc;
	color: #94a3b8;
}

.subject-modal-option:disabled {
	opacity: .62;
	cursor: not-allowed;
}

.subject-modal-option:disabled .subject-modal-score-state {
	opacity: 1;
}

.smart-exam-auto-box.is-exam-locked {
	cursor: default;
}
.smart-exam-auto-box.is-exam-locked:hover {
	border-color: #dbeafe;
	background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%);
}
.smart-exam-auto-box.is-exam-locked:active {
	transform: none;
}

@media (max-width: 390px) {
	.subject-score-mini {
		gap: 3px;
	}

	.subject-score-mini-text {
		height: 20px;
		padding: 0 6px;
		font-size: 9px;
	}

	.subject-score-refresh {
		width: 24px;
		height: 24px;
		font-size: 14px;
	}

	.subject-select-row.has-score-state {
		padding-right: 11px;
	}

	.subject-score-dot {
		top: 4px;
		right: 4px;
		width: 6px;
		height: 6px;
	}
}

.subject-score-refresh:disabled {
	opacity: .45;
	cursor: default;
	transform: none;
}
