/* Sizes and colors from BBGM's own theme */
:root {
	--bs-body-font-size: 0.8125rem;
	--bs-link-decoration: none;
}
a {
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
.btn {
	font-size: 0.8125rem;
}
.navbar-border {
	border-bottom: 1px solid var(--bs-gray-200);
}
.navbar-brand {
	font-size: 1.1rem;
}
.year {
	width: 5.5em;
}
.search {
	max-width: 260px;
}

.face svg {
	display: block;
	width: 100%;
	height: 100%;
}

.more summary {
	color: var(--bs-link-color);
	cursor: pointer;
}

/* Ticker */
.ticker {
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	border-bottom: 1px solid var(--bs-border-color);
	padding: 8px 0;
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
}
.ticker::-webkit-scrollbar {
	display: none;
}
.ticker.dragging,
.ticker.dragging .pair {
	cursor: grabbing;
}
.ticker-track {
	display: flex;
	gap: 18px;
	width: max-content;
}
.ticker img {
	-webkit-user-drag: none;
}
.pair {
	display: flex;
	align-items: flex-end;
	gap: 2px;
	cursor: pointer;
}
.pair img {
	width: 60px;
	height: 75px;
	object-fit: cover;
	object-position: top;
	background: var(--bs-secondary-bg);
}
.pair .face {
	width: 60px;
	height: 90px;
}

/* Big viewer: photo, face, and while editing an arrow to the new face */
.viewer {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	/* the face drawings have empty space above the hair */
	margin-top: -16px;
}
.viewer img,
.viewer .face {
	flex: 1 1 0;
	min-width: 0;
	max-width: 220px;
}
.viewer img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: top;
	background: var(--bs-secondary-bg);
}
.viewer .face {
	aspect-ratio: 2 / 3;
}
.viewer .arrow {
	flex: none;
	align-self: center;
	font-size: 24px;
	opacity: 0.6;
}
@media (max-width: 575px) {
	.viewer {
		gap: 4px;
	}
	.viewer .arrow {
		font-size: 18px;
	}
}

