/**
 * Shared form panel styles — aligned with event booking modal & checkout.
 */

body:has(.helsola-form-page) {
	background: #f8fafc;
}

.helsola-form-page {
	display: flex;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	padding: 0 1rem 3rem;
}

.helsola-form-panel {
	width: 100%;
	max-width: 42rem;
	overflow: hidden;
	background: #fff;
	border: 1px solid #d9e1ec;
	border-radius: 18px;
	box-shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
}

.helsola-form-panel--narrow {
	max-width: 28rem;
}

.helsola-form-panel__header {
	flex-shrink: 0;
	padding: 0.85rem 1.25rem;
	border-bottom: 1px solid #e2e8f0;
	background: #fff;
}

.helsola-form-panel__title {
	margin: 0;
	font-size: 1.625rem;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.025em;
	color: #183153;
}

.helsola-form-panel__intro {
	margin: 0.75rem 0 0;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: #64748b;
}

.helsola-form-panel__intro p {
	margin: 0 0 0.5rem;
}

.helsola-form-panel__intro p:last-child {
	margin-bottom: 0;
}

.helsola-form-panel__body {
	padding: 1.25rem;
}

.helsola-form-panel__footer {
	padding: 0.9rem 1.25rem;
	border-top: 1px solid #e2e8f0;
	background: #f8fafc;
}

.helsola-form-panel__links {
	margin: 0;
	text-align: center;
	font-size: 0.9375rem;
}

.helsola-form-panel__links a {
	color: var(--helsola-primary);
	text-decoration: none;
}

.helsola-form-panel__links a:hover {
	text-decoration: underline;
}

.helsola-form-stack {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.helsola-form-grid {
	display: grid;
	gap: 1rem;
}

.helsola-form-grid--2 {
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
	.helsola-form-grid--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.helsola-form-group {
	margin: 0;
}

.helsola-form-group label {
	display: block;
	margin-bottom: 0.375rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #213656;
}

/* Inputs — match booking modal overrides; scoped to beat theme styles */
.helsola-form-page .helsola-form-panel .helsola-input,
.helsola-form-page .helsola-form-panel .helsola-textarea,
.helsola-form-page .helsola-form-panel .helsola-select,
.helsola-form-page .helsola-form-panel input.helsola-input,
.helsola-form-page .helsola-form-panel textarea.helsola-textarea {
	box-sizing: border-box;
	width: 100%;
	height: 3.1rem;
	margin: 0;
	padding: 0 0.9rem;
	border: 1px solid #e2e8f0 !important;
	border-radius: 0.75rem !important;
	font-size: 0.875rem !important;
	font-family: inherit;
	line-height: 1.4;
	color: #334155 !important;
	background-color: #fff !important;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.helsola-form-page .helsola-form-panel .helsola-textarea,
.helsola-form-page .helsola-form-panel textarea.helsola-textarea {
	height: auto;
	min-height: 5rem;
	padding: 0.75rem 0.9rem;
}

.helsola-form-page .helsola-form-panel .helsola-input::placeholder,
.helsola-form-page .helsola-form-panel .helsola-textarea::placeholder {
	color: #94a3b8;
	opacity: 1;
}

.helsola-form-page .helsola-form-panel .helsola-input:hover,
.helsola-form-page .helsola-form-panel .helsola-textarea:hover {
	border-color: #cbd5e1 !important;
}

.helsola-form-page .helsola-form-panel .helsola-input:focus,
.helsola-form-page .helsola-form-panel .helsola-textarea:focus {
	outline: none !important;
	border-color: var(--helsola-primary) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--helsola-primary) 18%, transparent) !important;
}

.helsola-form-page .helsola-form-panel .helsola-password-field {
	display: flex;
	align-items: stretch;
	overflow: hidden;
	border: 1px solid #e2e8f0 !important;
	border-radius: 0.75rem !important;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.helsola-form-page .helsola-form-panel .helsola-password-field:focus-within {
	border-color: var(--helsola-primary) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--helsola-primary) 18%, transparent) !important;
}

