/* Surf Pacific Holiday Banner */

#sphb[hidden],
#sphb-dialog[hidden] {
	display: none !important;
}

/* Snow layer: sits on the popup backdrop, behind the panel */
#sphb-dialog #sphb-snow {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 0;
}

/* Badge */
#sphb {
	position: fixed;
	bottom: 16px;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 2147482999;
	max-width: calc(100% - 32px);
	font-family: inherit;
	line-height: 1.2;
}
#sphb.sphb--bottom-left { left: 16px; }
#sphb.sphb--bottom-right { right: 16px; }

#sphb .sphb-badge {
	position: relative;
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
}

#sphb .sphb-badge__img {
	position: relative;
	z-index: 1;
	display: block;
	flex: 0 0 auto;
	width: 90px;
	height: auto;
	max-width: none;
	margin: 0 -14px 0 0;
	border: 0;
	box-shadow: none;
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

#sphb .sphb-badge__btn {
	-webkit-appearance: none;
	appearance: none;
	display: inline-block;
	width: auto;
	min-width: 0;
	min-height: 0;
	height: auto;
	margin: 0;
	padding: 12px 20px 12px 28px;
	border: 0;
	border-radius: 999px;
	background: var(--sphb-bg, #394780);
	color: var(--sphb-fg, #ffffff);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#sphb .sphb-badge__btn:hover {
	background: var(--sphb-bg, #394780);
	color: var(--sphb-fg, #ffffff);
	transform: translateY(-1px);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

#sphb .sphb-badge__hide {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	top: -8px;
	right: -8px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #ffffff;
	color: #222222;
	font: inherit;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#sphb button:focus-visible,
#sphb-dialog button:focus-visible {
	outline: 3px solid #ffbf47;
	outline-offset: 2px;
}

/* Popup */
html.sphb-lock,
html.sphb-lock body {
	overflow: hidden;
}

#sphb-dialog {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.6);
}

#sphb-dialog .sphb-dialog__panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

/* ---- Popup panel and notice (shared with the admin preview) ---- */

.sphb-panel {
	box-sizing: border-box;
	border-radius: 14px;
	background: #ffffff;
	color: #222222;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.55;
	text-align: center;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	overflow: hidden;
}
.sphb-panel *,
.sphb-panel *::before,
.sphb-panel *::after {
	box-sizing: border-box;
}

.sphb-panel .sphb-n__head {
	padding: 26px 56px 22px;
	background: var(--sphb-bg, #394780);
	color: var(--sphb-fg, #ffffff);
}
.sphb-panel .sphb-n__pic {
	display: block;
	width: 56px;
	height: auto;
	max-width: none;
	margin: 0 auto 10px;
	border: 0;
	box-shadow: none;
	filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}
.sphb-panel .sphb-n__title {
	margin: 0;
	padding: 0;
	color: inherit;
	font-family: inherit;
	font-size: 27px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: normal;
	text-transform: none;
}
.sphb-panel .sphb-n__who {
	margin: 6px 0 0;
	padding: 0;
	color: inherit;
	font-size: 15px;
	font-weight: 600;
	opacity: 0.85;
}

.sphb-panel .sphb-n__body {
	padding: 22px 24px 24px;
}
.sphb-panel .sphb-n__body > :last-child {
	margin-bottom: 0;
}
.sphb-panel .sphb-n__body p {
	margin: 0 0 10px;
	padding: 0;
	color: inherit;
	font-size: 16px;
}

/* The two dates */
.sphb-panel .sphb-n__dates {
	display: flex;
	gap: 12px;
	margin: 0 0 16px;
}
.sphb-panel .sphb-n__date {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: 2px;
	padding: 14px 10px 13px;
	border-radius: 10px;
	background: var(--sphb-tint, #eceef5);
}
.sphb-panel .sphb-n__label {
	color: #4a4a4a;
	font-size: 14px;
	font-weight: 600;
}
.sphb-panel .sphb-n__day {
	color: var(--sphb-accent, #394780);
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
}
.sphb-panel .sphb-n__sub {
	color: #222222;
	font-size: 15px;
	font-weight: 700;
}

/* Emergency box */
.sphb-panel .sphb-n__urgent {
	margin: 0 0 16px;
	padding: 14px 16px 16px;
	border: 2px solid var(--sphb-accent, #394780);
	border-radius: 10px;
}
.sphb-panel .sphb-n__urgent p {
	font-size: 15px;
}
.sphb-panel .sphb-n__urgent > :last-child {
	margin-bottom: 0;
}
.sphb-panel .sphb-n__body .sphb-n__urgent-title {
	margin: 0 0 4px;
	color: var(--sphb-accent, #394780);
	font-size: 17px;
	font-weight: 800;
}
.sphb-panel .sphb-n__call {
	display: inline-block;
	margin-top: 4px;
	padding: 10px 22px;
	border-radius: 999px;
	background: var(--sphb-bg, #394780);
	color: var(--sphb-fg, #ffffff);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}
.sphb-panel .sphb-n__call:hover,
.sphb-panel .sphb-n__call:focus {
	background: var(--sphb-bg, #394780);
	color: var(--sphb-fg, #ffffff);
	text-decoration: underline;
}

.sphb-panel .sphb-n__message p {
	color: #555555;
	font-size: 15px;
}

/* Custom HTML notices */
.sphb-panel .sphb-n--custom {
	border-top: 6px solid var(--sphb-bg, #394780);
}
.sphb-panel .sphb-n--custom .sphb-n__body {
	padding: 44px 28px 28px;
}
.sphb-panel .sphb-n--custom h2 {
	margin: 0 0 14px;
	color: var(--sphb-accent, #394780);
	font-weight: 800;
	line-height: 1.25;
}

#sphb-dialog .sphb-dialog__close {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	z-index: 2;
	top: 10px;
	right: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #222222;
	font: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
#sphb-dialog .sphb-dialog__close:hover {
	background: #ffffff;
	color: #222222;
}

@media (max-width: 480px) {
	#sphb .sphb-badge__img { width: 64px; margin-right: -12px; }
	#sphb .sphb-badge__btn { font-size: 14px; padding: 10px 16px 10px 22px; }
	.sphb-panel .sphb-n__head { padding: 22px 48px 18px; }
	.sphb-panel .sphb-n__title { font-size: 23px; }
	.sphb-panel .sphb-n__body { padding: 18px 16px 20px; }
	.sphb-panel .sphb-n__dates { flex-direction: column; gap: 8px; }
	.sphb-panel .sphb-n--custom .sphb-n__body { padding: 44px 20px 22px; }
}

@media (prefers-reduced-motion: reduce) {
	#sphb .sphb-badge__btn { transition: none; }
	#sphb .sphb-badge__btn:hover { transform: none; }
}
