/**
 * 主催者 登録・ログイン共通 UI（Peatix 風・余白多め）。
 */

.bat-vendor-auth {
	--bat-brand: #cd3369;
	--bat-brand-hover: #a82854;
	--bat-text: #222;
	--bat-muted: #666;
	--bat-rule: #e5e5e5;
	--bat-input-border: #d0d0d0;
	--bat-focus: #6a5296;

	max-width: 28rem;
	margin: 2.5rem auto 3.5rem;
	padding: 0 1rem;
	color: var(--bat-text);
	background: transparent;
	border: 0;
	box-shadow: none;
}

.bat-vendor-auth__header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem 1.25rem;
	margin: 0 0 1.1rem;
}

.bat-vendor-auth__title {
	margin: 0;
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0.02em;
	color: var(--bat-text);
}

.bat-vendor-auth__switch {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-size: 0.875rem;
	color: var(--bat-muted);
}

.bat-vendor-auth__switch-or {
	color: var(--bat-muted);
}

.bat-vendor-auth__switch-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.45rem 0.9rem;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.3;
	color: var(--bat-text) !important;
	text-decoration: none !important;
	background: #fff;
	border: 1px solid var(--bat-input-border);
	border-radius: 6px;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.bat-vendor-auth__switch-link:hover,
.bat-vendor-auth__switch-link:focus-visible {
	border-color: var(--bat-brand);
	color: var(--bat-brand) !important;
}

.bat-vendor-auth__rule {
	margin: 0 0 1.5rem;
	border: 0;
	border-top: 1px solid var(--bat-rule);
}

.bat-vendor-auth__inner {
	padding: 0;
}

.bat-vendor-auth__lead,
.bat-vendor-auth__status {
	margin: 0 0 1.25rem;
	color: var(--bat-muted);
	font-size: 0.9rem;
	line-height: 1.65;
}

.bat-vendor-auth__actions {
	margin: 0;
}

.bat-vendor-auth__form {
	margin: 0;
}

.bat-vendor-auth__field {
	display: flex;
	flex-direction: column;
	margin: 0 0 1.15rem;
	padding: 0;
	width: 100%;
}

.bat-vendor-auth__field label {
	display: block;
	margin: 0 0 0.4rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--bat-text);
}

.bat-vendor-auth__field .required {
	color: var(--bat-brand);
	font-weight: 600;
}

.bat-vendor-auth__name-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.85rem;
}

.bat-vendor-auth__name-row .bat-vendor-auth__field {
	margin-bottom: 1.15rem;
}

.bat-vendor-auth__url-row {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	width: 100%;
	border: 1px solid var(--bat-input-border);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.bat-vendor-auth__url-prefix {
	display: flex;
	align-items: center;
	padding: 0.7rem 0.75rem;
	font-size: 0.8rem;
	line-height: 1.35;
	color: var(--bat-muted);
	background: #f7f7f7;
	border-right: 1px solid var(--bat-input-border);
	white-space: nowrap;
	max-width: 58%;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bat-vendor-auth__url-row input.input-text {
	flex: 1 1 8rem;
	min-width: 0;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

.bat-vendor-auth__url-status {
	display: block;
	margin: 0 0 0.35rem;
	font-size: 0.8rem;
	font-weight: 500;
}

.bat-vendor-auth__hint {
	display: block;
	margin: 0.35rem 0 0;
	font-size: 0.8rem;
	line-height: 1.45;
	color: var(--bat-muted);
}

.bat-vendor-auth__honeypot {
	position: absolute;
	left: -999em;
	height: 0;
	overflow: hidden;
}

.bat-vendor-auth__terms {
	margin: 0 0 1.25rem;
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--bat-muted);
}

.bat-vendor-auth__terms label {
	display: inline;
	font-weight: 400;
}

.bat-vendor-auth__terms a {
	color: var(--bat-text);
	text-decoration: underline;
}

.bat-vendor-auth__submit {
	margin: 0.5rem 0 0;
}

/* Inputs (register + login) */
.bat-vendor-auth .input-text,
.bat-vendor-auth input.input-text,
.bat-vendor-auth select.form-control,
.bat-vendor-auth .woocommerce-Input,
.bat-vendor-auth input[type="text"],
.bat-vendor-auth input[type="email"],
.bat-vendor-auth input[type="password"],
.bat-vendor-auth input[type="tel"] {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 0.75rem 0.9rem;
	font-size: 16px;
	line-height: 1.4;
	color: var(--bat-text);
	background: #fff;
	border: 1px solid var(--bat-input-border);
	border-radius: 8px;
	box-shadow: none;
	appearance: none;
}

.bat-vendor-auth .input-text:focus,
.bat-vendor-auth .input-text:focus-visible,
.bat-vendor-auth .woocommerce-Input:focus,
.bat-vendor-auth select.form-control:focus {
	outline: 2px solid var(--bat-focus);
	outline-offset: 2px;
	border-color: var(--bat-focus);
}

.bat-vendor-auth__url-row:focus-within {
	outline: 2px solid var(--bat-focus);
	outline-offset: 2px;
	border-color: var(--bat-focus);
}

/* Buttons */
.bat-vendor-auth__btn,
.bat-vendor-auth .woocommerce-form-login__submit,
.bat-vendor-auth button.bat-vendor-auth__btn,
.bat-vendor-auth a.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 0;
	padding: 0.85rem 1.25rem;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	color: #fff !important;
	background-color: var(--bat-brand) !important;
	border: 0 !important;
	border-radius: 8px;
	box-shadow: none;
	cursor: pointer;
	text-decoration: none !important;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.bat-vendor-auth__btn:hover,
.bat-vendor-auth .woocommerce-form-login__submit:hover,
.bat-vendor-auth a.button:hover {
	background-color: var(--bat-brand-hover) !important;
	color: #fff !important;
	transform: translateY(-1px);
}

.bat-vendor-auth__btn--ghost {
	color: var(--bat-text) !important;
	background: #fff !important;
	border: 1px solid var(--bat-input-border) !important;
}

.bat-vendor-auth__btn--ghost:hover {
	color: var(--bat-brand) !important;
	border-color: var(--bat-brand) !important;
	background: #fff !important;
}

/* Login form rows */
.bat-vendor-auth .woocommerce-form-login {
	margin: 0;
}

.bat-vendor-auth .woocommerce-form-login .form-row {
	display: flex;
	flex-direction: column;
	margin: 0 0 1.15rem;
	padding: 0;
	width: 100%;
}

.bat-vendor-auth .woocommerce-form-login label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--bat-text);
}