.helsola-form-page .helsola-form-panel .helsola-password-field .helsola-input {
	flex: 1;
	height: 3.1rem;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

.helsola-form-page .helsola-form-panel .helsola-password-field .helsola-input:focus {
	box-shadow: none !important;
}

/* Hide browser-native password reveal; we provide our own toggle button. */
.helsola-form-page .helsola-form-panel .helsola-password-field .helsola-input[type='password']::-ms-reveal,
.helsola-form-page .helsola-form-panel .helsola-password-field .helsola-input[type='password']::-ms-clear {
	display: none;
}

.helsola-form-page .helsola-form-panel .helsola-password-field .helsola-input[type='password']::-webkit-credentials-auto-fill-button,
.helsola-form-page .helsola-form-panel .helsola-password-field .helsola-input[type='password']::-webkit-strong-password-auto-fill-button {
	display: none !important;
	visibility: hidden;
	pointer-events: none;
}

.helsola-form-page .helsola-form-panel textarea.helsola-textarea {
	resize: vertical;
}

.helsola-password-field__toggle {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	padding: 0 0.75rem;
	border: 0;
	background: #f8fafc;
	color: #64748b;
	cursor: pointer;
}

.helsola-password-field__toggle:hover {
	color: var(--helsola-primary);
}

.helsola-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.45;
	color: #334155;
	cursor: pointer;
}

.helsola-checkbox input {
	margin-top: 0.2rem;
	accent-color: var(--helsola-primary);
}

.helsola-form-section-label {
	margin: 0 0 0.5rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #213656;
}

.helsola-form-hint {
	margin: 0.5rem 0 0;
	font-size: 0.8125rem;
	color: #64748b;
}

.helsola-form-field-error {
	margin: 0.375rem 0 0;
	font-size: 0.8125rem;
	color: #c53030;
}

.helsola-form-alert {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-radius: 0.75rem;
	font-size: 0.875rem;
	line-height: 1.5;
}

.helsola-form-alert p {
	margin: 0 0 0.5rem;
}

.helsola-form-alert p:last-child {
	margin-bottom: 0;
}

.helsola-form-alert--error {
	border: 1px solid #f5b8b8;
	background: #fde8e8;
	color: #9b2c2c;
}

.helsola-form-alert--success {
	border: 1px solid #bbf7d0;
	background: #f0fdf4;
	color: #166534;
}

.helsola-form-alert--info {
	border: 1px solid #c5d7fb;
	background: #eef4ff;
	color: #1f3f8a;
}

.helsola-form-alert[hidden],
.helsola-form-alert.hidden {
	display: none !important;
}

.helsola-form-message-meta {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
}

.helsola-form-counter {
	font-size: 0.75rem;
	color: #64748b;
	white-space: nowrap;
}

.helsola-strength-bar {
	margin-top: 0.5rem;
	height: 4px;
	overflow: hidden;
	border-radius: 2px;
	background: #e2e8f0;
}

.helsola-strength-bar span {
	display: block;
	width: 0;
	height: 100%;
	transition: width 0.2s ease;
}

.helsola-strength-bar--weak span {
	width: 33%;
	background: #ef4444;
}

.helsola-strength-bar--medium span {
	width: 66%;
	background: #f59e0b;
}

.helsola-strength-bar--strong span {
	width: 100%;
	background: #22c55e;
}

/* Buttons — match booking modal footer CTA */
.helsola-form-page .helsola-form-panel__footer .helsola-btn,
.helsola-form-page .helsola-form-panel .helsola-btn.helsola-btn--booking {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	min-height: 3.125rem;
	min-width: 13.75rem;
	margin: 0;
	padding: 0 2rem;
	border: none !important;
	border-radius: 0.9rem !important;
	font-size: 1rem !important;
	font-weight: 600;
	font-family: inherit;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.helsola-form-page .helsola-form-panel__footer .helsola-btn--primary,
.helsola-form-page .helsola-form-panel .helsola-btn.helsola-btn--primary.helsola-btn--booking {
	background: var(--helsola-primary) !important;
	color: #fff !important;
}

.helsola-form-page .helsola-form-panel__footer .helsola-btn--primary:hover,
.helsola-form-page .helsola-form-panel__footer .helsola-btn--primary:focus-visible,
.helsola-form-page .helsola-form-panel .helsola-btn.helsola-btn--primary.helsola-btn--booking:hover,
.helsola-form-page .helsola-form-panel .helsola-btn.helsola-btn--primary.helsola-btn--booking:focus-visible {
	background: color-mix(in srgb, var(--helsola-primary) 88%, #000) !important;
	outline: 2px solid color-mix(in srgb, var(--helsola-primary) 25%, #fff);
	outline-offset: 0;
}

.helsola-form-page .helsola-form-panel__footer .helsola-btn--block,
.helsola-form-page .helsola-form-panel .helsola-btn.helsola-btn--block {
	width: 100%;
	min-width: 100%;
}

.helsola-form-page .helsola-form-panel__footer .helsola-btn:disabled,
.helsola-form-page .helsola-form-panel .helsola-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

@media (max-width: 599px) {
	.helsola-form-panel {
		border-radius: 0;
		border-inline: 0;
		box-shadow: none;
	}

	.helsola-form-page {
		padding-inline: 0;
	}
}

.helsola-hp-wrap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}