/* Player name, which is also the search box */
.picker {
	position: relative;
	min-width: 0;
	max-width: 100%;
}
.name {
	width: 100%;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.2;
	padding: 2px 30px 2px 6px;
	margin-left: -6px;
	color: inherit;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 0;
}
/* A faint magnifying glass and dotted underline say the name can be searched */
.picker::after {
	content: "";
	position: absolute;
	right: 8px;
	top: 50%;
	width: 15px;
	height: 15px;
	margin-top: -7px;
	background-color: currentColor;
	opacity: 0.45;
	pointer-events: none;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='6.5' cy='6.5' r='5' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M10.3 10.3 15 15' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='6.5' cy='6.5' r='5' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M10.3 10.3 15 15' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.name:not(:focus) {
	background-image: linear-gradient(to right, color-mix(in srgb, currentColor 45%, transparent) 50%, transparent 50%);
	background-size: 4px 1px;
	background-repeat: repeat-x;
	background-position: left bottom;
	background-origin: content-box;
	background-clip: content-box;
	cursor: text;
}
.name.measure {
	position: absolute;
	left: -10000px;
	width: auto;
	white-space: pre;
	visibility: hidden;
}
@media (hover: hover) {
	.name:hover {
		border-color: var(--bs-border-color);
	}
}
.name:focus {
	outline: none;
	border-color: var(--bs-primary);
	background: var(--bs-body-bg);
}
.matches {
	position: absolute;
	z-index: 10;
	top: 100%;
	left: -6px;
	min-width: 260px;
	max-height: 360px;
	overflow-y: auto;
	--bs-list-group-border-radius: 0;
}
.matches .list-group-item {
	padding: 4px 8px;
	display: flex;
	justify-content: space-between;
	gap: 8px;
}
.matches .year {
	opacity: 0.6;
}

/* Change requests */
.request-row {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
}
/* BBGM's own help icon */
@font-face {
	font-family: "Glyphicons Halflings";
	src: url("fonts/glyphicons-halflings-regular.woff2") format("woff2");
}
.glyphicon {
	position: relative;
	top: 1px;
	display: inline-block;
	font-family: "Glyphicons Halflings";
	font-style: normal;
	font-weight: normal;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
.glyphicon-question-sign:before {
	content: "\e085";
}
.info-btn {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: 13px;
	cursor: pointer;
}
.info-pop {
	position: absolute;
	z-index: 20;
	top: calc(100% + 6px);
	left: 0;
	width: min(320px, 100%);
	padding: 8px 10px;
	border: 1px solid var(--bs-border-color);
	background: var(--bs-body-bg);
}
.editor {
	padding: 10px;
	border: 1px solid var(--bs-border-color);
}
/* Plain text tabs, on one line that scrolls sideways on narrow screens */
.parts {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	white-space: nowrap;
	scrollbar-width: none;
	border-bottom: 1px solid var(--bs-border-color);
	padding-bottom: 4px;
}
.parts::-webkit-scrollbar {
	display: none;
}
.parts button {
	padding: 0;
	border: 0;
	background: none;
	color: var(--bs-link-color);
}
.parts button.active {
	color: var(--bs-body-color);
	font-weight: 700;
}
.row-label {
	margin: 8px 0 4px;
	font-weight: 700;
}
.options {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	max-height: 232px;
	overflow-y: auto;
}
.option {
	position: relative;
	height: 64px;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--bs-border-color);
	border-radius: 0;
	background: #fff;
}
.option:hover {
	border-color: var(--bs-secondary-color);
}
.option.selected {
	outline: 2px solid var(--bs-primary);
	outline-offset: -2px;
}
/* The player's own option */
.option.original::after {
	content: "";
	position: absolute;
	top: 3px;
	right: 3px;
	width: 6px;
	height: 6px;
	background: var(--bs-primary);
}
.option svg {
	display: block;
	width: 100%;
	height: 100%;
}
.slider {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 340px;
	margin-top: 8px;
}
.slider span {
	width: 56px;
	font-weight: 700;
}
.slider .form-range {
	flex: 1;
}
.swatches {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}
.swatch {
	width: 24px;
	height: 24px;
	padding: 0;
	border: 1px solid var(--bs-border-color);
	border-radius: 0;
}
.swatch.selected {
	outline: 2px solid var(--bs-primary);
	outline-offset: 1px;
}
.swatches .form-control-color {
	width: 34px;
	height: 26px;
	padding: 2px;
	border-radius: 0;
}

/* Review page */
/* Bootstrap's d-flex would otherwise beat the hidden attribute */
.d-flex[hidden] {
	display: none !important;
}
.review-page {
	padding-bottom: 70px;
}
.settings {
	max-width: 520px;
}
.review-card {
	padding: 10px 0 14px;
	border-bottom: 1px solid var(--bs-border-color);
	max-width: 720px;
}
.review-card .viewer {
	margin-top: 0;
	max-width: 560px;
}
.changes {
	margin: 6px 0 0;
	padding-left: 18px;
	font-family: var(--bs-font-monospace);
	font-size: 12px;
}
.changes .changes-label {
	list-style: none;
	margin-left: -18px;
	font-family: var(--bs-body-font-family);
	font-weight: 700;
}
.review-card .note {
	margin-top: 6px;
	padding: 6px 8px;
	background: var(--bs-tertiary-bg);
	white-space: pre-wrap;
}
/* Stays in view while scrolling through the options */
.edit-actions {
	position: sticky;
	top: 0;
	z-index: 5;
	padding: 6px 0 8px;
	background: var(--bs-body-bg);
}
.publish-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 10px 0;
	background: var(--bs-body-bg);
	border-top: 1px solid var(--bs-border-color);
	z-index: 30;
}
