/* The user's interface size (UIX-1314): --vd-ui-scale is a percentage, written onto <html>
   by layouts/header.html.twig from their profile, absent at 100. Bootstrap and app.css size
   in rem, so scaling the root font scales the interface. Pixel sizes (the navbar and sidebar
   geometry in tailwind.config.js) stay as they are. */
html {
	scroll-padding-top: 90px;
	font-size: calc(100% * var(--vd-ui-scale, 100) / 100);
}

body {
	font-family: "Helvetica Neue", Helvetica, sans-serif;
	background: #f5f5f5;
	color: #666;
	overflow-y: scroll;
}

@media (max-width: 576px) {
	html {
		font-size: calc(0.75rem * var(--vd-ui-scale, 100) / 100); /* Slightly smaller on small screens */
	}
}

#main {
	padding-top: 48px;
}

#station-select-panel {
	position: fixed;
	top: 40px;
	left: 0;
	width: 100%;
	z-index: 100; /* Ensure this is in front when it appears */
}

#preview {
	vertical-align: middle;
}

#page-main-area {
	padding-bottom: 1rem;
}

@media screen and (max-width: 768px) {
	#preview {
		position: fixed;
		bottom: 12px;
		right: 12px;
	}

	.shortcut {
		width: 9rem!important;
	}
}


@media screen and (min-width: 992px) {
	body {
		font-size: .875rem;
	}

	#vudio-logo {
		display: inline;
	}

	#preview {
		zoom: 0.6;
	}

	.sidebar {
		display: block!important;
	}

	#station-select-panel {
		width: 400px;
	}

}

.sidebar {
	overflow-y: auto;
}

#menu {
	padding-bottom: 6rem;
}

#page-title-area{
	margin-top: 0.25rem;
	margin-left: -1.5rem;
	padding: 1.5rem;
	margin-bottom: 1.25rem;
	background-color: white;
	box-shadow: 0 0 13px 0 rgba(62,44,90,.08);
	z-index: 10;
}

.page-title {
	font-size: 1rem;
	text-transform: uppercase;
	font-weight: 500;
	color: #505050;
	margin: 0;
	text-shadow: #fff 0 1px;
	-webkit-box-flex: 1;
	-ms-flex: 1;
	flex: 1;
}


#fixed-area-top {
	/*
	position: fixed;
	top: 150px;
	width: 100%;
	z-index: 11;

	 */
	margin-left: -1.5rem;
	margin-right: -1.5rem;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
	margin-bottom: 1.5rem;

	background-color: white;
	box-shadow: 0 0 13px 0 rgba(62,44,90,.08);
}


#fixed-area-bottom {
	position: sticky;
	bottom: 0;
	width: 100%;

	z-index: 11;
	background-color: white;
	box-shadow: 0 0 13px 0 rgba(62,44,90,.08);
}

#record-area .card-heading {
	cursor:default;
}


.card {
	margin-top: 1rem;
	margin-bottom: 1rem;
	box-shadow: 0 0 13px 0 rgba(62,44,90,.08);

}

h2.page-title {
	font-size: 1rem;
}

h2.card-heading {
	font-size: 1rem;
}

/* Category name with its description alongside. The description takes whatever room is
   left and ellipsises there: a card is only as wide as its column, and a long
   description has no business widening it or wrapping the header onto a second line.
   min-width:0 on both, or a flex item refuses to shrink below its content and
   text-truncate never gets the chance to fire. */
.card-heading-row {
	display: flex;
	align-items: baseline;
	gap: .5rem;
	min-width: 0;
}

.card-heading-row .card-heading {
	flex: 0 1 auto;
	min-width: 0;
}

.card-heading-row .description {
	flex: 0 1 auto;
	min-width: 0;
}

h2.card-heading, h2.day {
	margin-bottom: 0px;
}

h1, h2, h3, h4, h5, h6 {
	line-height: 1.3;
	font-weight: 400;
}

tr.row-muted td {
	color: #bbb;
}

.table-xs tr th {
	padding-top: 0.2em;
	padding-bottom: 0.2em;
}

.table-xs tr td {
	padding-top: 0.2em;
	padding-bottom: 0.2em;
}


