/**
 * Login im Checkout - Styles fuer den Inner Block der Kontaktinformationen-Sektion.
 * Theme-neutral: nutzt so weit sinnvoll die generischen WooCommerce-Block-Variablen, sonst
 * zurueckhaltende Neutraltoene statt hartcodierter Fremdfarben.
 */
.msc-checkout-login {
	--msc-checkout-login-border: var(--wc-blocks-border-color, #d6dbe1);
	--msc-checkout-login-surface: var(--wc-blocks-surface-color, #f8f9fa);
	--msc-checkout-login-muted: var(--wc-blocks-secondary-text-color, #5a6775);
	--msc-checkout-login-accent: var(--wc-blocks-primary-color, #2f3a46);
	--msc-checkout-login-divider: #4c5863;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--msc-checkout-login-border);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.msc-checkout-login__primary,
.msc-checkout-login__split-social {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.msc-checkout-login--google-only {
	margin-top: 10px;
	padding-top: 0;
	border-top: none;
}

.msc-checkout-login__status {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9em;
	color: var(--msc-checkout-login-muted);
	margin: 0;
}

.msc-checkout-login__spinner {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid var(--msc-checkout-login-border);
	border-top-color: var(--msc-checkout-login-accent);
	animation: msc-checkout-login-spin 0.7s linear infinite;
	flex: 0 0 14px;
}

@keyframes msc-checkout-login-spin {
	to {
		transform: rotate(360deg);
	}
}

.msc-checkout-login__panel {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px 16px;
	border: 1px solid var(--msc-checkout-login-border);
	border-radius: 6px;
	background: var(--msc-checkout-login-surface);
	margin: 0;
}

.msc-checkout-login__panel--new {
	gap: 12px;
}

.msc-checkout-login__intro {
	margin: 0;
	font-size: 0.92em;
	color: var(--msc-checkout-login-muted);
}

.wc-block-checkout__contact-fields .msc-checkout-login__step-intro {
	margin: 8px 0 14px;
	font-size: 0.92em;
	color: var(--wc-blocks-secondary-text-color, #5a6775);
}

.msc-checkout-login__email-cta-wrap {
	display: flex;
	align-items: center;
}

.msc-checkout-login__email-cta {
	align-self: flex-start;
}

.msc-checkout-login__email-cta[disabled] {
	opacity: 0.58;
	cursor: not-allowed;
}

.msc-checkout-login__heading {
	margin: 0;
	font-size: 1em;
	font-weight: 600;
	color: var(--msc-checkout-login-accent);
}

.msc-checkout-login__description {
	margin: 0;
	font-size: 0.92em;
	color: var(--msc-checkout-login-muted);
}

.msc-checkout-login__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.msc-checkout-login__field label {
	font-size: 0.9em;
	font-weight: 500;
}

.msc-checkout-login__choice-group {
	display: grid;
	gap: 8px;
}

.msc-checkout-login__choice {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	width: fit-content;
}

.msc-checkout-login__choice input {
	margin: 0;
}

.msc-checkout-login__note {
	margin: 0;
	font-size: 0.9em;
	color: var(--msc-checkout-login-muted);
}

.msc-checkout-login__panel input[type="password"] {
	width: 100%;
	box-sizing: border-box;
}

.msc-checkout-login__submit {
	align-self: flex-start;
}

.msc-checkout-login__error {
	color: #b32d2e;
	font-size: 0.9em;
	margin: 0;
}

.msc-checkout-login__divider {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 2px 0;
	color: var(--msc-checkout-login-muted);
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.msc-checkout-login__divider::before,
.msc-checkout-login__divider::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: var(--msc-checkout-login-border);
}

.msc-checkout-login__split-divider {
	display: none;
}

.msc-social-login--checkout {
	--msc-checkout-google-area-bg: transparent;
	--msc-checkout-google-area-border: transparent;
	--msc-checkout-google-btn-bg: var(--msc-social-login-light-bg, #ffffff);
	--msc-checkout-google-btn-border: var(--msc-social-login-border, #c7ccd1);
	--msc-checkout-google-btn-text: var(--msc-social-login-text, #1d2327);
	margin: 0;
	display: flex;
	justify-content: center;
}

.msc-social-login--checkout.msc-social-login--checkout-area-styled {
	padding: 12px;
	border: 1px solid var(--msc-checkout-google-area-border);
	border-radius: 10px;
	background: var(--msc-checkout-google-area-bg);
}

.msc-social-login--checkout :where(.msc-social-login__button) {
	margin: 0 auto;
}

.msc-social-login--checkout.msc-social-login--checkout-custom-button .msc-social-login__button {
	background: var(--msc-checkout-google-btn-bg);
	border-color: var(--msc-checkout-google-btn-border);
	color: var(--msc-checkout-google-btn-text);
}

@media (min-width: 961px) {
	.msc-checkout-login--layout-split {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 1px minmax(220px, 0.62fr);
		column-gap: 20px;
		align-items: start;
	}

	.msc-checkout-login--layout-split .msc-checkout-login__primary {
		min-width: 0;
	}

	.msc-checkout-login--layout-split .msc-checkout-login__split-divider {
		display: block;
		width: 1px;
		height: 100%;
		min-height: 148px;
		background: linear-gradient(
			180deg,
			rgba(76, 88, 99, 0) 0%,
			rgba(76, 88, 99, 0.84) 18%,
			rgba(76, 88, 99, 0.84) 82%,
			rgba(76, 88, 99, 0) 100%
		);
	}

	.msc-checkout-login--layout-split .msc-checkout-login__split-social {
		align-self: center;
		justify-self: stretch;
		padding-left: 4px;
	}

	.msc-checkout-login--layout-split .msc-checkout-login__split-social .msc-social-login--checkout {
		justify-content: flex-start;
	}

	.msc-checkout-login--layout-split .msc-checkout-login__split-social .msc-social-login__button {
		margin: 0;
		width: 100%;
	}

	.msc-checkout-login--layout-split .msc-checkout-login__divider {
		display: none;
	}
}

.wc-block-checkout__contact-fields.msc-checkout-login--existing-account .wc-block-checkout__guest-checkout-notice,
.wc-block-checkout__contact-fields.msc-checkout-login--existing-account .wc-block-checkout__create-account,
.wc-block-checkout__contact-fields.msc-checkout-login--existing-account .wc-block-components-address-form__password,
.wc-block-checkout__contact-fields.msc-checkout-login--streamlined .wc-block-checkout__guest-checkout-notice,
.wc-block-checkout__contact-fields.msc-checkout-login--streamlined .wc-block-checkout__create-account,
.wc-block-checkout__contact-fields.msc-checkout-login--streamlined .wc-block-components-address-form__password {
	display: none !important;
}

.wc-block-checkout__contact-fields.msc-checkout-login--existing-account .wc-block-checkout__login-prompt {
	display: none !important;
}

.msc-checkout-login-editor-placeholder {
	padding: 10px 12px;
	border: 1px dashed var(--wc-blocks-border-color, #d6dbe1);
	border-radius: 4px;
	font-size: 0.9em;
	color: var(--wc-blocks-secondary-text-color, #5a6775);
	background: var(--wc-blocks-surface-color, #f8f9fa);
}

/**
 * Native WooCommerce-Anmelde-Prompt oben in den Kontaktinformationen ("Anmelden") deutlich
 * sichtbarer machen - stabile WooCommerce-Blocks-Klasse, keine eigene Ausgabe.
 */
.wc-block-checkout__login-prompt {
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	border: 1px solid var(--wc-blocks-primary-color, #2f3a46);
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.85em;
	text-decoration: none;
	color: var(--wc-blocks-primary-color, #2f3a46);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.wc-block-checkout__login-prompt:hover,
.wc-block-checkout__login-prompt:focus {
	background: var(--wc-blocks-primary-color, #2f3a46);
	color: #fff;
}

