.wwb-overlay {
	position: fixed;
	inset: 0;
	background: rgba(11, 11, 11, 0.64);
	z-index: 200;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.24s var(--wwb-ease), visibility 0.24s;
}

.wwb-overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.wwb-modal {
	position: fixed;
	inset: 0;
	z-index: 210;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	overflow: hidden;
	overscroll-behavior: contain;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.24s var(--wwb-ease), visibility 0.24s;
}

.wwb-modal.is-open {
	display: flex !important;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.wwb-modal-dialog {
	width: min(100%, 860px);
	max-height: calc(100vh - 32px);
	max-height: calc(var(--wwb-modal-vh, 100dvh) - 32px);
	background: var(--wwb-soft-cream);
	border-radius: var(--wwb-radius);
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
	position: relative;
}

.wwb-modal-dialog[tabindex="-1"]:focus {
	outline: none;
}

.wwb-modal-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	padding: 22px 24px 16px;
	border-bottom: 1px solid var(--wwb-gray-300);
	background: var(--wwb-white);
	flex: 0 0 auto;
	position: relative;
	z-index: 3;
	overflow: visible;
}

.wwb-modal-head h2 {
	font-size: clamp(2rem, 4vw, 3rem);
}

.wwb-modal-close {
	width: 44px;
	height: 44px;
	border: 0;
	background: transparent;
	cursor: pointer;
	font-size: 1.6rem;
	line-height: 1;
	flex: 0 0 auto;
	position: relative;
	z-index: 5;
	pointer-events: auto;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.wwb-modal-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 24px;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	max-height: calc(100vh - 140px);
	max-height: calc(var(--wwb-modal-vh, 100dvh) - 140px);
}

.wwb-form-progress {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wwb-gray-600);
}

.wwb-form-section {
	margin-bottom: 40px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--wwb-gray-300);
}

.wwb-form-section:last-of-type {
	border-bottom: 0;
}

.wwb-form-section h3 {
	font-size: 1.8rem;
	margin-bottom: 8px;
}

.wwb-form-section .hint {
	color: var(--wwb-gray-600);
	font-size: 0.92rem;
	margin-bottom: 18px;
}

.wwb-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.wwb-grid .full,
.field.full {
	grid-column: 1 / -1;
}

.wwb-field-spaced {
	margin-top: clamp(36px, 5vw, 56px);
	padding-top: clamp(20px, 3vw, 32px);
}

.field label {
	font-size: 0.86rem;
	font-weight: 700;
}

.req {
	color: var(--wwb-orange-dark);
}

.wwb-select-filter {
	min-height: 44px;
	margin-bottom: 6px;
	border: 1px solid var(--wwb-gray-300);
	border-radius: var(--wwb-radius);
	padding: 10px 14px;
	font: inherit;
	font-size: 16px;
	width: 100%;
	background: var(--wwb-white);
}

.field input,
.field select,
.field textarea {
	min-height: 50px;
	border: 1px solid var(--wwb-gray-300);
	border-radius: var(--wwb-radius);
	background: var(--wwb-white);
	padding: 12px 14px;
	font: inherit;
	font-size: 16px;
	color: var(--wwb-black);
	width: 100%;
}

#wwb-modal-sponsor .field select,
#wwb-modal-partner .field select,
.wwb-inline-form[data-wwb-form="contact"] .field select {
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	padding-right: 44px;
	background-color: var(--wwb-white);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%230B0B0B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M3.5 6 8 10.5 12.5 6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 14px 14px;
}

.field textarea {
	min-height: 140px;
	resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
	outline: 3px solid var(--wwb-orange);
	outline-offset: 1px;
	border-color: var(--wwb-orange);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
	border-color: #9B1C1C;
	box-shadow: inset 3px 0 0 #9B1C1C;
}

.field-error {
	color: #9B1C1C;
	font-size: 0.84rem;
	display: none;
}

.field.is-invalid .field-error {
	display: block;
}

.wwb-error-summary {
	display: none;
	background: #FDECEC;
	border: 1px solid #9B1C1C;
	padding: 16px 18px;
	margin-bottom: 20px;
}

.wwb-error-summary.is-visible {
	display: block;
}

.wwb-check {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: flex-start;
	margin-bottom: 10px;
	font-size: 0.95rem;
}

.wwb-check input {
	width: 18px;
	height: 18px;
	margin-top: 3px;
	accent-color: var(--wwb-orange);
	flex: 0 0 auto;
}