.dz-drag-hover {
	background: rgba(200,200,255, .25);
}


#play-live {
	margin-top: -3em;
}

h1.title {
	font-size: 1.9em;
}




.logo {
	margin-right: 4px;
}

/* todo make this more specific */
/*.nav {
	margin-top: 1em;
}*/

.navbar-nav .nav-item {
	margin-left: 1em;
	margin-right: 1em;
}

#navbar-spy .nav-link {
	color: #dddddd!important;
}

#navbar-spy .nav-link.active {
	background-color: #ec008c!important;
	color: white!important;
}



.navbar-station-logo {
	height: 48px;
	margin-top: -6px;
	margin-bottom: -6px;
}

/* Version, at the right-hand end of the navbar before the message icon. Quiet enough
   to ignore when you aren't looking for it, legible enough to read off a screenshot
   when you are. */
.navbar-version {
	/* Explicitly white: it used to sit inside .navbar-brand and inherit Bootstrap's
	   navbar link colour, but standing on its own in the right-hand group it would
	   otherwise take the body's dark grey and disappear into a dark navbar. */
	color: #fff;
	font-size: .7rem;
	font-weight: 500;
	line-height: 1;
	opacity: .75;
	white-space: nowrap;
}

/* Only rendered on a development box, so it can afford to shout. */
.navbar-environment {
	font-size: .65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	opacity: 1;
}


.bg-highlight {
	background-color:rgba(255, 255, 0, 0.25)!important;
}

a {
	color: #00579D;
	text-decoration: none;
}


.text-major {
	display:block;
}

.text-minor {
	display:block;
	font-size: 0.75em;
}


.text-inline-major {

}

.text-inline-minor {
	font-size: 0.75em;
	paddin-left: 0.2em;
}



.text-script {
	font-size: 2.5em;

}

.avatar {
	width: 4rem;
	height: 4rem;
	border-radius: 50%;
	object-fit: cover;
}

.control-label-light {
	color: rgba(0, 0, 0, 0.25);
}

.artist {
	display: block;
	font-style: italic;
}

.title {
	display: block;
	font-weight: bold;
}


.table {
	--bs-table-bg: none!important;
}

.row-red td {
	background-color: rgba(255,0,0,0.1);
}

.table th {
	border-top: none;
}




.table-xs tr td,
.table-xs tr th {
	font-size: 0.9em;
	padding-top: 0.25em;
	padding-bottom: 0.25em;
	padding-left: 0.4em;
	padding-right: 0.4em;
}

.avatar-small {
	width: 3em;
	height: 3em;
}

.day-select,
.hr-select,
.no-select
{
	-webkit-touch-callout: none; /* iOS Safari */
	-webkit-user-select: none; /* Safari */
	-khtml-user-select: none; /* Konqueror HTML */
	-moz-user-select: none; /* Old versions of Firefox */
	-ms-user-select: none; /* Internet Explorer/Edge */
	user-select: none; /* Non-prefixed version, currently */
}

.done-bar {
	margin-top: 3em;
	text-align: center;
}

.article-preview-image {
	object-fit: cover;
	width: 100%;
	max-height: 24em;
}

.article-thumbnail {
	width: 100px;
	height: 48px;
	object-fit: cover;
}


h3.category-title {
	font-size: 1.5em;
}


.panel {
	position: absolute;
}

#current-station-select {
	top: 40px;
	left: 20vw;
	width: 60vw;
}

.station-select-icon {
	background: #00152e;
	width: 120px;
	padding-top: 0.25rem;
	padding-bottom: 0.25rem;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
	cursor: pointer;
}

.station-select-row {
	margin-top: 2rem;
	margin-bottom: 2rem;
	cursor: pointer;
}

#menu {
	display: none;
	padding-left: 0;
	margin-top: 20px;
}

#menu .metismenu>li {
	position: relative;
	display: flex;
	flex-direction: column;
}

#menu .metismenu a {
	position: relative;
	display: block;
	padding: 13px 15px;
	transition: all .3s ease-out;
	text-decoration: none;
	color: #adb5bd;
	outline-width: 0;
}


#menu .nav-link {
	font-weight: 400;
	color: #aaaaaa;
}

