/* ---------------------------------------------------------------------------
   topos-technik - styling based on the printed "Dienste Sound & Technik" sheet
   --------------------------------------------------------------------------- */

:root
{
	--blue-bright: #00b0f0;
	--blue-dark: #0070c0;
	--blue-logo: #1d71b9;
	--red-logo: #be1623;

	--status-open: #d31d2b;
	--status-pending: #f2b705;
	--status-confirmed: #17a04a;

	--grey-line: #cfd8dd;
	--grey-row: #f2f7fa;
	--text: #10171c;

	--font: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

*
{
	box-sizing: border-box;
}

body
{
	margin: 0;
	padding: 0 12px 48px;
	background: #ffffff;
	color: var(--text);
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.45;
}

.page
{
	max-width: 940px;
	margin: 0 auto;
	border: 3px solid var(--blue-bright);
	border-radius: 4px;
	overflow: hidden;
	margin-top: 18px;
}

/* --- Head ---------------------------------------------------------------- */

.masthead
{
	display: flex;
	align-items: center;
	gap: 18px;
	background: var(--blue-bright);
	padding: 10px 16px;
}

.masthead img
{
	width: 92px;
	height: 92px;
	object-fit: contain;
	background: #ffffff;
	border: 2px solid #ffffff;
	border-radius: 3px;
	flex: none;
}

.masthead h1
{
	margin: 0;
	color: #ffffff;
	font-size: 27px;
	line-height: 1.15;
	letter-spacing: 0.4px;
}

.masthead h1 .cap
{
	font-size: 34px;
}

.masthead .lead
{
	display: block;
	font-size: 18px;
	font-weight: normal;
}

.masthead .who
{
	margin: 4px 0 0;
	color: #ffffff;
	font-size: 14px;
	font-weight: bold;
}

.masthead .who a
{
	color: #ffffff;
}

.masthead .spacer
{
	flex: 1 1 auto;
}

/* --- Quarter bar --------------------------------------------------------- */

.quarterbar
{
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	background: var(--blue-bright);
	border-top: 2px solid #ffffff;
	padding: 7px 16px;
	color: #ffffff;
	font-weight: bold;
	font-size: 17px;
}

.quarterbar .spacer
{
	flex: 1 1 auto;
}

.quarterbar a,
.btn
{
	display: inline-block;
	background: #ffffff;
	color: var(--blue-dark);
	border: 2px solid #ffffff;
	border-radius: 3px;
	padding: 3px 11px;
	font-size: 14px;
	font-weight: bold;
	text-decoration: none;
	cursor: pointer;
}

.quarterbar a:hover
{
	background: #e8f7ff;
}

/* --- Filter bar ---------------------------------------------------------- */

.filterbar
{
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	padding: 8px 16px;
	background: #eaf6fc;
	border-bottom: 2px solid var(--blue-bright);
}

.filterbar label
{
	font-size: 13px;
	font-weight: bold;
	color: var(--blue-dark);
}

.filterbar select
{
	padding: 5px 8px;
	border: 2px solid var(--blue-dark);
	border-radius: 3px;
	background: #ffffff;
	color: var(--blue-dark);
	font-family: var(--font);
	font-size: 13px;
	font-weight: bold;
	cursor: pointer;
}

.filterbar select:focus
{
	outline: none;
	border-color: var(--blue-bright);
}

.filterbar .go
{
	padding: 5px 12px;
	border: 2px solid var(--blue-dark);
	border-radius: 3px;
	background: var(--blue-dark);
	color: #ffffff;
	font-family: var(--font);
	font-size: 13px;
	font-weight: bold;
	cursor: pointer;
}

/* With JavaScript the dropdown submits on its own */
body.has-js .filterbar .go
{
	display: none;
}

.filterbar .count
{
	font-size: 13px;
	color: #45535b;
}

/* --- Event table --------------------------------------------------------- */

.schedule
{
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.schedule th
{
	background: var(--blue-bright);
	color: #ffffff;
	font-size: 16px;
	text-align: left;
	padding: 5px 10px;
	border: 1px solid #ffffff;
	white-space: nowrap;
}

.schedule th .col-short
{
	display: none;
}

.schedule th.center,
.schedule td.center
{
	text-align: center;
}

.schedule td
{
	border: 1px solid var(--grey-line);
	padding: 5px 10px;
	font-weight: bold;
	vertical-align: middle;
}

.schedule tbody tr:nth-child(even) td
{
	background: var(--grey-row);
}

/* The row the reader was sent back to after a click */
.schedule tbody tr:target td
{
	background: #fff6cc;
	box-shadow: inset 0 2px 0 var(--blue-bright), inset 0 -2px 0 var(--blue-bright);
}

.schedule tbody tr
{
	/* keep the row clear of the message pinned to the top edge */
	scroll-margin-top: 56px;
}

.schedule tbody tr.month td
{
	background: var(--blue-bright);
	color: #ffffff;
	font-size: 16px;
	letter-spacing: 0.4px;
	border-color: #ffffff;
	padding: 3px 10px;
}

.schedule td.date
{
	white-space: nowrap;
	width: 108px;
}

.schedule td.initials
{
	color: var(--blue-dark);
	text-align: center;
	white-space: nowrap;
	width: 110px;
}

.schedule td.initials .unconfirmed
{
	color: #8a6d00;
}

.schedule td.pick
{
	width: 70px;
	text-align: center;
}

.schedule tr.is-past td
{
	opacity: 0.55;
}

.schedule tr.is-mine td.title
{
	color: var(--blue-dark);
}

.empty
{
	padding: 22px 16px;
	font-weight: bold;
	color: #55636b;
}

/* --- Checkbox with colour coded frame ------------------------------------ */

.pickbox
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 3px solid var(--status-open);
	border-radius: 5px;
	background: #ffffff;
}

.pickbox.status-pending
{
	border-color: var(--status-pending);
}

.pickbox.status-confirmed
{
	border-color: var(--status-confirmed);
}

.pickbox input
{
	width: 17px;
	height: 17px;
	margin: 0;
	cursor: pointer;
	accent-color: var(--blue-dark);
}

.pickbox input:disabled
{
	cursor: not-allowed;
}

.pickbox.is-locked
{
	background: #eef2f4;
}

.pick .go
{
	display: block;
	margin: 4px auto 0;
	font-size: 11px;
}

/* With JavaScript the checkbox submits on its own, the button is not needed */
body.has-js .pick .go
{
	display: none;
}

/* --- Info icon and tooltip ----------------------------------------------- */

.info
{
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	margin-left: 7px;
	border-radius: 50%;
	background: var(--blue-dark);
	color: #ffffff;
	font-size: 12px;
	font-style: italic;
	font-family: Georgia, "Times New Roman", serif;
	cursor: help;
	vertical-align: 1px;
}

.info .bubble
{
	position: absolute;
	left: 50%;
	bottom: 140%;
	transform: translateX(-50%);
	display: none;
	width: max-content;
	max-width: 320px;
	padding: 8px 11px;
	background: #10171c;
	color: #ffffff;
	font-family: var(--font);
	font-style: normal;
	font-size: 13px;
	font-weight: normal;
	line-height: 1.35;
	text-align: left;
	white-space: pre-line;
	border-radius: 4px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
	z-index: 40;
}

.info .bubble::after
{
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #10171c;
}

.info:hover .bubble,
.info:focus .bubble
{
	display: block;
}

/* --- Legend and footer --------------------------------------------------- */

.footer
{
	border-top: 3px solid var(--blue-bright);
	padding: 12px 16px 16px;
}

.legend
{
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
	font-size: 13px;
	font-weight: bold;
}

.legend .swatch
{
	display: inline-block;
	width: 15px;
	height: 15px;
	margin-right: 6px;
	border-radius: 3px;
	border: 3px solid var(--status-open);
	vertical-align: -3px;
}

.legend .swatch.status-pending
{
	border-color: var(--status-pending);
}

.legend .swatch.status-confirmed
{
	border-color: var(--status-confirmed);
}

.download h2
{
	margin: 0 0 6px;
	font-size: 16px;
	color: var(--blue-dark);
}

.download p
{
	margin: 0 0 10px;
	font-size: 13px;
}

.download .buttons
{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.download .btn
{
	background: var(--blue-bright);
	color: #ffffff;
	border-color: var(--blue-bright);
	padding: 7px 14px;
	font-size: 14px;
}

.download .btn:hover
{
	background: var(--blue-dark);
	border-color: var(--blue-dark);
}

/* --- Flash messages ------------------------------------------------------ */

.flash
{
	position: sticky;
	top: 0;
	z-index: 50;
	margin: 0;
	padding: 9px 16px;
	font-weight: bold;
	font-size: 14px;
	color: #ffffff;
	background: var(--status-confirmed);
	box-shadow: 0 2px 8px rgba(6, 20, 28, 0.25);
	cursor: pointer;
	transition: opacity 0.4s ease;
}

.flash.is-fading
{
	opacity: 0;
}

.flash-error
{
	background: var(--status-open);
}

.flash-warning
{
	background: var(--status-pending);
	color: #3d3000;
}

/* --- Login --------------------------------------------------------------- */

.login
{
	max-width: 380px;
	margin: 60px auto;
	border: 3px solid var(--blue-bright);
	border-radius: 4px;
	overflow: hidden;
}

.login .masthead
{
	flex-direction: column;
	text-align: center;
	gap: 10px;
}

.login form
{
	padding: 18px 20px 24px;
}

.login label
{
	display: block;
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: bold;
	color: var(--blue-dark);
}

.login input
{
	width: 100%;
	margin-bottom: 14px;
	padding: 9px 10px;
	border: 2px solid var(--grey-line);
	border-radius: 3px;
	font-family: var(--font);
	font-size: 16px;
}

.login input:focus
{
	outline: none;
	border-color: var(--blue-bright);
}

.login button
{
	width: 100%;
	padding: 10px;
	border: 0;
	border-radius: 3px;
	background: var(--blue-bright);
	color: #ffffff;
	font-family: var(--font);
	font-size: 16px;
	font-weight: bold;
	cursor: pointer;
}

.login button:hover
{
	background: var(--blue-dark);
}

.login .note
{
	margin: 14px 0 0;
	font-size: 12px;
	text-align: center;
}

/* --- Modal warning ------------------------------------------------------- */

.modal-backdrop
{
	position: fixed;
	inset: 0;
	background: rgba(6, 20, 28, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	z-index: 90;
}

.modal-backdrop[hidden]
{
	display: none;
}

.modal
{
	background: #ffffff;
	border: 3px solid var(--status-pending);
	border-radius: 5px;
	max-width: 460px;
	width: 100%;
	padding: 18px 20px;
}

.modal h2
{
	margin: 0 0 10px;
	font-size: 18px;
	color: #8a6d00;
}

.modal p
{
	margin: 0 0 16px;
	font-size: 15px;
}

.modal .actions
{
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

.modal .actions button
{
	padding: 8px 16px;
	border: 2px solid var(--blue-bright);
	border-radius: 3px;
	background: var(--blue-bright);
	color: #ffffff;
	font-family: var(--font);
	font-size: 14px;
	font-weight: bold;
	cursor: pointer;
}

.modal .actions button.secondary
{
	background: #ffffff;
	color: var(--blue-dark);
}

/* --- Small screens ------------------------------------------------------- */

@media (max-width: 620px)
{
	body
	{
		padding: 0 6px 36px;
		font-size: 14px;
	}

	.masthead img
	{
		width: 62px;
		height: 62px;
	}

	.masthead h1
	{
		font-size: 20px;
	}

	.masthead h1 .cap
	{
		font-size: 25px;
	}

	.schedule
	{
		font-size: 13px;
	}

	.schedule th,
	.schedule td
	{
		padding: 5px 5px;
	}

	.schedule th
	{
		white-space: normal;
		font-size: 13px;
	}

	.schedule th .col-long
	{
		display: none;
	}

	.schedule th .col-short
	{
		display: inline;
	}

	.schedule td.title
	{
		word-break: break-word;
	}

	.schedule td.date
	{
		width: 78px;
		font-size: 13px;
	}

	.schedule td.initials
	{
		width: 62px;
		font-size: 13px;
	}

	.schedule td.pick
	{
		width: 52px;
	}

	.download .btn
	{
		flex: 1 1 100%;
		text-align: center;
	}
}