.wwb-check.is-invalid {
	outline: 2px solid #9B1C1C;
	outline-offset: 4px;
}

.wwb-check .field-error {
	display: none;
	color: #9B1C1C;
	font-size: 0.84rem;
	flex-basis: 100%;
	margin: 4px 0 0 28px;
}

.wwb-check.is-invalid .field-error {
	display: block;
}

.wwb-choice-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2px;
	margin: 8px 0 20px;
	min-width: 0;
}

.wwb-choice-list > p:first-child {
	margin-bottom: 4px;
}

.wwb-choice-list .hint {
	margin: 0 0 12px;
}

.wwb-choice-list .field-error {
	display: none;
	color: #9B1C1C;
	font-size: 0.84rem;
	margin: 8px 0 0;
}

.wwb-choice-list.is-invalid {
	outline: 2px solid #9B1C1C;
	outline-offset: 6px;
}

.wwb-choice-list.is-invalid .field-error {
	display: block;
}

#wwb-modal-application .wwb-grid,
#wwb-modal-nomination .wwb-grid,
#wwb-modal-sponsor .wwb-grid,
#wwb-modal-partner .wwb-grid {
	grid-template-columns: 1fr;
}

#wwb-modal-application .wwb-modal-dialog,
#wwb-modal-nomination .wwb-modal-dialog,
#wwb-modal-sponsor .wwb-modal-dialog,
#wwb-modal-partner .wwb-modal-dialog {
	width: min(100%, 640px);
	max-width: calc(100vw - 24px);
	overflow-x: hidden;
}

#wwb-modal-application .field,
#wwb-modal-nomination .field,
#wwb-modal-sponsor .field,
#wwb-modal-partner .field,
#wwb-modal-application .wwb-form-section,
#wwb-modal-nomination .wwb-form-section,
#wwb-modal-sponsor .wwb-form-section,
#wwb-modal-partner .wwb-form-section {
	min-width: 0;
}

.legal-page .wwb-inline-form {
	margin-top: 1.25em;
	max-width: 100%;
}

.legal-page .wwb-inline-form h3 {
	font-size: clamp(1.2rem, 2.4vw, 1.5rem);
	margin: 1.4em 0 0.7em;
}

.legal-page .wwb-inline-form h3:first-of-type {
	margin-top: 0;
}

.legal-page .field select {
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	padding-right: 44px;
	background-color: var(--wwb-white);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%230B0B0B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M3.5 6 8 10.5 12.5 6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 14px 14px;
}

.legal-page .wwb-inline-form [type="submit"] {
	margin-top: 12px;
}

.wwb-radio-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 20px;
}

.wwb-help {
	font-size: 0.86rem;
	color: var(--wwb-gray-600);
}

.wwb-draft-note {
	font-size: 0.84rem;
	color: var(--wwb-gray-600);
	margin-bottom: 16px;
}

.wwb-honeypot {
	position: absolute;
	left: -9999px;
	height: 0;
	overflow: hidden;
}

.wwb-form-success {
	text-align: left;
	padding: 12px 4px 24px;
}

.wwb-form-success h3 {
	font-size: clamp(2.2rem, 4vw, 3.6rem);
	margin-bottom: 16px;
}

.wwb-gc-reference {
	font-family: var(--wwb-font-display);
	font-size: clamp(1.6rem, 3vw, 2.4rem);
	letter-spacing: 0.04em;
	margin: 8px 0 20px;
	word-break: break-word;
}

.wwb-inline-form {
	background: var(--wwb-white);
	padding: clamp(24px, 3vw, 40px);
	border: 1px solid var(--wwb-gray-300);
}

.contact-layout {
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
	gap: clamp(28px, 4vw, 64px);
	align-items: start;
}

.contact-layout > * {
	min-width: 0;
	max-width: 100%;
}

.contact-page .wwb-grid {
	grid-template-columns: 1fr;
}

.contact-email {
	font-family: var(--wwb-font-display);
	font-size: clamp(1.6rem, 3vw, 2.4rem);
	color: var(--wwb-black);
	text-decoration: none;
	display: inline-block;
	margin: 12px 0 24px;
	word-break: break-word;
}

.contact-email:hover,
.contact-email:focus-visible {
	color: var(--wwb-orange);
}

.wwb-modal[hidden] {
	display: none !important;
}

.wwb-file-list {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	display: grid;
	gap: 8px;
	max-width: 100%;
}

.wwb-file-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 8px;
	background: var(--wwb-soft-cream);
	border-radius: var(--wwb-radius);
	max-width: 100%;
}