#menu .active {
	color: white;
}

#menu .mm-active {
	color: white;
}

#menu .nav-link .feather {
	margin-right: 4px;
	color: #999;
}

#menu .nav-link:hover .feather,
#menu .nav-link.active .feather {
	color: inherit;
}

/* Third-level submenus (e.g. Web CMS > Manage). metisMenu handles the collapse;
   this only indents them so the nesting is readable. */
#menu ul ul a {
	padding-left: 2.5rem;
}

#menu-heading {
	font-size: .75rem;
	text-transform: uppercase;
}

.feather {
	width: 16px;
	height: 16px;
	vertical-align: text-bottom;
}



#menu > li {
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

#menu > li.mm-active {
	background-color:rgba(0, 0, 0, 0.25);
	border-left: #ec008c 4px solid;
}



.primary {

}

.avatar {
	vertical-align: middle;
	border-radius: 50%;
}

.avatar-small {
	width: 32px;
	height: 32px;
}

.avatar-medium {
	width: 48px;
	height: 48px;
}

.avatar-large {
	width: 64px;
	height: 64px;
}

li.nav-item {
	list-style-type: none;
}


.station-logo {
	height: 4rem;
}

.above-canvas {
	position: fixed;
	z-index: 100;
}

/* Add-search popup geometry (addins/vudio-common-components/add-search).

   Seventeen containers across eleven modules host one of these panels, and every one
   of them used to carry its own copy of
       top: 10em; left: calc(50vw - 40em); width: 80em;
   which is why this was never fixed centrally - there was no centre to fix.

   That centring only holds while the viewport is wider than the card. At 390px it
   resolves to left: 195px - 640px = -445px on a card 1280px wide, so the panel opened
   off the left edge of a phone and could not be reached at all. Centre with a
   transform instead, so the left edge cannot go negative whatever the viewport, and
   cap the width at the viewport rather than fixing it in em.

   Three of the seventeen wanted 60em: those get --narrow. */
.add-search-popup {
	top: 10em;
	left: 50%;
	transform: translateX(-50%);
	width: min(80em, 100% - 2rem);
}

.add-search-popup--narrow {
	width: min(60em, 100% - 2rem);
}

/* The panel is fixed, so any part of it below the fold cannot be scrolled to. The
   results table asks for 600px of its own and the card runs to about 850px once the
   heading and the category picker are added, which already overflowed the bottom of a
   1366x768 laptop. Cap the card at the viewport and let its body scroll.

   The cap is in vh and sits on the card rather than on the container: the container's
   own height is auto, and a percentage max-height against an auto-height parent
   computes to none, so capping the container let the card spill straight back out of
   it. Card top is 10em, so this leaves 2em clear at the bottom.

   The margin is zeroed because .card carries a global 12px one. On a floating panel it
   does nothing except push the card down past the bottom of its own container. */
.add-search-popup > .card {
	margin: 0;
	max-height: calc(100vh - 12em);
}

/* .card is a flex column in Bootstrap, so the body takes up the slack - but a flex item
   will not shrink below its content height without min-height: 0. */
.add-search-popup > .card > .card-body {
	min-height: 0;
	overflow-y: auto;
}

/* Below Bootstrap's md breakpoint a floating card is the wrong shape - there is no
   room left over for it to float above. Fill the screen instead. */
@media (max-width: 767.98px) {
	.add-search-popup,
	.add-search-popup--narrow {
		top: 0;
		left: 0;
		right: 0;
		width: auto;
		height: 100%;
		height: 100dvh;
		max-height: none;
		transform: none;
		/* .above-canvas sits at 100, below the fixed-top navbar's 1030. That is right for a
		   floating card but not for a full-screen one: the navbar covered the panel's own
		   header, taking More and the close button with it and leaving no way out of it.
		   1040 clears the navbar and still sits under Bootstrap's modals at 1050. */
		z-index: 1040;
	}

	.add-search-popup > .card {
		height: 100%;
		max-height: none;
		border-radius: 0;
	}
}

