/* MAD Calculadora Oposiciones — Public styles
   Basado en la estructura del ejemplo de referencia */

/* ── Wrap ── */
.mco-wrap {
	font-family: 'Montserrat', system-ui, sans-serif;
	font-size: 14px;
	color: #111827;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.mc-body {
	max-width: 800px;
	margin: 0 auto;
}

/* ── Error ── */
.mco-error {
	padding: 12px 16px;
	background: #fff1f0;
	border: 1px solid #ffa39e;
	border-radius: 6px;
	color: #cf1322;
}

/* ── Texto introductorio ── */
.mc-intro {
	background: #F8FAFC;
	border-left: 3px solid #2563EB;
	border-radius: 0 8px 8px 0;
	padding: 12px 16px;
	margin-bottom: 22px;
	font-size: 14px;
	color: #374151;
	line-height: 1.65;
}

/* ── Etiqueta de sección ── */
.mc-label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #6B7280;
	margin: 0 0 10px;
}

/* ── Turnos ── */
.mc-turnos {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 28px;
}

.mc-turno {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 10px 16px;
	background: #F8FAFC;
	border: 2px solid #E2E8F0;
	border-radius: 10px;
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #374151;
	text-align: left;
	transition: border-color .18s, background .18s, color .18s;
}

.mc-turno:hover {
	border-color: #93C5FD;
}

.mc-turno.on {
	border-color: #2563EB;
	background: #EFF6FF;
	color: #1D4ED8;
}

.mc-turno small {
	font-weight: 400;
	font-size: 11px;
	color: #6B7280;
}

.mc-turno.on small {
	color: #3B82F6;
}

/* ── Partes ── */
.mc-partes {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-bottom: 28px;
}

/* ── Layout horizontal de partes ── */
.mc-partes--horizontal {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: flex-start;
}

.mc-partes--horizontal .mc-card {
	flex: 1 1 300px;
	min-width: 280px;
}

/* ── Layout vertical de partes (por defecto histórico) ── */
.mc-partes--vertical {
	flex-direction: column;
}

/* ── Tarjeta de parte ── */
.mc-card {
	background: #fff;
	border: 1px solid #E2E8F0;
	border-radius: 14px;
	padding: 20px 22px;
	box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.mc-card-hd {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 18px;
	gap: 12px;
}

.mc-card-hd h2 {
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 4px;
	color: #111827;
}

.mc-meta {
	font-size: 12px;
	color: #6B7280;
}

.mc-tipo {
	display: inline-block;
	padding: 3px 10px;
	background: #F1F5F9;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
	color: #475569;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ── Entrada ── */
.mc-entrada {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.mc-campo {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mc-campo label {
	font-size: 11px;
	font-weight: 600;
	color: #374151;
	letter-spacing: .03em;
}

.mc-campo input[type="number"] {
	width: 90px;
	padding: 8px 10px;
	font-family: inherit;
	font-size: 22px;
	font-weight: 700;
	color: #111827;
	background: #F8FAFC;
	border: 1.5px solid #CBD5E1;
	border-radius: 8px;
	outline: none;
	transition: border-color .18s;
	-moz-appearance: textfield;
}

.mc-campo input[type="number"]::-webkit-inner-spin-button,
.mc-campo input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
}

.mc-campo input[type="number"]:focus {
	border-color: #2563EB;
}

.mc-campo small {
	font-size: 11px;
	color: #9CA3AF;
}

.mc-campo-err {
	display: none;
	font-size: 11px;
	color: #DC2626;
	font-weight: 600;
	margin-top: 2px;
}

.mc-input-err {
	border-color: #EF4444 !important;
	background: #FFF5F5 !important;
}

.mc-sum-err {
	display: none;
	font-size: 12px;
	color: #DC2626;
	font-weight: 600;
	background: #FEF2F2;
	border: 1px solid #FECACA;
	border-radius: 6px;
	padding: 6px 12px;
	margin-bottom: 12px;
}

/* ── Barra distribución ── */
.mc-stack {
	display: flex;
	height: 8px;
	background: #E2E8F0;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 6px;
}

.mc-s-a {
	background: #10B981;
	height: 100%;
	transition: width .4s cubic-bezier(.4,0,.2,1);
}

.mc-s-e {
	background: #EF4444;
	height: 100%;
	transition: width .4s cubic-bezier(.4,0,.2,1);
}

.mc-stack-leg {
	display: flex;
	gap: 14px;
	font-size: 11px;
	color: #6B7280;
	margin-bottom: 18px;
	flex-wrap: wrap;
}

.mc-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: 4px;
	vertical-align: middle;
}

/* ── Gauge + números ── */
.mc-gaugebox {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 18px;
	flex-wrap: wrap;
}

.mc-gauge {
	position: relative;
	width: 160px;
	flex-shrink: 0;
}

.mc-gauge svg {
	width: 100%;
}

.mc-arc-val {
	transition: stroke-dashoffset .5s cubic-bezier(.4,0,.2,1), stroke .3s;
}

.mc-val {
	position: absolute;
	bottom: 4px;
	left: 0;
	right: 0;
	text-align: center;
}

.mc-val span {
	display: block;
	font-size: 24px;
	font-weight: 700;
	color: #111827;
	line-height: 1;
}

.mc-val small {
	font-size: 10px;
	font-weight: 600;
	color: #9CA3AF;
	letter-spacing: .06em;
}

.mc-nums {
	flex: 1;
	min-width: 160px;
}

.mc-num-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 0;
	border-bottom: 1px solid #F1F5F9;
	font-size: 13px;
	gap: 12px;
}

.mc-num-row span {
	color: #6B7280;
}

.mc-num-row b {
	font-weight: 700;
	color: #111827;
}

.mc-pbadge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
}

