/* Gazebo — GOV.UK–inspired layout; Bootstrap 5.3+ handles forms, modals, tables, buttons. */

:root {
	--govuk-blue: #005ea5;
	--govuk-blue-dark: #003078;
	--bs-primary: #005ea5;
	--bs-primary-rgb: 0, 94, 165;
	--bs-link-color: #005ea5;
	--bs-link-hover-color: #003078;
	--bs-body-bg: #dee0e2;
	--bs-body-color: #0b0c0c;
	--bs-border-color: #b1b4b6;
	--bs-success: #00703c;
	--bs-success-rgb: 0, 112, 60;
	--page-bg: #dee0e2;
	--text-secondary: #505a5f;
	--focus: #ffdd00;
	--font: "GDS Transport", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--panel-bg: #ffffff;
	--sidebar-bg: #f3f2f1;
}

html {
	font-size: 100%;
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: var(--font);
	font-size: 19px;
	line-height: 1.3157894737;
	color: var(--bs-body-color);
	background: var(--page-bg);
}

@media (max-width: 40.0625em) {
	body {
		font-size: 16px;
		line-height: 1.25;
	}
}

a:not(.btn):link,
a:not(.btn):visited {
	color: var(--govuk-blue);
}

a:not(.btn):hover {
	color: var(--govuk-blue-dark);
}

a:focus {
	outline: 3px solid transparent;
	color: #0b0c0c !important;
	background-color: var(--focus) !important;
	box-shadow: 0 -2px #ffdd00, 0 4px #0b0c0c !important;
	text-decoration: none;
}

/* GOV service focus for Bootstrap buttons (override ring) */
.btn.btn-success:focus,
.btn.btn-success:focus-visible,
.btn.btn-outline-secondary:focus,
.btn.btn-outline-secondary:focus-visible,
.btn.btn-link:focus,
.btn.btn-link:focus-visible,
.btn.btn-outline-primary:focus,
.btn.btn-outline-primary:focus-visible {
	color: #0b0c0c !important;
	background-color: var(--focus) !important;
	border-color: #0b0c0c;
	box-shadow: 0 0 0 3px #ffdd00, inset 0 0 0 2px #0b0c0c;
	outline: none;
}

.btn.btn-link:focus,
.btn.btn-link:focus-visible {
	box-shadow: 0 -2px #ffdd00, 0 4px #0b0c0c;
}

.skip-link {
	position: absolute;
	left: -9999px;
	z-index: 100;
	padding: 0.5rem 1rem;
	background: var(--focus);
	color: #0b0c0c;
	font-weight: 700;
}

.skip-link:focus {
	left: 0;
	top: 0;
}

.global-bar {
	background: #0b0c0c;
	color: #fff;
	font-size: 14px;
	line-height: 1.1428571429;
}

.global-bar__inner {
	max-width: 100%;
	padding: 0.25rem 1rem;
}