/* Eight columns do not fit the width of a phone. Each variant marks its lower-value ones
   with .add-search__col-secondary - for music that is released, BPM, key, added and popularity,
   leaving artist, title, duration, play and the add control. The More link in the card
   header puts .add-search--expanded on the container to bring them back. */
@media (max-width: 767.98px) {
	.add-search__col-secondary {
		display: none;
	}

	.add-search--expanded .add-search__col-secondary {
		display: table-cell;
	}
}

/* Scheduling palettes (addins/vudio-common-components/slot-schedule.js).
   Shared by Schedule Scripts and Schedule Event Scripts, so the styling lives with
   the component rather than in one module's stylesheet.

   Hidden here rather than by JS on ready: they are position:fixed, so hiding them
   in script means a paint with both cards on screen first, and they flashed on
   every page load. jQuery .show() still reveals them - it falls back to the
   element's default display when a stylesheet has hidden it. */
#div-palette-mandatory,
#div-palette-filler {
	display: none;
	top: 8em;
	right: 1.75em;
	width: 28em;
	user-select: none;
}

#div-palette-mandatory .card-header,
#div-palette-filler .card-header {
	cursor: move;
}

#div-palette-mandatory .card-body,
#div-palette-filler .card-body {
	max-height: 70vh;
	overflow-y: auto;
}





.yellow-flash {
	-moz-animation: yellow-flash 1s ease-out;
	-moz-animation-iteration-count: 1;
	-webkit-animation: yellow-flash 1s ease-out;
	-webkit-animation-iteration-count: 1;
	-ms-animation: yellow-flash 1s ease-out;
	-ms-animation-iteration-count: 1;
}



@-webkit-keyframes yellow-flash {
	0% { background-color: none; }
	50% { background-color: rgba(255, 255, 23, 0.7)}
	100% { background-color: none; }
}
@-moz-keyframes yellow-flash {
	0% { background-color: none; }
	50% { background-color:rgba(255, 255, 23, 0.7) }
	100% { background-color: none; }
}
@-ms-keyframes yellow-flash {
	0% { background-color: none; }
	50% { background-color: rgba(255, 255, 23, 0.7)}
	100% { background-color: none; }
}

@media print
{
	.navbar {
		display:none;
	}
}



.modal-text-scrollable {
	overflow-y: scroll;
	max-height: 22rem;
}

.modal-dialog {
	max-width: 720px;
}





@media print {
	nav {
		display:none;
		visibility: hidden;
	}
}


.shortcut {
	display: block;
	float: left;
	text-align: center;
	width: 8rem;
	height: 3.5rem;
	margin-top: 0.5rem;
	margin-bottom: 0.5rem;
	margin-left: 0.25rem;
	margin-right: 0.25rem;
}


.shortcut-wide {
	width: 12rem;
}

.shortcut-icon {
	display: block;
}
.shortcut-text {
	display: block;
}


.station-icon-selected {
	border-bottom: #ec008c 4px solid;
}

.time-seconds {
	font-size: 0.6em;
	font-weight: lighter;
}

/* Documentation Articles */
.documentation-article {

}

.documentation-article h1 {
	margin-top: 3rem;
	margin-bottom: 1rem;
	font-size: 1.5rem;
	font-weight: bold;
	border-bottom: 1px solid;
	color: #ec008c;
}

.documentation-article h2{
	font-size: 1.1rem;
	font-weight: bold;
}

ol>li {
	margin-bottom: 0.6rem;
}

.page-title-area-vap {
	margin-top: 3.5rem!important;
}

/* #page-title-area is pulled 1.5rem left and padded back for the back office, where it sits
   beside the sidebar. The portal has no sidebar, so that offset put its home icon 8-12px
   left of the cards and the logo. The id is repeated so this outranks #page-title-area. */
#page-title-area.page-title-area-vap {
	margin-left: 0;
	padding-left: 0;
	padding-right: 0;
}

#main-vap {
	margin-top: 10rem;
}


.contact-thumbnail,
.app-ad-thumbnail {
	width: 100px;
	height: 48px;
	object-fit: cover;
	float: left;
	vertical-align: middle;
	margin-right: 1em;
}

.sponsor-thumbnail {
	height: 64px;
	object-fit: contain;
}