.bat-vendor-auth .woocommerce-form-login .form-row .woocommerce-form-login__submit {
	order: 2;
}

.bat-vendor-auth .woocommerce-form-login .form-row .woocommerce-form-login__rememberme {
	order: 1;
	display: flex;
	width: 100%;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 1rem;
	font-size: 0.875rem;
	color: var(--bat-muted);
}

.bat-vendor-auth .woocommerce-LostPassword,
.bat-vendor-auth .lost_password {
	margin: 1rem 0 0;
	text-align: center;
	font-size: 0.875rem;
}

.bat-vendor-auth .lost_password a {
	color: var(--bat-muted);
	text-decoration: underline;
}

.bat-vendor-auth .lost_password a:hover {
	color: var(--bat-brand);
}

.bat-vendor-auth__footer-switch {
	margin: 1.35rem 0 0;
	padding-top: 1.1rem;
	border-top: 1px solid var(--bat-rule);
	text-align: center;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--bat-muted);
}

.bat-vendor-auth__footer-switch a {
	color: var(--bat-brand);
	font-weight: 600;
	text-decoration: underline;
}

.bat-vendor-auth__footer-switch a:hover {
	color: var(--bat-brand-hover);
}

/* Notices */
.bat-vendor-auth .woocommerce-notices-wrapper {
	margin: 0 0 1rem;
}

.bat-vendor-auth .woocommerce-error,
.bat-vendor-auth .woocommerce-message,
.bat-vendor-auth .woocommerce-info {
	position: relative;
	margin: 0 0 1rem;
	padding: 0.85rem 1rem 0.85rem 2.75rem;
	list-style: none !important;
	font-size: 0.875rem;
	line-height: 1.5;
	border-radius: 8px;
}

.bat-vendor-auth .woocommerce-error::before,
.bat-vendor-auth .woocommerce-message::before,
.bat-vendor-auth .woocommerce-info::before {
	position: absolute;
	top: 50%;
	left: 0.9rem;
	transform: translateY(-50%);
	margin: 0;
}

.bat-vendor-auth .woocommerce-error {
	color: #7a1f1f;
	background: #fde8e8;
	border: 1px solid #f0b4b4;
}

.bat-vendor-auth .woocommerce-message {
	color: #1f5a2e;
	background: #e8f6ec;
	border: 1px solid #b7dfc2;
}

.bat-vendor-auth .woocommerce-info {
	color: #1f3a5a;
	background: #e8f0f8;
	border: 1px solid #b4c8e0;
}

.bat-vendor-auth .woocommerce-error li,
.bat-vendor-auth .woocommerce-message li,
.bat-vendor-auth .woocommerce-info li {
	margin: 0;
	padding: 0 !important;
	list-style: none !important;
}

.bat-vendor-auth .woocommerce-error li::before,
.bat-vendor-auth .woocommerce-message li::before,
.bat-vendor-auth .woocommerce-info li::before {
	display: none;
}

/* Hide legacy Dokan role radios if a theme still injects them */
.bat-vendor-auth .vendor-customer-registration {
	display: none !important;
}

@media (max-width: 520px) {
	.bat-vendor-auth__name-row {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.bat-vendor-auth__url-prefix {
		max-width: 100%;
		width: 100%;
		border-right: 0;
		border-bottom: 1px solid var(--bat-input-border);
	}

	.bat-vendor-auth__title {
		font-size: 1.5rem;
	}
}

/* Backward-compatible alias (old class on login) */
.bat-vendor-login {
	/* no-op: template now uses bat-vendor-auth */
}
