/* ==========================================================================
   Dashboard – collapsible panel above the homepage hero
   template-parts/component-dashboard.php + js/dashboard.js
   ========================================================================== */

/* Reset the theme's generic `section` rule (padding: 80px 0; overflow: hidden; z-index: 1) */
section.dashboard {
	position: relative;
	z-index: 20;
	padding: 0;
	overflow: visible;
}

.dashboard-panel {
	background: #f2f7f9;
	box-shadow: 0 4px 4px rgba(0, 0, 0, .15);
	padding: 28px 0 32px;
}

.dashboard.is-closed .dashboard-panel {
	display: none;
}

.dashboard-container {
	max-width: 1312px;
	margin: 0 auto;
	padding: 0 16px;
}

.dashboard-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 20px;
}

/* Card
   ========================================================================== */

.dashboard-card {
	display: flex;
	flex-direction: column;
	min-height: 362px;
	padding: 14px 17px 14px;
	background: #fff;
	border: 1px solid #006d93;
}

.dashboard .dashboard-card-title {
	margin: 0 0 22px !important;
	padding: 0 0 10px;
	border-bottom: 2px solid #006d93;
	color: #006d93 !important;
	font-family: "Playfair Display", serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.33;
	letter-spacing: 0;
	text-transform: none;
}

.dashboard-card-body {
	flex: 1 1 auto;
}

.dashboard .dashboard-card-body,
.dashboard .dashboard-card-body p {
	color: #000;
	font-family: "Noto Sans", sans-serif;
	font-size: 16px;
	line-height: 1.36;
}

.dashboard .dashboard-text p {
	margin: 0 0 22px;
}

.dashboard .dashboard-text .dashboard-text-heading {
	margin-bottom: 0;
}

.dashboard .dashboard-text p:last-child {
	margin-bottom: 0;
}

.dashboard .dashboard-card-body strong {
	font-weight: 700;
}

/* News / notice items */
.dashboard .dashboard-items {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dashboard .dashboard-items li + li {
	margin-top: 12px;
}

.dashboard .dashboard-item {
	display: block;
	padding: 15px 12px;
	background: rgba(0, 109, 147, .2);
	color: #000;
	text-decoration: none;
	transition: background-color .2s;
}

.dashboard .dashboard-item:hover,
.dashboard .dashboard-item:focus {
	background: rgba(0, 109, 147, .32);
	color: #000;
}

.dashboard-item-date,
.dashboard-item-title {
	display: block;
}

/* Async widgets (weather / tides) – loading and error states */
.dashboard .dashboard-card-body .dashboard-loading,
.dashboard .dashboard-card-body .dashboard-unavailable {
	margin: 0;
	color: #5a5a59;
	font-style: italic;
}

/* Weather – reuses template-parts/component-weather.php, undo its hero positioning */
.dashboard .weather {
	position: static;
	display: block;
	width: auto;
	height: auto;
	pointer-events: auto;
}

.dashboard .weather .container {
	display: block;
	width: auto;
	max-width: none;
	height: auto;
	margin: 0;
	padding: 0;
}

.dashboard .weather-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: auto;
	margin: 0;
	padding: 0;
	background: none;
}

.dashboard .weather-box .weather-icon {
	display: none;
}

.dashboard .dashboard-weather {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding-bottom: 30px;
	text-align: center;
}

.dashboard .dashboard-weather img {
	display: block;
	width: 64px;
	height: 64px;
}

.dashboard .dashboard-weather p {
	margin: 0;
	color: #3c3c3b;
}

.dashboard .dashboard-weather .date {
	font-weight: 600;
}

.dashboard .dashboard-weather .temperature {
	margin: 4px 0 2px;
	color: #3c3c3b;
	font-family: "Playfair Display", serif;
	font-size: 24px;
	font-weight: 700;
}

.dashboard .dashboard-weather .summary {
	font-size: 17px;
}

/* Buttons */
.dashboard-card-actions {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 16px;
}

.dashboard .dashboard-btn {
	display: block;
	padding: 3px 4px;
	background: #006d93;
	border-radius: 3px;
	color: #fff;
	font-family: "Noto Sans", sans-serif;
	font-size: 16px;
	line-height: 22px;
	text-align: center;
	text-decoration: none;
	text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
	text-transform: uppercase;
	transition: background-color .2s;
}

.dashboard .dashboard-btn:hover,
.dashboard .dashboard-btn:focus {
	background: #005270;
	color: #fff;
}

/* Visible keyboard focus (the theme removes all outlines with `:active, :focus { outline: none !important }`) */
.dashboard .dashboard-item:focus-visible,
.dashboard .dashboard-btn:focus-visible,
.dashboard .dashboard-text a:focus-visible {
	outline: 2px solid #003e54 !important;
	outline-offset: 2px;
}