.mix-name {
	font-size: 0.7em;
	opacity: 0.7;
	font-weight: normal;
	padding-left: 0.3em;
}



#codeigniter_profiler {
	position:absolute!important;
	z-index: 999!important;
}


.sale-strikethru {
	color: red;
	text-decoration: red line-through;
}


.max-width-half {
	max-width: 960px;
}

.menu-section {
	font-size: 1rem;
	padding-left: 1.2rem;
	padding-top: 1.5rem;
	padding-bottom: 0.5rem;
	text-transform: uppercase;

}

/* Remove table hover effect on rows that have .no-hover */
.table-hover > tbody > tr.no-hover:hover > * {
	--bs-table-accent-bg: var(--bs-table-bg) !important; /* cancel hover bg */
	color: inherit;                                      /* keep text color */
	box-shadow: none;                                    /* just in case */
}




/* Add/Search panel: a result just added to the host's list stays put but goes dull, so
   the list does not jump under the pointer. It leaves the results on the next reload,
   where the exclusions drop it server side. Opacity sits on the cells, not the row:
   opacity on a tr creates a stacking context and browsers treat that inconsistently
   in table layout. */
tr.add-search__row--added > * {
	opacity: 0.4;
}

tr .show-on-hover {
	visibility:hidden;
}

tr:hover .show-on-hover {
	visibility: visible;
}

/* A touch screen has no hover, so the control stays hidden and the row has no visible
   action at all - Edit, Delete and the add-search plus are all drawn this way. Show
   them permanently where the pointer cannot hover. */
@media (hover: none) {
	tr .show-on-hover {
		visibility: visible;
	}
}


td.dt-truncate {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 0; /* ensures it respects column width */
}

/* Disable striped background effect on datatables scroller */

div.dts div.dt-scroll-body table, div.dts div.dataTables_scrollBody table {
	background: transparent!important;
}

div.dts div.dt-scroll-body, div.dts div.dataTables_scrollBody {
	background: transparent !important;
}

.datatables-hidden{
    display: none;
}

/* Hide default buttons so we can use dropdown menu */
.dt-buttons {
	display: none;
}

/* Place that dropdown menu correctly in the top-right */
.dataTables_buttons {
	float: right;
	margin-left: 1em;
}

/* An ajax table, and the rows under it (info, paging), are hidden until its first rows are
   drawn, so its columns are sized once, with the rows, and nothing jumps (UIX-MS2-1730,
   dt-extras.js). The search and length row above stays. */
.dt-container.vd-dt-loading > .dt-layout-table,
.dt-container.vd-dt-loading > .dt-layout-table ~ * {
	visibility: hidden;
}

/* The table never sits beside that button. On a list page the search row beside it is as tall
   as the button, so this changes nothing there; on a table with no search box the top row is
   empty, and the button would otherwise float down beside the headings and squeeze the table. */
.dt-container > .dt-layout-table {
	clear: both;
}

/* Prevents horizontal scrolling on large tables */

.table-fixed-width {
	table-layout: fixed;
	width: 100% !important;
}

