/* Medals Database – front end */

.mdb-bar {
	--mdb-rw: 52px;
	--mdb-rh: 15px;
	--mdb-mw: 76px;
	--mdb-gap: 2px;
	display: block;
	margin: 1em 0;
	line-height: 1;
	text-align: left;
}
.mdb-size--small  { --mdb-rw: 36px; --mdb-rh: 10px; --mdb-mw: 50px; }
.mdb-size--medium { --mdb-rw: 52px; --mdb-rh: 15px; --mdb-mw: 76px; }
.mdb-size--large  { --mdb-rw: 78px; --mdb-rh: 22px; --mdb-mw: 112px; --mdb-gap: 3px; }

.mdb-align--center { text-align: center; }
.mdb-align--right  { text-align: right; }

/* Reset theme button styles (Divi and others style every button). */
.mdb-bar button.mdb-item {
	all: unset;
	box-sizing: border-box;
	display: block;
	position: relative;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: transform .15s ease, filter .15s ease;
}
.mdb-bar button.mdb-item:hover { transform: translateY(-2px); }
.mdb-bar button.mdb-item:focus-visible {
	outline: 2px solid #1a4d8f;
	outline-offset: 3px;
	border-radius: 2px;
}

/* ---------- Ribbon ---------- */
.mdb-ribbon {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8%;
	width: var(--mdb-rw);
	height: var(--mdb-rh);
	background: var(--mdb-ribbon, #b9b9b9);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16);
	overflow: hidden;
}
/* Woven texture and a soft sheen so stripes read as fabric. */
.mdb-ribbon::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .12) 100%),
		repeating-linear-gradient(90deg, rgba(0, 0, 0, .05) 0 1px, rgba(255, 255, 255, .04) 1px 2px);
}
.mdb-ribbon--blank {
	background: repeating-linear-gradient(-45deg, #d6d6d6 0 4px, #c4c4c4 4px 8px);
}
.mdb-emblem {
	position: relative;
	z-index: 1;
	height: 74%;
	width: auto;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35));
}
.mdb-emblem--leaf { height: 80%; }

/* ---------- Ribbon bar (rack) ---------- */
.mdb-rack {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: var(--mdb-gap);
	max-width: 100%;
	vertical-align: top;
}
.mdb-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--mdb-gap);
}

/* ---------- Medal group ---------- */
.mdb-group {
	display: inline-grid;
	grid-template-columns: repeat(var(--mdb-n, 1), minmax(0, var(--mdb-mw)));
	gap: 6px;
	align-items: start;
	max-width: 100%;
	vertical-align: top;
}
.mdb-bar--medals button.mdb-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 0;
}
.mdb-bar--medals button.mdb-item:hover { transform: translateY(-3px); }
.mdb-drape {
	width: 84%;
	height: auto;
	aspect-ratio: 32 / 34;
	align-items: flex-end;
	padding-bottom: 12%;
	box-sizing: border-box;
}
.mdb-drape .mdb-emblem { height: auto; width: 46%; }
.mdb-drape::before {
	/* Suspender where the medal hangs. */
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 22%;
	height: 6%;
	transform: translateX(-50%);
	background: linear-gradient(#b9a46a, #7d6a39);
	border-radius: 2px 2px 0 0;
	z-index: 1;
}
.mdb-medal-img {
	display: block;
	width: 100%;
	line-height: 0;
}
.mdb-medal-img img {
	display: block;
	width: 100%;
	height: auto;
	max-height: calc(var(--mdb-mw) * 1.35);
	object-fit: contain;
	object-position: top center;
	margin: 0;
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25));
}
.mdb-medal-img--with-ribbon img { max-height: calc(var(--mdb-mw) * 2.4); }
.mdb-medal-img--none span {
	display: block;
	width: 84%;
	margin: 0 auto;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #e9d9a6, #b38f45 55%, #7a5d26);
	box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .12);
}
.mdb-emblem-float {
	position: absolute;
	top: 8%;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 2px;
	width: 34%;
}
.mdb-emblem-float .mdb-emblem { width: 100%; height: auto; }

.mdb-caption {
	margin: .6em 0 0 !important;
	padding: 0 !important;
	font-size: .9em;
	font-style: italic;
	line-height: 1.4;
	opacity: .8;
}

.mdb-admin-note {
	padding: 8px 12px;
	border-left: 4px solid #d63638;
	background: #fcf0f1;
	color: #50575e;
	font-size: 14px;
}

