/* ==========================================================================
   Siteworks on the site: forms (Get updates, Contact) and the message
   bar. Colours follow the theme's tokens, with the PageCore values as
   fallbacks. Inside dark sections (.pcl-dark) the forms turn light-on-dark.
   ========================================================================== */

.sw-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Fields and button ---------------------------------------------------------- */
.sw-form .sw-input {
	box-sizing: border-box;
	width: 100%;
	min-height: 46px;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--pcl-border-strong, #D5D5E3);
	border-radius: 4px;
	background: var(--pcl-surface, #fff);
	color: var(--wp--preset--color--pc-headings, #0A0B1E);
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
}
/* Focus: only the border colour changes (owner, 2026-10-31: "not make it thick"). */
.sw-form .sw-input:focus { border-color: var(--wp--preset--color--pc-accent, #002FA7); outline: none; }
.sw-form textarea.sw-input { min-height: 9rem; resize: vertical; }
.sw-form .sw-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0.7rem 1.35rem;
	border: 0;
	border-radius: 6px;
	background: var(--wp--preset--gradient--pcl-button, #002FA7);
	color: #fff;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	transition: filter 0.2s, transform 0.2s;
}
.sw-form .sw-button:hover { filter: brightness(1.12); }
.sw-form .sw-button:disabled { cursor: wait; opacity: 0.7; }
.sw-form__note { margin: 0.6rem 0 0 !important; color: var(--pcl-muted, #676983); font-size: 0.8125rem; }
.sw-form__msg { margin: 0.6rem 0 0 !important; font-size: 0.9375rem; font-weight: 500; }
.sw-form__msg:empty { display: none; }
.sw-form__msg[data-state="ok"] { color: #047857; }
.sw-form__msg[data-state="error"] { color: #B42318; }
.sw-actions { margin: 0 !important; }

/* Get updates ------------------------------------------------------------------- */
.sw-subscribe__row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sw-subscribe__row .sw-input { flex: 1 1 14rem; width: auto; }
.sw-subscribe__row .sw-button { flex: none; }
@media (max-width: 479px) { .sw-subscribe__row .sw-button { flex: 1 1 100%; } }

/* Contact ------------------------------------------------------------------------- */
.sw-contact .sw-field { margin: 0 0 1.1rem !important; }
.sw-contact .sw-field label { display: block; margin-bottom: 0.4rem; color: var(--wp--preset--color--pc-headings, #0A0B1E); font-size: 0.9375rem; font-weight: 600; }
.sw-check { margin: 0 0 1.25rem !important; font-size: 0.9375rem; }
.sw-check label { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.sw-check input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--wp--preset--color--pc-accent, #002FA7); }

/* On dark sections ------------------------------------------------------------------ */
.pcl-dark .sw-form .sw-input { border-color: rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.06); color: #fff; }
.pcl-dark .sw-form .sw-input::placeholder { color: rgba(255, 255, 255, 0.55); }
.pcl-dark .sw-contact .sw-field label { color: #fff; }
.pcl-dark .sw-form__note { color: rgba(255, 255, 255, 0.6); }
.pcl-dark .sw-form__msg[data-state="ok"] { color: #6EE7B7; }
.pcl-dark .sw-form__msg[data-state="error"] { color: #FCA5A5; }

/* Message bar above the header --------------------------------------------------------- */
.sw-bar { position: relative; z-index: 101; font-size: 0.9375rem; line-height: 1.45; text-align: center; }
.sw-bar[hidden] { display: none; }
.sw-bar__inner { box-sizing: border-box; max-width: 1280px; margin: 0 auto; padding: 0.7rem 3rem; }
.sw-bar p { margin: 0; }
.sw-bar a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 0.18em; }
.sw-bar--announce { background: var(--wp--preset--gradient--pcl-button, #002FA7); color: #fff; }
.sw-bar--notice { border-bottom: 1px solid var(--wp--preset--color--pc-border, #D6E0F6); background: var(--wp--preset--color--pc-accent-light, #EBF0FB); color: var(--pcl-ink, #00226F); }
.sw-bar__close { position: absolute; top: 50%; right: 0.75rem; width: 2rem; height: 2rem; padding: 0; transform: translateY(-50%); border: 0; border-radius: 4px; background: none; color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.sw-bar__close:hover { background: rgba(255, 255, 255, 0.15); }
.sw-bar__form { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 1rem; }
.sw-bar .sw-button {
	min-height: 0;
	padding: 0.45rem 1rem;
	border: 0;
	border-radius: 6px;
	background: var(--wp--preset--gradient--pcl-button, #002FA7);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
@media (max-width: 599px) { .sw-bar__inner { padding: 0.6rem 2.75rem 0.6rem 1rem; text-align: left; } }
