/**
 * FloriShop Login — frontend styles
 */

.florishop-login {
	--fslp-button: #a881c9;
	--fslp-button-hover: #9670b8;
	--fslp-button-text: #ffffff;
	--fslp-input-border: #d1d5db;
	--fslp-input-focus: #a881c9;
	--fslp-input-text: #374151;
	--fslp-placeholder: #9ca3af;
	--fslp-radius: 50px;
	--fslp-gap: 12px;
	--fslp-max-width: 360px;

	box-sizing: border-box;
	max-width: var(--fslp-max-width);
	width: 100%;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.florishop-login *,
.florishop-login *::before,
.florishop-login *::after {
	box-sizing: inherit;
}

.florishop-login__title {
	margin: 0 0 1rem;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
	color: inherit;
}

.florishop-login__form {
	display: flex;
	flex-direction: column;
	gap: var(--fslp-gap);
}

.florishop-login__field {
	position: relative;
	width: 100%;
}

.florishop-login__field--password .florishop-login__input {
	padding-right: 3rem;
}

.florishop-login__input {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0.85rem 1.25rem;
	border: 1px solid var(--fslp-input-border);
	border-radius: var(--fslp-radius);
	background: #ffffff;
	color: var(--fslp-input-text);
	font-size: 1rem;
	line-height: 1.4;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.florishop-login__input::placeholder {
	color: var(--fslp-placeholder);
	opacity: 1;
}

.florishop-login__input:focus {
	outline: none;
	border-color: var(--fslp-input-focus);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--fslp-input-focus) 20%, transparent);
}

.florishop-login__input:invalid:not(:placeholder-shown) {
	border-color: #ef4444;
}

.florishop-login__toggle {
	position: absolute;
	top: 50%;
	right: 0.75rem;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--fslp-placeholder);
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.florishop-login__toggle:hover,
.florishop-login__toggle:focus {
	color: var(--fslp-input-focus);
	background: color-mix(in srgb, var(--fslp-input-focus) 10%, transparent);
	outline: none;
}

.florishop-login__toggle-icon {
	display: block;
	width: 1.125rem;
	height: 1.125rem;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.florishop-login__toggle[aria-pressed="true"] .florishop-login__toggle-icon {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94'/%3E%3Cpath d='M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94'/%3E%3Cpath d='M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

.florishop-login__message {
	margin: 0;
	padding: 0.65rem 1rem;
	border-radius: calc(var(--fslp-radius) / 2);
	background: #fef2f2;
	color: #b91c1c;
	font-size: 0.875rem;
	line-height: 1.4;
}

.florishop-login__message[hidden] {
	display: none;
}

.florishop-login__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	margin: 0;
	padding: 0.9rem 1.25rem;
	border: none;
	border-radius: var(--fslp-radius);
	background: var(--fslp-button);
	color: var(--fslp-button-text);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
}

.florishop-login__submit:hover:not(:disabled) {
	background: var(--fslp-button-hover);
}

.florishop-login__submit:active:not(:disabled) {
	transform: scale(0.98);
}

.florishop-login__submit:focus {
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--fslp-button) 35%, transparent);
}

.florishop-login__submit:disabled {
	opacity: 0.75;
	cursor: wait;
}

.florishop-login__spinner {
	display: none;
	width: 1rem;
	height: 1rem;
	border: 2px solid color-mix(in srgb, var(--fslp-button-text) 35%, transparent);
	border-top-color: var(--fslp-button-text);
	border-radius: 50%;
	animation: florishop-login-spin 0.7s linear infinite;
}

.florishop-login__form.is-loading .florishop-login__spinner {
	display: block;
}

.florishop-login__form.is-loading .florishop-login__submit-text {
	opacity: 0.85;
}

@keyframes florishop-login-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 480px) {
	.florishop-login__input,
	.florishop-login__submit {
		font-size: 16px; /* Voorkomt zoom op iOS */
	}
}
