/**
 * DPSSIM Achievers / Interhouse Competition frontend styles.
 * Scoped to .dpssim-scope; per-competition colours arrive as CSS vars.
 */
.dpssim-scope .dpssim-ach { margin: 0 0 42px; }
.dpssim-scope .dpssim-ach:last-child { margin-bottom: 0; }
.dpssim-scope .dpssim-ach * { box-sizing: border-box; }

.dpssim-scope .dpssim-ach-head {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--dps-headbg, #0D2A6B);
	color: var(--dps-headtext, #fff);
	border-radius: 16px;
	padding: 18px 22px;
	margin-bottom: 22px;
	box-shadow: 0 14px 30px rgba(13,30,90,.16);
}
.dpssim-scope .dpssim-ach-head-icon {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,.14);
	color: var(--dps-accent, #F5B400);
}
.dpssim-scope .dpssim-ach-head-icon svg { width: 24px; height: 24px; }
.dpssim-scope .dpssim-ach-title { margin: 0; font-size: 22px; line-height: 1.25; color: var(--dps-headtext, #fff); font-weight: 800; }
.dpssim-scope .dpssim-ach-subtitle { margin: 4px 0 0; font-size: 14px; opacity: .86; color: var(--dps-headtext, #fff); }

.dpssim-scope .dpssim-ach-slider { position: relative; display: flex; align-items: center; gap: 12px; }
.dpssim-scope .dpssim-ach-viewport { overflow: hidden; flex: 1 1 auto; padding: 4px 2px 18px; }
.dpssim-scope .dpssim-ach-track { display: flex; gap: 20px; transition: transform .4s ease; will-change: transform; align-items: stretch; }

.dpssim-scope .dpssim-ach-card {
	position: relative;
	flex: 0 0 calc((100% - (var(--dps-pv, var(--dps-desktop, 4)) - 1) * 20px) / var(--dps-pv, var(--dps-desktop, 4)));
	min-width: 0;
	background: var(--dps-cardbg, #3a2ea3);
	border: 1px solid var(--dps-cardborder, #2a238f);
	border-radius: 20px;
	box-shadow: 0 16px 34px rgba(13,30,90,.14);
	padding: 14px;
	display: flex;
	flex-direction: column;
	text-align: center;
	transition: transform .25s ease, box-shadow .25s ease;
	overflow: hidden;
}
.dpssim-scope .dpssim-ach-card:before {
	content: "";
	position: absolute;
	right: -46px;
	top: -46px;
	width: 130px;
	height: 130px;
	border-radius: 50%;
	background: rgba(255,255,255,.10);
	pointer-events: none;
}
.dpssim-scope .dpssim-ach-card:hover { transform: translateY(-4px); box-shadow: 0 22px 42px rgba(13,30,90,.22); }
.dpssim-scope .dpssim-ach-card-media {
	position: relative;
	z-index: 1;
	width: 100%;
	aspect-ratio: 4 / 5;
	border-radius: 16px;
	overflow: hidden;
	background: rgba(255,255,255,.16);
	box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}
.dpssim-scope .dpssim-ach-card-media img,
.dpssim-scope .dpssim-ach-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dpssim-scope .dpssim-ach-card-body { position: relative; z-index: 2; min-height: 82px; padding: 28px 6px 8px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 5px; }
.dpssim-scope .dpssim-ach-name { margin: 0; color: var(--dps-card-name, var(--dps-name, #fff)); font-size: 18px; line-height: 1.2; font-weight: 900; text-transform: uppercase; letter-spacing: 0; }
.dpssim-scope .dpssim-ach-class,
.dpssim-scope .dpssim-ach-meta { margin: 0; color: var(--dps-card-class, var(--dps-class, #EAF0FF)); font-size: 13px; font-weight: 800; line-height: 1.35; }
.dpssim-scope .dpssim-ach-meta { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; }
.dpssim-scope .dpssim-ach-meta span { display: block; max-width: 100%; overflow-wrap: anywhere; }
.dpssim-scope .dpssim-ach-position-text { color: var(--dps-card-name, var(--dps-name, #fff)); }
.dpssim-scope .dpssim-ach-caption { margin: 0 0 10px; color: var(--dps-card-class, var(--dps-class, #EAF0FF)); font-size: 13px; font-weight: 700; }

.dpssim-scope .dpssim-ach-medal {
	position: relative;
	z-index: 3;
	align-self: center;
	width: 72px;
	min-height: 72px;
	margin: -32px auto 0;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	color: #0d1e5a;
	font-size: 14px;
	font-weight: 900;
	line-height: 1.05;
	text-align: center;
	box-shadow: 0 12px 26px rgba(0,0,0,.22);
}
.dpssim-scope .dpssim-ach-medal:before { content: ""; position: absolute; inset: 8px; border-radius: 50%; border: 2px solid rgba(255,255,255,.74); }
.dpssim-scope .dpssim-ach-medal span { position: relative; z-index: 1; }
.dpssim-scope .dpssim-ach-medal-gold { background: linear-gradient(145deg, #fff4a7, var(--dps-card-badge, #F5B400) 58%, #c98700); }
.dpssim-scope .dpssim-ach-medal-silver { background: linear-gradient(145deg, #fff, #cfd6df 58%, #8f99a8); }
.dpssim-scope .dpssim-ach-medal-bronze { background: linear-gradient(145deg, #ffd3a1, #c97932 58%, #7d421e); color: #fff; }
.dpssim-scope .dpssim-ach-medal-generic { background: linear-gradient(145deg, #fff4a7, var(--dps-card-badge, #F5B400)); }

.dpssim-scope .dpssim-ach-card-group { padding: 16px; }
.dpssim-scope .dpssim-ach-group-title { position: relative; z-index: 2; margin: 2px 0 8px; color: var(--dps-card-name, #fff); font-size: 17px; line-height: 1.25; font-weight: 900; text-transform: uppercase; }
.dpssim-scope .dpssim-ach-card-group .dpssim-ach-medal { margin-top: 12px; }
.dpssim-scope .dpssim-ach-group-photo { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dpssim-scope .dpssim-ach-group-photo .dpssim-ach-card-media { width: 100%; }
.dpssim-scope .dpssim-ach-student-slider { position: relative; z-index: 2; display: grid; grid-template-columns: 34px 1fr 34px; gap: 8px; align-items: center; }
.dpssim-scope .dpssim-ach-student-viewport { overflow: hidden; min-width: 0; }
.dpssim-scope .dpssim-ach-student-track { display: flex; transition: transform .32s ease; will-change: transform; }
.dpssim-scope .dpssim-ach-student-slide { flex: 0 0 100%; min-width: 100%; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.dpssim-scope .dpssim-ach-student-slide .dpssim-ach-card-media { max-width: 100%; }
.dpssim-scope .dpssim-ach-student-slide .dpssim-ach-name { margin-top: 4px; }
.dpssim-scope .dpssim-ach-student-arrow {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,.38);
	background: rgba(255,255,255,.16);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}
.dpssim-scope .dpssim-ach-student-arrow:hover { background: var(--dps-card-accent, #F5B400); color: #0d1e5a; }
.dpssim-scope .dpssim-ach-student-arrow[disabled] { opacity: .35; cursor: default; }
.dpssim-scope .dpssim-ach-student-list { position: relative; z-index: 2; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.18); display: grid; gap: 4px; color: var(--dps-card-class, #EAF0FF); font-size: 12.5px; }
.dpssim-scope .dpssim-ach-student-list strong { color: var(--dps-card-name, #fff); text-transform: uppercase; font-size: 12px; }

.dpssim-scope .dpssim-ach-arrow {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 2px solid var(--dps-accent, #F5B400);
	background: #fff;
	color: #0d2a6b;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all .25s ease;
}
.dpssim-scope .dpssim-ach-arrow:hover { background: var(--dps-accent, #F5B400); color: #0d2a6b; }
.dpssim-scope .dpssim-ach-arrow:focus-visible,
.dpssim-scope .dpssim-ach-student-arrow:focus-visible { outline: 3px solid var(--dps-headbg, #0D2A6B); outline-offset: 2px; }
.dpssim-scope .dpssim-ach-arrow[disabled] { opacity: .35; cursor: default; }
.dpssim-scope .dpssim-ach-arrow svg { width: 22px; height: 22px; }
.dpssim-scope .dpssim-ach-slider.is-static .dpssim-ach-arrow { display: none; }
.dpssim-scope .dpssim-ach-student-slider.is-static .dpssim-ach-student-arrow { visibility: hidden; }
.dpssim-scope .dpssim-ach-static .dpssim-ach-track { flex-wrap: wrap; transform: none !important; }

@media (max-width: 1024px) {
	.dpssim-scope .dpssim-ach-card { flex-basis: calc((100% - (var(--dps-pv, var(--dps-tablet, 3)) - 1) * 20px) / var(--dps-pv, var(--dps-tablet, 3))); }
	.dpssim-scope .dpssim-ach-title { font-size: 20px; }
}
@media (max-width: 600px) {
	.dpssim-scope .dpssim-ach-card { flex-basis: calc((100% - (var(--dps-pv, var(--dps-mobile, 1)) - 1) * 20px) / var(--dps-pv, var(--dps-mobile, 1))); }
	.dpssim-scope .dpssim-ach-head { padding: 14px 16px; border-radius: 12px; }
	.dpssim-scope .dpssim-ach-arrow { width: 40px; height: 40px; }
	.dpssim-scope .dpssim-ach-slider { gap: 6px; }
}