/* ---------- Hover summary ---------- */
.mdb-tip {
	position: fixed;
	z-index: 999990;
	top: 0;
	left: 0;
	box-sizing: border-box;
	width: max-content;
	max-width: min(320px, calc(100vw - 16px));
	padding: 12px 14px;
	border-radius: 8px;
	background: #1f2226;
	color: #f3f0e8;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.45;
	text-align: left;
	pointer-events: none;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity .12s ease, transform .12s ease;
}
.mdb-tip.is-on { opacity: 1; transform: none; }
.mdb-tip-inner { display: flex; gap: 12px; align-items: flex-start; }
.mdb-tip-img {
	flex: 0 0 56px;
	width: 56px;
	height: 72px;
	object-fit: contain;
	margin: 0;
}
.mdb-tip-ribbon {
	flex: 0 0 auto;
	width: 42px;
	height: 12px;
	margin-top: 4px;
}
.mdb-tip-type {
	display: block;
	margin-bottom: 2px;
	font-size: 11px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #c9b37e;
}
.mdb-tip-name { display: block; font-weight: 700; font-size: 15px; color: #fff; }
.mdb-tip-note { display: block; margin-top: 4px; color: #e6cf8f; font-style: italic; }
.mdb-tip-short { display: block; margin-top: 6px; }
.mdb-tip-hint { display: block; margin-top: 8px; font-size: 12px; color: #a9adb3; }

/* ---------- Full description pop-up ---------- */
html.mdb-lock { overflow: hidden; }

.mdb-dialog {
	box-sizing: border-box;
	width: calc(100% - 32px);
	max-width: 820px;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: #fff;
	color: #22252a;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.6;
	overflow: hidden;
}
.mdb-dialog:not([open]) { display: none; }
.mdb-dialog[open] { display: flex; flex-direction: column; }
.mdb-dialog.mdb-fallback[open] { position: fixed; inset: 0; z-index: 999995; }
.mdb-dialog::backdrop { background: rgba(12, 14, 18, .66); }

.mdb-d-close {
	all: unset;
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	color: #22252a;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}
.mdb-d-close:hover { background: #fff; }
.mdb-d-close:focus-visible,
.mdb-d-nav button:focus-visible { outline: 2px solid #1a4d8f; outline-offset: 2px; }

.mdb-d-body {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	min-height: 0;
	flex: 1 1 auto;
	overflow: auto;
}
.mdb-d-media {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 32px 24px;
	background: #f3efe6;
}
.mdb-d-img {
	display: block;
	max-width: 100%;
	max-height: 380px;
	width: auto;
	height: auto;
	margin: 0;
	object-fit: contain;
	filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .2));
}
.mdb-d-noimg {
	width: 140px;
	height: 140px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #e9d9a6, #b38f45 55%, #7a5d26);
	opacity: .35;
}
.mdb-d-ribbon { width: 96px; height: 27px; }
.mdb-d-text { padding: 32px 32px 24px; min-width: 0; }
.mdb-d-type {
	margin: 0 0 6px !important;
	padding: 0 !important;
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #8a6d2c;
	font-weight: 600;
}
.mdb-d-title {
	margin: 0 44px 6px 0 !important;
	padding: 0 !important;
	font-size: 26px !important;
	line-height: 1.2 !important;
	color: #1b1d21;
}
.mdb-d-post { font-weight: 400; color: #6b6f76; }
.mdb-d-meta { margin: 0 0 14px !important; padding: 0 !important; font-size: 14px; color: #6b6f76; }
.mdb-d-meta:empty { display: none; }
.mdb-d-draft {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 8px;
	border-radius: 10px;
	background: #fcf0d0;
	color: #7a5a00;
	font-size: 12px;
}
.mdb-d-note {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-left: 3px solid #b38f45;
	background: #faf7f0;
	font-size: 15px;
}
.mdb-d-note:empty { display: none; }
.mdb-d-note strong { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #8a6d2c; }
.mdb-d-desc > :first-child { margin-top: 0; }
.mdb-d-desc > :last-child { margin-bottom: 0; }
.mdb-d-desc p { margin: 0 0 1em; padding: 0; }

.mdb-d-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	border-top: 1px solid #e7e3da;
	background: #fff;
	font-size: 14px;
	color: #6b6f76;
}
.mdb-d-nav[hidden] { display: none; }
.mdb-d-nav button {
	all: unset;
	padding: 8px 14px;
	border-radius: 6px;
	color: #1a4d8f;
	font-weight: 600;
	cursor: pointer;
}
.mdb-d-nav button:hover { background: #f0f4fa; }
.mdb-d-nav button[disabled] { color: #b8bcc2; cursor: default; background: none; }

@media (max-width: 640px) {
	.mdb-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
	.mdb-d-body { grid-template-columns: 1fr; }
	.mdb-d-media { padding: 24px 16px 16px; }
	.mdb-d-img { max-height: 220px; }
	.mdb-d-text { padding: 20px 20px 16px; }
	.mdb-d-title { font-size: 22px !important; }
}

@media (prefers-reduced-motion: reduce) {
	.mdb-bar button.mdb-item,
	.mdb-tip { transition: none; }
	.mdb-bar button.mdb-item:hover { transform: none; }
}

/* ==========================================================================
   Medal directory [medal_directory]
   ========================================================================== */

.mdb-dir {
	--mdb-dir-accent: #1a4d8f;
	--mdb-dir-brass: #8a6d2c;
	--mdb-dir-paper: #f3efe6;
	--mdb-dir-line: #e2ddd1;
	margin: 1.5em 0;
	font-size: 16px;
	line-height: 1.5;
}
.mdb-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.mdb-dir:not(.is-ready) .mdb-dir-tools,
.mdb-dir:not(.is-ready) .mdb-dir-count { display: none; }

.mdb-dir-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	align-items: center;
	margin-bottom: 14px;
}
.mdb-dir-tools > * { min-width: 0; }
.mdb-dir-search {
	flex: 1 1 320px;
	position: relative;
	color: #6b6f76;
}
.mdb-dir-search svg {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}
.mdb-dir .mdb-dir-search input {
	box-sizing: border-box;
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 14px 0 42px;
	border: 1px solid #cfc9bc;
	border-radius: 8px;
	background: #fff;
	color: #22252a;
	font: inherit;
	font-size: 16px;
	box-shadow: none;
}
.mdb-dir .mdb-dir-search input:focus {
	outline: 2px solid var(--mdb-dir-accent);
	outline-offset: 1px;
	border-color: transparent;
}
.mdb-dir-controls {
	display: flex;
	flex: 0 1 auto;
	align-items: center;
	gap: 12px;
	margin-left: auto;
}
.mdb-dir-sort {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 14px;
	color: #6b6f76;
	white-space: nowrap;
}
.mdb-dir .mdb-dir-sort select {
	height: 46px;
	margin: 0;
	padding: 0 34px 0 12px;
	border: 1px solid #cfc9bc;
	border-radius: 8px;
	background-color: #fff;
	color: #22252a;
	font: inherit;
	font-size: 15px;
}
.mdb-dir-views {
	display: flex;
	padding: 3px;
	border: 1px solid #cfc9bc;
	border-radius: 8px;
	background: #fff;
}
.mdb-dir .mdb-dir-views button {
	all: unset;
	display: flex;
	align-items: center;
	gap: 6px;
	height: 38px;
	padding: 0 12px;
	border-radius: 6px;
	color: #50555c;
	font-size: 14px;
	cursor: pointer;
}
.mdb-dir .mdb-dir-views button:hover { background: #f4f2ec; }
.mdb-dir .mdb-dir-views button[aria-pressed="true"] { background: #22252a; color: #fff; }
.mdb-dir .mdb-dir-views button:focus-visible { outline: 2px solid var(--mdb-dir-accent); outline-offset: 1px; }

.mdb-dir-chips {
	flex: 1 1 100%;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.mdb-dir .mdb-dir-chips button {
	all: unset;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border: 1px solid #cfc9bc;
	border-radius: 999px;
	background: #fff;
	color: #33373d;
	font-size: 14px;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
}
.mdb-dir .mdb-dir-chips button:hover { border-color: #22252a; }
.mdb-dir .mdb-dir-chips button[aria-pressed="true"] { background: #22252a; border-color: #22252a; color: #fff; }
.mdb-dir .mdb-dir-chips button:focus-visible { outline: 2px solid var(--mdb-dir-accent); outline-offset: 2px; }
.mdb-dir .mdb-dir-chips button.is-zero:not([aria-pressed="true"]) { opacity: .45; }
.mdb-chip-n {
	min-width: 1.4em;
	padding: 1px 6px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .07);
	font-size: 12px;
	text-align: center;
}
.mdb-dir-chips button[aria-pressed="true"] .mdb-chip-n { background: rgba(255, 255, 255, .2); }

.mdb-dir-count {
	margin: 0 0 12px !important;
	padding: 0 !important;
	font-size: 14px;
	color: #6b6f76;
}

.mdb-dir-results {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 18px;
}
.mdb-dir[data-cols] .mdb-dir-results { grid-template-columns: repeat(var(--mdb-cols), minmax(0, 1fr)); }
.mdb-dir-results[hidden] { display: none; }

.mdb-dir-group {
	grid-column: 1 / -1;
	margin: 18px 0 -4px !important;
	padding: 0 0 8px !important;
	border-bottom: 1px solid var(--mdb-dir-line);
	font-size: 13px !important;
	line-height: 1.3 !important;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--mdb-dir-brass);
	font-weight: 700;
}
.mdb-dir-group:first-child { margin-top: 0 !important; }
.mdb-dir.is-grouped .mdb-card-type { display: none; }

/* Card (grid view) */
.mdb-dir button.mdb-card {
	all: unset;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid var(--mdb-dir-line);
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	cursor: pointer;
	text-align: left;
	transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.mdb-dir button.mdb-card[hidden] { display: none; }
.mdb-dir button.mdb-card:hover {
	border-color: #cfc5ae;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .09);
	transform: translateY(-2px);
}
.mdb-dir button.mdb-card:focus-visible { outline: 3px solid var(--mdb-dir-accent); outline-offset: 2px; }
.mdb-card-media {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 190px;
	padding: 18px;
	box-sizing: border-box;
	background: var(--mdb-dir-paper);
}
.mdb-card-media img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	margin: 0;
	object-fit: contain;
	filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .18));
}
.mdb-card-noimg {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #e9d9a6, #b38f45 55%, #7a5d26);
	opacity: .3;
}
.mdb-ribbon.mdb-card-ribbon {
	width: 100%;
	height: 12px;
	box-shadow: none;
}
.mdb-card-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 4px;
	padding: 14px 16px 16px;
}
.mdb-card-type {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--mdb-dir-brass);
}
.mdb-card-name {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	color: #1b1d21;
}
.mdb-card-post { font-weight: 400; color: #6b6f76; }
.mdb-card-meta { font-size: 13px; color: #6b6f76; }
.mdb-card-short {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-top: 4px;
	font-size: 14px;
	color: #44484f;
}
.mdb-card-more {
	margin-top: auto;
	padding-top: 10px;
	font-size: 14px;
	font-weight: 600;
	color: var(--mdb-dir-accent);
}

/* List view */
.mdb-dir--list .mdb-dir-results { grid-template-columns: 1fr !important; gap: 0; }
.mdb-dir--list .mdb-dir-group { margin-top: 22px !important; margin-bottom: 4px !important; }
.mdb-dir--list button.mdb-card {
	flex-direction: row;
	align-items: center;
	gap: 16px;
	padding: 12px 8px;
	border: 0;
	border-bottom: 1px solid var(--mdb-dir-line);
	border-radius: 0;
	background: transparent;
}
.mdb-dir--list button.mdb-card:hover { transform: none; box-shadow: none; background: #faf8f3; }
.mdb-dir--list .mdb-card-media { flex: 0 0 64px; height: 64px; padding: 4px; border-radius: 6px; order: 1; }
.mdb-dir--list .mdb-card-noimg { width: 40px; height: 40px; }
.mdb-dir--list .mdb-ribbon.mdb-card-ribbon { flex: 0 0 56px; width: 56px; height: 16px; order: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.mdb-dir--list .mdb-card-body { order: 2; padding: 0; gap: 2px; }
.mdb-dir--list .mdb-card-name { font-size: 16px; }
.mdb-dir--list .mdb-card-short { -webkit-line-clamp: 2; margin-top: 0; }
.mdb-dir--list .mdb-card-more { display: none; }

/* Ribbon chart view */
.mdb-dir--ribbons .mdb-dir-results { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px 12px; }
.mdb-dir--ribbons button.mdb-card {
	align-items: center;
	gap: 8px;
	padding: 12px 8px;
	border-color: transparent;
	background: transparent;
	text-align: center;
}
.mdb-dir--ribbons button.mdb-card:hover { background: #fff; border-color: var(--mdb-dir-line); }
.mdb-dir--ribbons .mdb-card-media,
.mdb-dir--ribbons .mdb-card-type,
.mdb-dir--ribbons .mdb-card-meta,
.mdb-dir--ribbons .mdb-card-short,
.mdb-dir--ribbons .mdb-card-more { display: none; }
.mdb-dir--ribbons .mdb-ribbon.mdb-card-ribbon {
	width: 104px;
	height: 30px;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15), 0 1px 3px rgba(0, 0, 0, .15);
}
.mdb-dir--ribbons .mdb-card-body { padding: 0; align-items: center; }
.mdb-dir--ribbons .mdb-card-name { font-size: 13px; font-weight: 600; }
.mdb-dir--ribbons .mdb-card-post { display: block; font-size: 12px; }

.mdb-dir-empty {
	padding: 40px 16px;
	border: 1px dashed #cfc9bc;
	border-radius: 10px;
	text-align: center;
	color: #50555c;
}
.mdb-dir-empty[hidden] { display: none; }
.mdb-dir-empty p { margin: 0 0 12px !important; }
.mdb-dir .mdb-dir-empty button {
	all: unset;
	padding: 8px 16px;
	border-radius: 6px;
	background: #22252a;
	color: #fff;
	font-size: 14px;
	cursor: pointer;
}
.mdb-dir .mdb-dir-empty button:focus-visible { outline: 2px solid var(--mdb-dir-accent); outline-offset: 2px; }

@media (max-width: 760px) {
	.mdb-dir-search { flex-basis: 100%; }
	.mdb-dir-controls { flex: 1 1 100%; margin-left: 0; justify-content: space-between; }
	.mdb-dir-views button span { display: none; }
	.mdb-dir-sort { flex: 1 1 auto; min-width: 0; }
	.mdb-dir-sort > span { display: none; }
	.mdb-dir .mdb-dir-sort select { width: 100%; min-width: 0; }
	.mdb-dir .mdb-dir-views button { padding: 0 10px; }
	.mdb-dir-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin: 0 -16px;
		padding: 2px 16px 6px;
		scrollbar-width: none;
	}
	.mdb-dir-chips button { flex: 0 0 auto; }
	.mdb-dir-results { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
	.mdb-dir--list .mdb-dir-results { grid-template-columns: 1fr !important; }
	.mdb-dir--ribbons .mdb-dir-results { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.mdb-card-media { height: 130px; padding: 12px; }
	.mdb-card-body { padding: 10px 12px 12px; }
	.mdb-card-name { font-size: 15px; }
	.mdb-card-short { display: none; }
	.mdb-dir--list .mdb-card-short { display: -webkit-box; }
	.mdb-dir--list .mdb-ribbon.mdb-card-ribbon { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.mdb-dir button.mdb-card { transition: none; }
	.mdb-dir button.mdb-card:hover { transform: none; }
}

/* ==========================================================================
   Photo of the real medals (bar style "photo")
   ========================================================================== */

.mdb-bar--photo { line-height: 0; }
.mdb-size--small.mdb-bar--photo .mdb-photo  { max-width: 520px; }
.mdb-size--medium.mdb-bar--photo .mdb-photo { max-width: 860px; }
.mdb-size--large.mdb-bar--photo .mdb-photo  { max-width: 100%; }
.mdb-photo {
	position: relative;
	display: inline-block;
	width: 100%;
	vertical-align: top;
}
.mdb-photo-base {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	visibility: hidden; /* keeps the size; the slices show the picture */
}
.mdb-photo-slices { position: absolute; inset: 0; }

.mdb-bar button.mdb-slice,
.mdb-slice {
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 1;
	transform-origin: 50% 70%;
	transition: transform .22s cubic-bezier(.2, .7, .3, 1), z-index 0s .22s;
}
.mdb-slice-img {
	position: absolute;
	inset: 0;
	background-image: var(--mdb-photo);
	background-repeat: no-repeat;
	background-size: var(--mdb-bgw) 100%;
	background-position: var(--mdb-bgx) 0;
	transition: filter .22s ease, opacity .22s ease;
}

/* Lift the medal under the pointer and quieten the rest. */
.mdb-bar button.mdb-slice:hover,
.mdb-bar button.mdb-slice:focus-visible {
	z-index: 3;
	transform: translateY(-4%) scale(1.07);
	transition: transform .22s cubic-bezier(.2, .7, .3, 1), z-index 0s;
}
.mdb-bar button.mdb-slice:hover .mdb-slice-img,
.mdb-bar button.mdb-slice:focus-visible .mdb-slice-img {
	filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .45)) brightness(1.06) saturate(1.05);
}
.mdb-photo-slices:has(.mdb-slice:hover) .mdb-slice:not(:hover) .mdb-slice-img,
.mdb-photo-slices:has(.mdb-slice:focus-visible) .mdb-slice:not(:focus-visible) .mdb-slice-img {
	filter: saturate(.55) brightness(.8);
	opacity: .7;
}
.mdb-bar button.mdb-slice:focus-visible { outline: none; }
.mdb-bar button.mdb-slice:focus-visible .mdb-dot { opacity: 1; box-shadow: 0 0 0 3px #1a4d8f; }

/* Optional "+" markers so people know the medals can be explored. Always shown on touch screens. */
.mdb-dot {
	position: absolute;
	top: 16%;
	left: 50%;
	width: clamp(10px, 44%, 26px);
	height: auto;
	aspect-ratio: 1;
	border-radius: 50%;
	background: rgba(255, 255, 255, .88);
	box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
	opacity: 0;
	transform: translateX(-50%);
	transition: opacity .2s ease, transform .2s ease;
	pointer-events: none;
}
.mdb-dot::before,
.mdb-dot::after {
	content: "";
	position: absolute;
	left: 25%;
	top: 50%;
	width: 50%;
	height: 2px;
	margin-top: -1px;
	background: #8e1414;
	border-radius: 1px;
}
.mdb-dot::after { transform: rotate(90deg); }
.mdb-photo.has-markers .mdb-dot { opacity: .9; animation: mdb-pulse 2.4s ease-in-out 1s 2; }
.mdb-photo.has-markers .mdb-slice:hover .mdb-dot { opacity: 0; transform: translateX(-50%) scale(.6); }
@media (hover: none) {
	.mdb-photo .mdb-dot { opacity: .9; }
}
@keyframes mdb-pulse {
	0%, 100% { box-shadow: 0 1px 4px rgba(0, 0, 0, .35), 0 0 0 0 rgba(255, 255, 255, .7); }
	50% { box-shadow: 0 1px 4px rgba(0, 0, 0, .35), 0 0 0 9px rgba(255, 255, 255, 0); }
}
.mdb-slice.is-off { pointer-events: none; }
.mdb-bar--photo .mdb-caption { line-height: 1.4; }

/* Crop of the group photo, used in the hover summary and pop-up when a medal has no photo of its own. */
.mdb-crop {
	display: block;
	background-repeat: no-repeat;
	filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .25));
}
.mdb-tip .mdb-crop { flex: 0 0 auto; height: 96px; }
.mdb-d-crop { height: 340px; max-width: 100%; }
@media (max-width: 640px) {
	.mdb-d-crop { height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
	.mdb-bar button.mdb-slice,
	.mdb-bar button.mdb-slice:hover { transition: none; transform: none; }
	.mdb-photo.has-markers .mdb-dot { animation: none; }
}

/* Collection records in the pop-up */
.mdb-d-named { margin: -8px 0 14px !important; padding: 0 !important; font-size: 14px; color: #44484f; font-style: italic; }
.mdb-d-named:empty { display: none; }
.mdb-d-desc h3 {
	margin: 1.4em 0 .4em !important;
	padding: 0 !important;
	font-size: 12px !important;
	line-height: 1.3 !important;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #8a6d2c;
	font-weight: 700;
}
.mdb-d-desc ul { margin: 0 0 1em 1.2em; padding: 0; }
.mdb-d-desc li { margin: 0 0 .3em; }
.mdb-d-flip { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, .06); }
.mdb-d-flip[hidden] { display: none; }
.mdb-d-flip button {
	all: unset;
	padding: 5px 14px;
	border-radius: 999px;
	font-size: 13px;
	color: #44484f;
	cursor: pointer;
}
.mdb-d-flip button[aria-pressed="true"] { background: #fff; color: #1b1d21; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.mdb-d-flip button:focus-visible { outline: 2px solid #1a4d8f; outline-offset: 1px; }
.mdb-card-named { font-size: 13px; color: #44484f; font-style: italic; }
/* Ribbon view: items without ribbon colours show a small photo instead. */
.mdb-dir--ribbons button.mdb-card.no-ribbon .mdb-card-media {
	display: flex;
	height: 96px;
	width: 104px;
	padding: 0;
	background: transparent;
}
.mdb-dir--list button.mdb-card.no-ribbon { padding-left: 8px; }

/* Keep the photo in view while long descriptions scroll. */
@media (min-width: 641px) {
	.mdb-d-body { background: linear-gradient(90deg, #f3efe6 40%, #fff 40%); }
	.mdb-d-media {
		position: sticky;
		top: 0;
		align-self: start;
		justify-content: flex-start;
		background: transparent;
		box-sizing: border-box;
	}
	.mdb-d-img { max-height: min(420px, calc(100dvh - 220px)); }
}