.site-header {
	background: linear-gradient(135deg, #003078 0%, #1d70b8 100%);
	color: #fff;
	border-bottom: 4px solid #001f4f;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	position: sticky;
	top: 0;
	z-index: 1030;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	max-width: 100%;
	padding: 0.6rem 1rem;
	flex-wrap: nowrap;
}

@media (min-width: 768px) {
	.site-header__inner {
		padding: 0.65rem 1.5rem;
	}
}

.site-header a.link-button:link,
.site-header a.link-button:visited,
.site-header a {
	color: #fff;
	text-decoration: underline;
}

.site-header a:hover {
	color: #fff;
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
}

.brand:link,
.brand:visited {
	color: #fff;
}

.brand:hover .brand__text {
	text-decoration: underline;
}

.brand__logo {
	height: 32px;
	width: auto;
	display: block;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

@media (min-width: 768px) {
	.brand__logo {
		height: 38px;
	}
}

.brand__text {
	font-weight: 700;
	font-size: 1.5rem;
	line-height: 1.0416666667;
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 0.5rem 0.75rem;
	font-size: 14px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.site-header__actions > span {
	opacity: 0.92;
	white-space: nowrap;
}

@media (min-width: 576px) {
	.site-header__actions { font-size: 15px; }
}

@media (max-width: 480px) {
	.site-header__actions > span {
		max-width: 110px;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

.form-inline-logout {
	margin: 0;
	display: inline;
}

.link-button {
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	font: inherit;
	text-decoration: underline;
	padding: 0;
}

.link-button:focus {
	color: #0b0c0c !important;
	background: #ffdd00;
	box-shadow: 0 2px 0 #0b0c0c;
}

.wrapper {
	width: 100%;
	max-width: 100%;
	padding: 0;
}

.main-grid {
	width: 100%;
	padding: 1.5rem 1rem 3rem;
}

@media (min-width: 40.0625em) {
	.main-grid {
		padding: 2rem 1.5rem 4rem;
	}
}

.layout-dashboard {
	display: flex;
	width: 100%;
	min-height: calc(100vh - 120px);
	align-items: stretch;
}

.layout-dashboard--topnav {
	flex-direction: column;
	align-items: stretch;
}

.service-nav {
	background: #ffffff;
	border-bottom: 1px solid var(--bs-border-color);
	width: 100%;
	position: sticky;
	top: 56px;
	z-index: 1020;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
	.service-nav { top: 64px; }
}

.service-nav__inner {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0;
	padding: 0 0.5rem;
	width: 100%;
	overflow-x: auto;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.service-nav__inner::-webkit-scrollbar { height: 4px; }
.service-nav__inner::-webkit-scrollbar-thumb { background: rgba(0, 94, 165, 0.25); border-radius: 4px; }

.service-nav__link {
	display: inline-flex;
	align-items: center;
	padding: 0.85rem 1.1rem;
	color: var(--govuk-blue);
	text-decoration: none;
	font-weight: 500;
	font-size: 15px;
	border-bottom: 3px solid transparent;
	white-space: nowrap;
	transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.service-nav__link:hover {
	text-decoration: none;
	background: rgba(0, 94, 165, 0.06);
	color: var(--govuk-blue-dark);
	border-bottom-color: rgba(0, 94, 165, 0.35);
}

.service-nav__link--current {
	font-weight: 700;
	color: var(--govuk-blue-dark);
	border-bottom-color: var(--govuk-blue);
	background: rgba(0, 94, 165, 0.08);
	text-decoration: none;
}

.service-nav__link:focus {
	outline: 3px solid var(--focus);
	outline-offset: -3px;
}

@media (min-width: 992px) {
	.service-nav__link {
		padding: 0.85rem 1.25rem;
		font-size: 16px;
	}
}

.layout-dashboard__main--full {
	flex: 1 1 auto;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding: 1.25rem 1rem 2.5rem;
	box-sizing: border-box;
}

@media (min-width: 48em) {
	.layout-dashboard__main--full {
		padding: 1.5rem 1.5rem 3rem;
	}
}

.layout-dashboard__sidebar {
	flex: 0 0 260px;
	max-width: 100%;
	background: var(--sidebar-bg);
	border-right: 1px solid var(--bs-border-color);
	padding: 1rem 0;
}

.layout-dashboard__main {
	flex: 1 1 auto;
	min-width: 0;
	padding: 1.5rem 1rem 3rem;
}

@media (max-width: 40.0625em) {
	.layout-dashboard:not(.layout-dashboard--topnav) {
		flex-direction: column;
	}

	.layout-dashboard:not(.layout-dashboard--topnav) .layout-dashboard__sidebar {
		flex-basis: auto;
		border-right: 0;
		border-bottom: 1px solid var(--bs-border-color);
	}
}

.weekly-analytics-chart-wrap {
	position: relative;
	width: 100%;
	max-width: 100%;
	height: 280px;
}

.weekly-analytics-chart-wrap--thin {
	height: 120px;
}

.weekly-analytics-chart-wrap--tall {
	height: 340px;
}

.side-nav__title {
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--text-secondary);
	padding: 0 1rem 0.5rem;
	margin: 0;
}

.side-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.side-nav__link {
	display: block;
	padding: 0.75rem 1rem;
	color: var(--bs-body-color);
	text-decoration: none;
	border-left: 4px solid transparent;
	font-weight: 400;
}

.side-nav__link:hover {
	background: rgba(0, 94, 165, 0.06);
	text-decoration: underline;
}

.side-nav__link--current {
	background: #fff;
	border-left-color: var(--govuk-blue);
	font-weight: 700;
	text-decoration: none;
}

.side-nav__link:focus {
	outline: none;
	color: #0b0c0c;
	background: #ffdd00;
	box-shadow: inset 0 0 0 4px #0b0c0c;
}

.heading-xl {
	font-size: 2rem;
	line-height: 1.09375;
	font-weight: 700;
	margin: 0 0 1rem;
}

@media (min-width: 40.0625em) {
	.heading-xl {
		font-size: 2.5rem;
		line-height: 1.0416666667;
	}
}

.lead {
	font-size: 1.125rem;
	color: var(--text-secondary);
	margin: 0 0 1.5rem;
	
}

.container-narrow {
	max-width: 40rem;
}

.center-narrow {
	display: flex;
	justify-content: center;
	width: 100%;
}

/* Help modal (Bootstrap) — prose in body */
.help-prose h2 {
	font-size: 1.25rem;
	margin: 1.25rem 0 0.5rem;
}

.help-prose h2:first-of-type,
.help-prose > :first-child {
	margin-top: 0;
}

.help-prose ol,
.help-prose ul {
	margin: 0.5rem 0 0;
	padding-left: 1.5rem;
}

.help-prose li {
	margin-bottom: 0.35rem;
}

.help-prose p {
	margin: 0.5rem 0 0;
}

.footer-meta {
	border-top: 1px solid var(--bs-border-color);
	background: var(--sidebar-bg);
	padding: 1rem;
	font-size: 16px;
	color: var(--text-secondary);
}

.footer-meta__inner {
	margin: 0;
}

.weekly-form {
	display: grid;
	gap: 0.75rem;
	
}

.modal-header .btn-close {
	filter: none;
}

/* No backdrop: no dimmer; let clicks through outside the dialog */
.modal[data-bs-backdrop="false"] {
	pointer-events: none;
}
.modal[data-bs-backdrop="false"] .modal-dialog {
	pointer-events: auto;
}
.modal[data-bs-backdrop="false"] .modal-content {
	box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

.weekly-preview-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-end;
	margin-bottom: 0.75rem;
}

.weekly-preview-toolbar__field {
	font-size: 0.875rem;
}

.weekly-preview-toolbar__field--grow {
	flex: 1 1 12rem;
	min-width: 8rem;
}