.wwb-file-item img {
	width: 56px;
	height: 56px;
	object-fit: contain;
	background: var(--wwb-white);
	border-radius: 4px;
	flex: 0 0 auto;
}

.wwb-file-name {
	flex: 1 1 120px;
	min-width: 0;
	overflow-wrap: anywhere;
	font-size: 0.9rem;
}

.wwb-file-remove,
.wwb-file-replace {
	border: 0;
	background: transparent;
	color: var(--wwb-orange-dark);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	padding: 6px 4px;
}

#wwb-modal-sponsor .wwb-check,
#wwb-modal-partner .wwb-check,
#wwb-modal-application .wwb-check,
#wwb-modal-nomination .wwb-check,
#wwb-modal-competition .wwb-check {
	min-width: 0;
}

#wwb-modal-sponsor .wwb-check span,
#wwb-modal-partner .wwb-check span,
#wwb-modal-application .wwb-check span,
#wwb-modal-nomination .wwb-check span,
#wwb-modal-competition .wwb-check span {
	overflow-wrap: anywhere;
}

@media (max-width: 767px) {
	.wwb-modal {
		padding: 12px;
		align-items: stretch;
	}

	.wwb-modal-dialog {
		width: 100%;
		max-height: calc(100vh - 24px);
		max-height: calc(var(--wwb-modal-vh, 100dvh) - 24px);
		height: auto;
		min-height: 0;
		border-radius: var(--wwb-radius);
		padding-bottom: env(safe-area-inset-bottom);
	}

	.wwb-modal-head {
		padding: 18px 16px 14px;
	}

	.wwb-modal-body {
		max-height: calc(100vh - 132px);
		max-height: calc(var(--wwb-modal-vh, 100dvh) - 132px);
		padding: 20px 16px 28px;
	}

	.wwb-grid {
		grid-template-columns: 1fr;
	}

	.contact-layout {
		grid-template-columns: 1fr;
	}

	.wwb-modal [type="submit"],
	.wwb-modal [data-modal-close].btn {
		width: 100%;
		white-space: normal;
	}

	.wwb-modal-head h2 {
		font-size: clamp(1.7rem, 8vw, 2.4rem);
	}

	#wwb-modal-application .wwb-radio-row {
		flex-direction: column;
		gap: 8px;
	}
}

@media (max-height: 500px) and (orientation: landscape) {
	.wwb-modal {
		padding: 8px;
		align-items: stretch;
	}

	.wwb-modal-dialog {
		max-height: calc(var(--wwb-modal-vh, 100dvh) - 16px);
		height: auto;
	}

	.wwb-modal-body {
		max-height: calc(var(--wwb-modal-vh, 100dvh) - 100px);
		padding: 16px 16px 24px;
	}
}

.wwb-featured-choice {
	display: grid;
	gap: 32px;
}

.wwb-featured-choice-option h3 {
	font-size: clamp(1.6rem, 3.5vw, 2.35rem);
	margin: 0 0 10px;
}

.wwb-featured-choice-option p {
	margin: 0 0 18px;
}

#wwb-modal-application .wwb-inline-form h3 {
	font-size: clamp(1.2rem, 2.4vw, 1.5rem);
	margin: 1.4em 0 0.7em;
}

#wwb-modal-application .wwb-form-intro,
#wwb-modal-nomination .wwb-form-intro,
#wwb-modal-competition .wwb-form-intro,
#wwb-modal-sponsor .wwb-form-intro,
#wwb-modal-partner .wwb-form-intro {
	margin-bottom: 0;
}

#wwb-modal-application .wwb-form-intro p,
#wwb-modal-nomination .wwb-form-intro p,
#wwb-modal-competition .wwb-form-intro p {
	margin: 0 0 12px;
}

#wwb-modal-application .wwb-form-intro .hint,
#wwb-modal-nomination .wwb-form-intro .hint,
#wwb-modal-competition .wwb-form-intro .hint,
#wwb-modal-sponsor .wwb-form-intro .hint,
#wwb-modal-partner .wwb-form-intro .hint {
	color: var(--wwb-gray-600);
	margin-bottom: 0;
}

.wwb-form-break {
	border: 0;
	height: 0;
	border-top: 1px solid var(--wwb-orange);
	width: 100%;
	margin: 32px 0 36px;
}

@media (min-width: 700px) {
	.wwb-featured-choice {
		grid-template-columns: 1fr 1fr;
		gap: 28px 36px;
		align-items: start;
	}
}