/* Toggle tab – hangs from the bottom edge of the panel over the hero
   ========================================================================== */

.dashboard-toggle {
	position: absolute;
	top: 100%;
	left: 50%;
	display: flex;
	align-items: center;
	gap: 12px;
	width: 175px;
	height: 40px;
	padding: 0 14px;
	transform: translateX(-50%);
	background: #f2f7f9;
	border: 0;
	border-radius: 0;
	box-shadow: 0 4px 4px rgba(0, 0, 0, .15);
	color: #006d93;
	font-family: "Playfair Display", serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
}

.dashboard-toggle:hover,
.dashboard-toggle:focus {
	background: #fff;
	outline: none;
}

.dashboard-toggle:focus-visible {
	outline: 2px solid #006d93 !important;
	outline-offset: 2px;
}

.dashboard-toggle i {
	font-size: 14px;
	transition: transform .3s;
}

.dashboard.is-closed .dashboard-toggle i {
	transform: rotate(180deg);
}

.dashboard-toggle-view,
.dashboard.is-closed .dashboard-toggle-hide {
	display: none;
}

.dashboard.is-closed .dashboard-toggle-view {
	display: inline;
}

/* Hero adjustments when the dashboard is present
   ========================================================================== */

/* Keep the breadcrumb (inner pages) clear of the toggle tab:
   tablet/desktop – text stays left of the centred tab, mobile – text goes below it.
   Half the .container max-width (750 / 970 / 1170px) + 100px for the tab. A percentage
   can't be used here: it resolves against the full-width parent, so on wide screens
   (>1875px) it eats the 1170px container and the breadcrumb wraps. */
@media (min-width: 768px) {
	.dashboard + .breadcrumbs .container {
		padding-right: 475px;
	}
}

@media (min-width: 992px) {
	.dashboard + .breadcrumbs .container {
		padding-right: 585px;
	}
}

@media (min-width: 1200px) {
	.dashboard + .breadcrumbs .container {
		padding-right: 685px;
	}
}

@media (max-width: 767px) {
	.dashboard + .breadcrumbs {
		padding-top: 42px;
	}
}

/* Keep the hero caption clear of the toggle tab */
.dashboard ~ #slider .hero-heading-2 {
	margin-top: 60px;
}

@media (min-width: 1200px) {
	.dashboard ~ #slider .hero-heading-2 {
		margin-top: 100px;
	}
}

/* Tablet
   ========================================================================== */

@media (max-width: 1199px) {
	.dashboard-container {
		padding: 0 25px;
	}

	.dashboard-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 21px;
	}

	.dashboard-card {
		min-height: 0;
		padding: 14px 20px 13px;
	}

	.dashboard .dashboard-card-title {
		margin-bottom: 18px !important;
		font-size: 18px;
	}

	.dashboard .dashboard-text p {
		font-size: 14px;
	}

	.dashboard .dashboard-text p:only-child {
		margin-bottom: 0;
	}

	/* Keep the tide text at 16px like the design */
	.dashboard .dashboard-card:nth-child(3) .dashboard-text p {
		font-size: 16px;
	}

	.dashboard-card-actions {
		gap: 12px;
	}
}

/* Mobile
   ========================================================================== */

@media (max-width: 767px) {
	.dashboard-panel {
		padding: 28px 0 22px;
	}

	.dashboard-container {
		padding: 0 14px;
	}

	.dashboard-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}

	.dashboard-card {
		padding: 11px 13px 13px;
	}

	.dashboard .dashboard-card-title {
		margin-bottom: 16px !important;
		padding-bottom: 8px;
		font-size: 16px;
	}

	.dashboard .dashboard-card-body,
	.dashboard .dashboard-card-body p,
	.dashboard .dashboard-card:nth-child(3) .dashboard-text p {
		font-size: 14px;
	}

	.dashboard .dashboard-item {
		padding: 8px 11px;
	}

	.dashboard .dashboard-items li + li {
		margin-top: 11px;
	}

	.dashboard .dashboard-weather {
		padding-bottom: 10px;
	}

	.dashboard-card-actions {
		gap: 8px;
		margin-top: 12px;
	}

	.dashboard .dashboard-btn {
		padding: 2px 4px;
		font-size: 14px;
		line-height: 20px;
	}

	.dashboard-toggle {
		gap: 10px;
		width: 160px;
		height: 32px;
		padding: 0 12px;
		font-size: 14px;
	}

	.dashboard-toggle i {
		font-size: 12px;
	}
}

/* Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.dashboard-toggle i,
	.dashboard .dashboard-item,
	.dashboard .dashboard-btn {
		transition: none;
	}
}