.mc-pbadge.ok {
	background: #ECFDF5;
	color: #059669;
}

.mc-pbadge.ko {
	background: #FEF2F2;
	color: #DC2626;
}

/* ── Hint ── */
.mc-hint {
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
	margin-bottom: 18px;
	line-height: 1.5;
}

.mc-hint.ok {
	background: #ECFDF5;
	color: #065F46;
	border-left: 3px solid #10B981;
}

.mc-hint.ko {
	background: #FFF7ED;
	color: #92400E;
	border-left: 3px solid #F59E0B;
}

/* ── Curva SVG ── */
.mc-curve {
	margin-top: 4px;
}

.mc-curve svg {
	width: 100%;
	height: auto;
	display: block;
}

.mc-curve-cap {
	font-size: 11px;
	color: #9CA3AF;
	text-align: center;
	margin: 6px 0 0;
}

/* ── Total ── */
.mc-total {
	display: flex;
	align-items: center;
	gap: 24px;
	background: #fff;
	border: 1px solid #E2E8F0;
	border-radius: 14px;
	padding: 22px 24px;
	margin-bottom: 22px;
	box-shadow: 0 1px 4px rgba(0,0,0,.06);
	flex-wrap: wrap;
}

/* Anillo total */
.mc-score-circle {
	position: relative;
	width: 120px;
	height: 120px;
	flex-shrink: 0;
}

.mc-ring-svg {
	width: 120px;
	height: 120px;
}

.mc-ring-inner {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0;
}

.mc-score-circle circle:last-child {
	transition: stroke-dashoffset .5s cubic-bezier(.4,0,.2,1), stroke .3s;
}

.mc-big {
	font-size: 26px;
	font-weight: 800;
	color: #111827;
	line-height: 1;
}

.mc-big-lbl {
	font-size: 10px;
	font-weight: 600;
	color: #9CA3AF;
	letter-spacing: .04em;
}

