/* ==========================================================================
   Neolym Login — Styles
   ========================================================================== */

/* Wrapper — vertical stack: title → message → form → alternative */
.neolym-login-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 3rem 1rem;
	gap: 1.5rem;
	width: 100%;
	max-width: 600px;
	margin: 0 auto;
	box-sizing: border-box;
}

/* Title */
.neolym-login-form__title h3 {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
	color: #333;
	text-align: center;
}

/* Fields container — vertical stack */
.neolym-login-form__fields {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	width: 100%;
}

/* Form — email + button in a row */
.neolym-login-form {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 0.75rem;
	width: 100%;
	justify-content: center;
}

/* Input group */
.neolym-login-form__input-group {
	flex: 1;
}

/* Screen-reader-only label */
.neolym-login-form .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Email input */
.neolym-login-form input[type="email"] {
	width: 100%;
	max-width: 350px;
	padding: 0.875rem 1rem;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 1rem;
	line-height: 1.5;
	background-color: #ffffff;
	transition: all 0.3s ease;
	box-sizing: border-box;
}

.neolym-login-form input[type="email"]:focus {
	border-color: #00bde2;
	box-shadow: 0 0 0 3px rgba(0, 189, 226, 0.1);
	outline: none;
}

.neolym-login-form input[type="email"]:hover {
	border-color: #4dd4f4;
}

.neolym-login-form input[type="email"]::placeholder {
	color: #999;
}

/* Submit button */
.neolym-login-form__actions button[type="submit"] {
	padding: 0.875rem 2rem;
	background-color: #00bde2;
	border: 2px solid #00bde2;
	border-radius: 8px;
	color: #ffffff;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.neolym-login-form__actions button[type="submit"]:hover {
	background-color: #009bbf;
	border-color: #009bbf;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 189, 226, 0.3);
}

.neolym-login-form__actions button[type="submit"]:active {
	transform: translateY(0);
}

.neolym-login-form__actions button[type="submit"]:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* Messages */
.neolym-login-message {
	margin: 0;
	padding: 1rem 1.25rem;
	border-radius: 0.5rem;
	font-size: 1rem;
	line-height: 1.5;
	width: 100%;
	max-width: 100%;
	text-align: center;
	box-sizing: border-box;
}

.neolym-login-message--success {
	background-color: #d1e7dd;
	color: #0f5132;
	border: 1px solid #badbcc;
}

.neolym-login-message--error {
	background-color: #f8d7da;
	color: #842029;
	border: 1px solid #f5c2c7;
}

/* Alternative link / SMS fallback */
.neolym-login-alternative {
	padding: 1rem 0;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
}

.neolym-login-alternative__text {
	margin: 0;
	font-size: 0.9375rem;
	color: #666;
}

.neolym-login-alternative__countdown {
	display: inline-block;
	margin-left: 0.25rem;
	color: #999;
	font-size: 0.875rem;
}

.neolym-login-alternative__link {
	display: inline-block;
	padding: 0.625rem 1.5rem;
	background-color: #00bde2;
	color: #fff;
	border-radius: 6px;
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
	transition: all 0.3s ease;
	cursor: pointer;
}

.neolym-login-alternative__link:hover:not(.disabled):not(.loading) {
	background-color: #009bbf;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 189, 226, 0.3);
	color: #fff;
}

.neolym-login-alternative__link.disabled {
	background-color: #ccc;
	color: #888;
	cursor: not-allowed;
	pointer-events: none;
	opacity: 0.6;
}

.neolym-login-alternative__link.loading {
	background-color: #00bde2;
	opacity: 0.7;
	cursor: wait;
	pointer-events: none;
}

/* Light variant (for dark backgrounds) */
.neolym-login-form--light .neolym-login-form__title h3 {
	color: #ffffff;
}

.neolym-login-form--light input[type="email"] {
	background-color: rgba(255, 255, 255, 0.95);
	border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Short version — pill-shaped form (header + homepage)
   ========================================================================== */

.neolym-login-short {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
}

/* Pill container — input and button side by side, no gap */
.neolym-pill {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	background: #f0f4f5;
	border-radius: 50px;
	padding: 0.25rem;
	max-width: 480px;
	min-width: 320px;
	width: 100%;
	box-sizing: border-box;
	flex-shrink: 0;
}

/* Email input — left side: rounded left, flat right */
.neolym-pill__input {
	flex: 1;
	min-width: 0;
	padding: 0.625rem 1.125rem;
	border: none;
	border-radius: 50px 0 0 50px !important;
	background: transparent;
	font-size: 0.9375rem;
	line-height: 1.4;
	color: #333;
	outline: none;
}

.neolym-pill__input::placeholder {
	color: #999;
}

/* Button — right side: flat left, rounded right */
.neolym-pill__btn {
	padding: 0.625rem 1.25rem;
	background-color: #00bde2;
	border: none;
	border-radius: 0 50px 50px 0;
	color: #ffffff;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease;
	white-space: nowrap;
	flex-shrink: 0;
}

.neolym-pill__btn:hover {
	background-color: #009bbf;
}

.neolym-pill__btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Error/success message within the short form */
.neolym-login-short .neolym-login-message {
	width: auto;
	max-width: 480px;
	border-radius: 12px;
	font-size: 0.875rem;
	padding: 0.75rem 1rem;
}

/* Hide error messages in header — errors redirect to /connexion */
.ct-header .neolym-login-short .neolym-login-message {
	display: none;
}

/* Hide pill form on mobile header — offcanvas menu takes over */
[data-device="mobile"] .neolym-login-short {
	display: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet — max 1024px */
@media (max-width: 1024px) {
	.neolym-login-form__title h3 {
		font-size: 1rem;
	}
}

/* Mobile — max 768px */
@media (max-width: 768px) {
	.neolym-login-wrapper {
		padding: 1.5rem 1rem;
		gap: 1rem;
	}

	.neolym-login-form__title h3 {
		display: none;
	}

	/* Stack email + button vertically on mobile */
	.neolym-login-form {
		flex-direction: column;
		align-items: stretch;
	}

	.neolym-login-form input[type="email"] {
		max-width: 100%;
	}

	.neolym-login-form__actions {
		width: 100%;
	}

	.neolym-login-form__actions button[type="submit"] {
		width: 100%;
	}

	.neolym-login-alternative__link {
		display: block;
		width: 100%;
		text-align: center;
		box-sizing: border-box;
	}

}