.table-fixed-width th,
.table-fixed-width td {
	width:auto;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
/* @vudio/ticky-grid (addins/vudio-common-components/ticky-grid/).
   The 7x24 hours grid used by campaign airtime, presenter scripts and event
   scheduling. Lived only in the stations schedules CSS, so the grid was unstyled
   everywhere else - it belongs with the component, not with one screen. */
.timetable tbody td {
	vertical-align: middle;
	text-align: center;
	font-size: 0.75em;
}

.timetable .top-hours {
	text-align: center !important;
}

/* The day, hour, All and None headers are buttons (they toggle a whole line), but
   they read as plain headers: no link colour or underline, just the pointer. */
.ticky-grid [data-ticky],
.ticky-grid [data-ticky]:hover,
.ticky-grid [data-ticky]:focus {
	color: inherit;
	font-weight: inherit;
	text-decoration: none;
	cursor: pointer;
}

/* Hotness score pips. The class is used on the opportunity editor and the
   contact-action editor as well as the pipeline; the rule used to live in
   contacts-pipeline.css, which only the pipeline loaded, so the shading was
   missing on the other two. Moved here with the kanban extraction (VUD-201). */
.hotness-score div {
    box-shadow: 0 0 1px rgba(0,0,0,0.1);
}

/* select2 inside an .input-group.

   initSelect2() renders every searchable select at width:100%, which select2 writes
   inline onto its own container. .input-group wraps, so a member that wide takes a
   line to itself and pushes the add-ons either side onto lines of their own - three
   rows where there is one control. Sized here as an ordinary member of the group,
   and squared off where it meets its neighbours, because the rounded corners belong
   to the group rather than to the box in the middle of it. */
.input-group > .select2-container {
    flex: 1 1 auto;
    width: auto !important;
}

.input-group > .select2-container:not(:first-child) .select2-selection {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > .select2-container:not(:last-child) .select2-selection {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Camelot key badge (renderCamelotKey() in global.js).

   Colours are the Mixed In Key Camelot wheel, sampled from the wheel image Mixed In Key
   publishes on https://mixedinkey.com/camelot-wheel/
   (wp-content/uploads/2020/04/Camelot-Wheel-Mixed-In-Key-Harmonic-Mixing.png), 17/09/2026.
   The wheel is shaded, so each value is the average of a patch in the middle of its
   segment. Other sites publish their own evenly spaced hues; where they disagree this
   follows Mixed In Key, because that is the wheel the notation comes from.

   Each number keeps one hue round the circle of fifths (1 mint, 3 lime, 5 orange,
   7 pink, 9 violet, 11 sky). B, the outer major ring, is the stronger colour; A, the
   inner minor ring, is the same hue paler, as on the wheel.

   Every swatch is light, so the text is a fixed near-black in both themes rather than
   the theme's ink, which turns pale in dark mode. Lowest contrast is 9B at about 5.5:1.
   The swatches stay the same in dark mode on purpose: the colour is the information,
   and a DJ matching it against Mixed In Key or the wheel poster needs the same one. */
:root {
	--camelot-ink: #1b1f24;

	--camelot-1a: #b2f8df;  --camelot-1b: #88f6cd;
	--camelot-2a: #c1fabc;  --camelot-2b: #9ef997;
	--camelot-3a: #cdf2a4;  --camelot-3b: #b5f173;
	--camelot-4a: #e1dfa5;  --camelot-4b: #d0cd71;
	--camelot-5a: #f6c3aa;  --camelot-5b: #efa078;
	--camelot-6a: #fbaeb7;  --camelot-6b: #eb7885;
	--camelot-7a: #f6aece;  --camelot-7b: #ed7cae;
	--camelot-8a: #e2ade9;  --camelot-8b: #cc7bd8;
	--camelot-9a: #d0aefd;  --camelot-9b: #b07bf5;
	--camelot-10a: #bfc2fa; --camelot-10b: #9c9ff9;
	--camelot-11a: #b5e6fd; --camelot-11b: #86cff4;
	--camelot-12a: #a6f0ee; --camelot-12b: #79efec;

	/* The paler A swatches sit close to a white table; a hairline keeps the edge. */
	--camelot-edge: rgba(0, 0, 0, .12);
}

[data-bs-theme="dark"] {
	/* Against a dark surface every swatch already stands out. */
	--camelot-edge: transparent;
}

.camelot-key {
	display: inline-block;
	min-width: 2.6em;
	padding: .1em .4em;
	border-radius: .35em;
	box-shadow: inset 0 0 0 1px var(--camelot-edge);
	background-color: var(--camelot-bg, transparent);
	color: var(--camelot-ink);
	font-size: .85em;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.camelot-1a  { --camelot-bg: var(--camelot-1a); }
.camelot-1b  { --camelot-bg: var(--camelot-1b); }
.camelot-2a  { --camelot-bg: var(--camelot-2a); }
.camelot-2b  { --camelot-bg: var(--camelot-2b); }
.camelot-3a  { --camelot-bg: var(--camelot-3a); }
.camelot-3b  { --camelot-bg: var(--camelot-3b); }
.camelot-4a  { --camelot-bg: var(--camelot-4a); }
.camelot-4b  { --camelot-bg: var(--camelot-4b); }
.camelot-5a  { --camelot-bg: var(--camelot-5a); }
.camelot-5b  { --camelot-bg: var(--camelot-5b); }
.camelot-6a  { --camelot-bg: var(--camelot-6a); }
.camelot-6b  { --camelot-bg: var(--camelot-6b); }
.camelot-7a  { --camelot-bg: var(--camelot-7a); }
.camelot-7b  { --camelot-bg: var(--camelot-7b); }
.camelot-8a  { --camelot-bg: var(--camelot-8a); }
.camelot-8b  { --camelot-bg: var(--camelot-8b); }
.camelot-9a  { --camelot-bg: var(--camelot-9a); }
.camelot-9b  { --camelot-bg: var(--camelot-9b); }
.camelot-10a { --camelot-bg: var(--camelot-10a); }
.camelot-10b { --camelot-bg: var(--camelot-10b); }
.camelot-11a { --camelot-bg: var(--camelot-11a); }
.camelot-11b { --camelot-bg: var(--camelot-11b); }
.camelot-12a { --camelot-bg: var(--camelot-12a); }
.camelot-12b { --camelot-bg: var(--camelot-12b); }

/* The track editor's Key select (tracks/edit/basics): each option in its own colour, so the
   list reads as the wheel. The chosen key is shown as an ordinary badge beside the select
   (tracks/edit.js): a native select can only be coloured whole, and a whole coloured control
   reads as a state of the field rather than as the key. */
.camelot-select option[class^="camelot-"] {
	background-color: var(--camelot-bg);
	color: var(--camelot-ink);
}


/* ---------------------------------------------------------------------------------------
   Mount points of self-rendering controls (UIX-MS2-1626).

   A control drawn by JS arrives after the first paint, so an empty mount point would grow
   when it lands and push everything below it down: a layout shift. Each mount reserves
   the height its control will take. Heights are in rem, as Bootstrap's own are, so they
   follow the root font size the user picked.
   --------------------------------------------------------------------------------------- */

/* One line of input: a select2 box in an input-group. Since UIX-MS2-1737 select2 is the
   size of the form-select it replaces: .25rem padding each side, a 1.45 x .8125rem line and
   a 2px border, 28.84px at the default size (measured at every interface scale from 75% to
   125%). Before that it was held at a 30px minimum (UIX-MS2-1715). */
.vc-reserve-input {
	min-height: calc(1.678125rem + 2px);
}

/* For a control whose own root carries mb-3 (select-release-date.js): drawn, that margin
   stays inside the reserving mount; empty, the mount holds it (UIX-MS2-1730). */
.vc-reserve-mb-3:empty {
	margin-bottom: 1rem;
}

/* A point editor row (edit-points/point-row.js): a small caption (1.3125rem), the time box
   and a row of small buttons, plus their borders (76.72px at a 16px root, measured: a
   rounder figure makes the row a fraction taller than the block drew it). A row with a switch
   under its points is taller by the switch and its margin (106.72px). */
.vc-reserve-point-row {
	min-height: calc(4.544921875rem + 4px);
}
.vc-reserve-point-row.vc-has-switch {
	min-height: calc(6.419921875rem + 4px);
}

/* One line of small inputs and buttons, as tall as its form-select-sm: .25rem padding each
   side, a 1.45 x .8125rem line and a 2px border (28.84px at the default size; measured at
   every interface scale from 75% to 125%, UIX-MS2-1715). */
.vc-reserve-input-sm {
	min-height: calc(1.678125rem + 2px);
}

/* A small action menu's toggle (track-menus.js): an icon and a caret, or the + icon and
   its margin, held inline at the width they take, so drawing the menu neither widens a
   line nor wraps it onto another. The menu replaces the mount, and this with it. The +
   is narrower than the icon and margin alone: the drawn menu takes in the space after it,
   which the empty mount leaves outside as a space of its own. */
.vc-reserve-menu,
.vc-reserve-menu-plus {
	display: inline-block;
	height: 1em;
}
.vc-reserve-menu {
	width: 1.83em;
}
.vc-reserve-menu-plus {
	width: 1.18em;
}

/* An x-to-y picker (x-to-y.js): its select2, the .5rem gap under it and its table, which
   the page sizes when it makes the picker (150px on the track editor; set --xtoy-height
   for another). The select2 is the size of a form-select (UIX-MS2-1737). */
.vc-reserve-xtoy {
	min-height: calc(2.178125rem + 2px + var(--xtoy-height, 150px));
}

/* What sits below something a script draws after the first paint, and whose size cannot
   be known before it is drawn: a table of rows, an editor (UIX-MS2-1731). It stays unseen
   until the page's script adds .vd-drawn to <body>, because an element that moves while
   hidden is not a layout shift. The animation shows it after 3 s whatever happens, so a
   script that fails, or never says, cannot leave it hidden. */
body:not(.vd-drawn) .vd-await-draw {
	visibility: hidden;
	animation: vd-await-draw 0s 3s forwards;
}

@keyframes vd-await-draw {
	to {
		visibility: visible;
	}
}

/* ---------------------------------------------------------------------------------------
   Layout shift in the navbar, the page title and Trackart (UIX-MS2-1715).

   Three things arrived after the first paint and moved what was beside them, on every
   page and for returning users too, because a cached font or image is still decoded after
   the first frame:

   - The Vudio Slab is an <img> with a height and no width, so it took no room until the
     SVG arrived and then pushed the station switch 81px right. Its viewBox is 345 x 144,
     so the ratio gives it its width before it loads, at either navbar height.
   - Font Awesome icons are laid out at a fallback glyph's width until the icon font
     loads (it is font-display: block), then at their own: each navbar button changed
     width by 1 to 3px, which moved the whole right-hand group, and the breadcrumb's home
     icon grew 4px. Each icon there is given the width its glyph will have, measured from
     the font, so the font landing changes nothing. An icon added to the bar needs a line
     here (measure it as width / font-size once document.fonts.ready); one without will
     shift by a pixel or two, as every icon did before.
   - Trackart's covers had no height until they loaded. They are square (300 or 600px), so
     each is held square until it arrives; `auto` lets a cover that is not square keep
     its own shape once loaded rather than be stretched.
   --------------------------------------------------------------------------------------- */
#vudio-logo img {
	aspect-ratio: 345 / 144;
}

.navbar-controls > .btn > i,
.navbar-controls > .dropdown > .btn > i,
.page-title > a > i {
	display: inline-block;
}
.navbar-controls > .btn > i.fa-envelope,
.navbar-controls > .btn > i.fa-list-check,
.navbar-controls > .btn > i.fa-address-book,
.navbar-controls > .dropdown > .btn > i.fa-cog,
.navbar-controls > .dropdown > .btn > i.fa-circle-half-stroke,
.navbar .input-group-text > i.fa-globe-europe {
	width: 1em;
}
.navbar-controls > .btn > i.fa-bell {
	width: .875em;
}
.navbar-controls > .dropdown > .btn > i.fa-ear {
	width: .75em;
}
.page-title > a > i.fa-home {
	width: 1.1654em;
}

img.trackart-image {
	aspect-ratio: auto 1 / 1;
}

/* MUS-1728: a row whose LUFS is under -15 is tinted the whole way across, faintly blue, so
   a quiet track or commercial stands out without its figure looking like a link. Inset
   box-shadow, as Bootstrap and DataTables tint rows, so hover and selection still show. */
:root {
	--vd-quiet-row: rgba(11, 96, 196, 0.07);
	--vd-quiet-row-hover: rgba(11, 96, 196, 0.13);
}
[data-bs-theme="dark"] {
	--vd-quiet-row: rgba(88, 166, 255, 0.10);
	--vd-quiet-row-hover: rgba(88, 166, 255, 0.17);
}
table.dataTable tbody tr.quiet-row:not(.selected) > * {
	box-shadow: inset 0 0 0 9999px var(--vd-quiet-row);
}
/* The tint paints over the hover background, so a hovered quiet row deepens instead. */
table.dataTable tbody tr.quiet-row:not(.selected):hover > * {
	box-shadow: inset 0 0 0 9999px var(--vd-quiet-row-hover);
}
.quiet-levels {
	background-color: var(--vd-quiet-row);
	border-radius: 4px;
	padding: 0.125rem 0.5rem;
}