/* Veredicto */
.mc-verdict {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mc-vchip {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	align-self: flex-start;
}

.mc-vchip.ok {
	background: #ECFDF5;
	color: #059669;
}

.mc-vchip.ko {
	background: #FEF2F2;
	color: #DC2626;
}

.mc-verdict h3 {
	font-size: 17px;
	font-weight: 700;
	margin: 0;
	color: #111827;
}

.mc-verdict p {
	font-size: 13px;
	color: #6B7280;
	margin: 0;
}

/* ── Ranking ── */
.mc-ranking-panel {
	background: #F0F9FF;
	border: 1px solid #BAE6FD;
	border-radius: 14px;
	padding: 20px 24px;
	margin-bottom: 22px;
}

.mc-ranking-msg {
	font-size: 14px;
	font-weight: 600;
	color: #0369A1;
	margin: 0 0 16px;
}

.mc-ranking-btns {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.mc-rk-yes {
	background: #2563EB;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 10px 20px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background .18s;
}

.mc-rk-yes:hover {
	background: #1D4ED8;
}

.mc-rk-yes:disabled {
	opacity: .5;
	cursor: default;
}

.mc-rk-no {
	background: transparent;
	border: 1.5px solid #CBD5E1;
	border-radius: 8px;
	padding: 10px 20px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #6B7280;
	cursor: pointer;
	transition: border-color .18s, color .18s;
}

.mc-rk-no:hover {
	border-color: #94A3B8;
	color: #374151;
}

.mc-rk-no:disabled {
	opacity: .5;
	cursor: default;
}

.mc-ranking-status {
	margin: 12px 0 0;
	font-size: 13px;
	font-weight: 600;
	min-height: 1.2em;
}

.mc-ranking-status.ok { color: #059669; }
.mc-ranking-status.ko { color: #DC2626; }

/* ── Clasificación pública ── */
.mco-wrap .mc-ranking-list {
	background: #fff;
	border: 1px solid #E2E8F0;
	border-radius: 14px;
	padding: 20px 22px;
	margin-bottom: 22px;
	box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.mco-wrap .mc-rkl-hd {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
	gap: 8px;
}

.mco-wrap .mc-rkl-hd h3 {
	font-size: 15px;
	font-weight: 700;
	color: #111827;
	margin: 0;
	padding: 0;
	border: none;
}

.mco-wrap .mc-rkl-count {
	font-size: 11px;
	font-weight: 600;
	color: #6B7280;
	background: #F1F5F9;
	border-radius: 20px;
	padding: 3px 10px;
	white-space: nowrap;
}

.mco-wrap .mc-rkl-ol {
	display: flex;
	flex-direction: column;
	gap: 6px;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.mco-wrap .mc-rkl-item {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	padding: 10px 14px;
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.mco-wrap .mc-rkl-item:first-child {
	border-color: #FCD34D;
	background: #FFFBEB;
}

.mco-wrap .mc-rkl-item:nth-child(2) {
	border-color: #CBD5E1;
	background: #F8FAFC;
}

.mco-wrap .mc-rkl-item:nth-child(3) {
	border-color: #D97706;
	background: #FFFAF0;
}

.mco-wrap .mc-rkl-pos {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #E2E8F0;
	color: #475569;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.mco-wrap .mc-rkl-item:first-child .mc-rkl-pos {
	background: #FCD34D;
	color: #78350F;
}

.mco-wrap .mc-rkl-item:nth-child(2) .mc-rkl-pos {
	background: #CBD5E1;
	color: #334155;
}

.mco-wrap .mc-rkl-item:nth-child(3) .mc-rkl-pos {
	background: #D97706;
	color: #fff;
}

.mco-wrap .mc-rkl-email {
	flex: 1;
	font-size: 13px;
	color: #374151;
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mco-wrap .mc-rkl-score {
	font-size: 14px;
	font-weight: 700;
	color: #111827;
	white-space: nowrap;
}

.mco-wrap .mc-rkl-score small {
	font-size: 11px;
	font-weight: 400;
	color: #9CA3AF;
}

.mco-wrap .mc-rkl-empty {
	font-size: 13px;
	color: #9CA3AF;
	text-align: center;
	padding: 16px 0;
	margin: 0;
}

/* ── Pie ── */
.mc-footer {
	background: #F8FAFC;
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	padding: 14px 18px;
	font-size: 12px;
	color: #64748B;
	line-height: 1.6;
}

.mc-footer a {
	color: #2563EB;
	text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 540px) {
	.mc-gaugebox {
		flex-direction: column;
		align-items: flex-start;
	}
	.mc-gauge {
		width: 140px;
	}
	.mc-total {
		flex-direction: column;
		align-items: flex-start;
	}
	.mc-card {
		padding: 16px 14px;
	}
	.mc-partes--horizontal {
		flex-direction: column;
	}
	.mc-partes--horizontal .mc-card {
		flex: none;
		min-width: 0;
	}
}
