/*
 * All-Involve Auth: login buttons + messages.
 * Restyle from Bricks by overriding the custom properties on .app-auth-buttons
 * or on a single button (.app-auth-btn--google, --discord, --twitch, --steam, --x).
 */

.app-auth-buttons {
	--app-auth-gap: 10px;
	--app-auth-height: 46px;
	--app-auth-radius: 8px;
	--app-auth-font-size: 15px;

	display: flex;
	flex-direction: column;
	gap: var(--app-auth-gap);
	width: 100%;
}

.app-auth-btn {
	--app-auth-bg: #ffffff;
	--app-auth-fg: #1f1f1f;
	--app-auth-border: transparent;

	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-sizing: border-box;
	min-height: var(--app-auth-height);
	padding: 0 18px;
	border: 1px solid var(--app-auth-border);
	border-radius: var(--app-auth-radius);
	background: var(--app-auth-bg);
	color: var(--app-auth-fg);
	font-size: var(--app-auth-font-size);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.app-auth-btn:hover,
.app-auth-btn:focus {
	color: var(--app-auth-fg);
	text-decoration: none;
	filter: brightness(0.94);
}

.app-auth-btn:active {
	transform: translateY(1px);
}

.app-auth-btn:focus-visible {
	outline: 2px solid var(--app-auth-fg);
	outline-offset: 2px;
}

.app-auth-btn__icon {
	display: inline-flex;
	flex: none;
	width: 20px;
	height: 20px;
}

.app-auth-btn__icon svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

/* Brand colours */
.app-auth-btn--google  { --app-auth-bg: #ffffff; --app-auth-fg: #1f1f1f; --app-auth-border: #dadce0; }
.app-auth-btn--discord { --app-auth-bg: #5865f2; --app-auth-fg: #ffffff; }
.app-auth-btn--twitch  { --app-auth-bg: #9146ff; --app-auth-fg: #ffffff; }
.app-auth-btn--steam   { --app-auth-bg: #171a21; --app-auth-fg: #ffffff; --app-auth-border: #3d4450; }
.app-auth-btn--x       { --app-auth-bg: #000000; --app-auth-fg: #ffffff; --app-auth-border: #333639; }

/* Messages */
.app-auth-msg {
	box-sizing: border-box;
	margin: 0 0 14px;
	padding: 10px 14px;
	border-radius: 8px;
	border: 1px solid;
	font-size: 14px;
	line-height: 1.45;
}

.app-auth-msg--error {
	border-color: #f1aeb5;
	background: #fdecee;
	color: #842029;
}

.app-auth-msg--success {
	border-color: #a3cfbb;
	background: #e8f5ee;
	color: #0f5132;
}

/* wp-login.php */
.login .app-auth-wp-login {
	margin: 0 0 16px;
}

.login .app-auth-or {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 16px 0 0;
	color: #646970;
	font-size: 13px;
}

.login .app-auth-or::before,
.login .app-auth-or::after {
	content: "";
	flex: 1;
	border-top: 1px solid #dcdcde;
}

/* Email step ([app_auth_email_step]) */
.app-auth-email {
	--app-auth-accent: #5865f2;
	--app-auth-accent-fg: #ffffff;

	max-width: 440px;
}

.app-auth-email p {
	margin: 0 0 14px;
}

.app-auth-email__pending {
	padding: 10px 14px;
	border-radius: 8px;
	background: rgba(127, 127, 127, 0.1);
	font-size: 14px;
}

.app-auth-email__label {
	display: block;
	margin: 0 0 6px;
	font-weight: 600;
}

.app-auth-email__input {
	box-sizing: border-box;
	width: 100%;
	min-height: 46px;
	padding: 0 14px;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	font: inherit;
}

.app-auth-email__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin-top: 14px;
}

.app-auth-email__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 20px;
	border: 0;
	border-radius: 8px;
	background: var(--app-auth-accent, #514dff);
	color: var(--app-auth-accent-fg, #ffffff);
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.app-auth-email__submit:hover,
.app-auth-email__submit:focus {
	color: var(--app-auth-accent-fg, #ffffff);
	filter: brightness(0.94);
}

.app-auth-email__skip {
	font-size: 14px;
	opacity: 0.8;
}

/* Reminder banner ([app_auth_email_reminder]) */
.app-auth-reminder {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	padding: 10px 16px;
	background: #fff4d6;
	color: #5c4400;
	font-size: 14px;
	line-height: 1.4;
}

.app-auth-reminder__text {
	flex: 1 1 240px;
}

.app-auth-reminder__link {
	color: inherit;
	font-weight: 600;
}

.app-auth-reminder__close {
	padding: 4px 8px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	opacity: 0.75;
	cursor: pointer;
}

/* Built-in /auth/email/ page */
.app-auth-standalone {
	margin: 0;
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 16px;
	box-sizing: border-box;
	background: #f0f0f1;
	color: #1d2327;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

.app-auth-standalone__card {
	box-sizing: border-box;
	width: 100%;
	max-width: 480px;
	padding: 28px;
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.app-auth-standalone__card h1 {
	margin: 0 0 12px;
	font-size: 22px;
}

/* Connected accounts ([app_auth_connections]) */
.app-auth-connections {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 560px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.app-auth-conn {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid rgba(127, 127, 127, 0.25);
	border-radius: 10px;
}

.app-auth-conn .app-auth-btn__icon {
	width: 24px;
	height: 24px;
}

.app-auth-conn--discord .app-auth-btn__icon { color: #5865f2; }
.app-auth-conn--twitch  .app-auth-btn__icon { color: #9146ff; }

.app-auth-conn__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.app-auth-conn__name {
	font-weight: 600;
}

.app-auth-conn__status {
	font-size: 13px;
	opacity: 0.75;
}

.app-auth-conn__action {
	flex: none;
	padding: 6px 14px;
	border: 1px solid currentColor;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.app-auth-conn__action.is-disconnect {
	opacity: 0.8;
}

.app-auth-conn__hint {
	flex: 0 1 200px;
	font-size: 12px;
	line-height: 1.35;
	opacity: 0.7;
}

@media (max-width: 420px) {
	.app-auth-conn {
		flex-wrap: wrap;
	}

	.app-auth-conn__action,
	.app-auth-conn__hint {
		flex-basis: 100%;
		text-align: center;
	}
}

/* "Find me on" ([app_auth_socials]) */
.app-auth-socials {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.app-auth-social {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 8px;
	background: transparent;
	color: inherit;
	cursor: pointer;
	text-decoration: none;
}

.app-auth-social__icon {
	display: inline-flex;
	width: 18px;
	height: 18px;
}

.app-auth-social__icon svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

/* Verified checkmark: works inside the shortcode row and in Bricks loops ({app_social_check}). */
.app-auth-social__check {
	position: absolute;
	right: -5px;
	bottom: -5px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border: 2px solid #ffffff;
	border-radius: 50%;
	background: #514dff;
	color: #ffffff;
}

/* "Copied" bubble for Discord (any element with data-app-social-copy) */
[data-app-social-copy] {
	position: relative;
}

[data-app-social-copy].is-copied::after {
	content: "Copied";
	position: absolute;
	left: 50%;
	bottom: calc(100% + 6px);
	transform: translateX(-50%);
	padding: 3px 8px;
	border-radius: 6px;
	background: #1d2327;
	color: #ffffff;
	font-size: 12px;
	line-height: 1.3;
	white-space: nowrap;
	pointer-events: none;
}

/* Editor ([app_auth_socials_editor]) */
.app-auth-socials-editor {
	max-width: 520px;
}

.app-auth-socials-editor__list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.app-auth-se {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid rgba(127, 127, 127, 0.25);
	border-radius: 10px;
}

.app-auth-se__icon {
	display: inline-flex;
	flex: none;
	width: 22px;
	height: 22px;
}

.app-auth-se__icon svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.app-auth-se__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.app-auth-se__name {
	font-weight: 600;
}

.app-auth-se__status {
	font-size: 13px;
	opacity: 0.75;
	overflow-wrap: anywhere;
}

.app-auth-se__input {
	box-sizing: border-box;
	width: 100%;
	min-height: 38px;
	padding: 0 10px;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	font: inherit;
	font-size: 14px;
}

.app-auth-se__error {
	color: #b32d2e;
	font-size: 13px;
}

.app-auth-se__toggle {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	cursor: pointer;
}

.app-auth-se__action {
	flex: none;
	font-size: 14px;
	font-weight: 600;
}

.app-auth-socials-editor__note {
	margin: 0 0 12px;
	font-size: 13px;
	opacity: 0.75;
}

@media (max-width: 420px) {
	.app-auth-se {
		flex-wrap: wrap;
	}
}

/* [app_auth_find_me_on]: uses the profile's own .socials / .social styles. Everything here is
   zero-specificity (:where) so the site's CSS always wins. */
:where(.app-auth-findme__row) > * {
	position: relative;
}

:where(.app-auth-findme__row) > :where(button) {
	appearance: none;
	margin: 0;
	padding: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

:where(.app-auth-findme__label) {
	margin: 0 0 8px;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.7;
}

/* Editor dialog (owner only) */
.app-auth-dialog {
	box-sizing: border-box;
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	padding: 20px;
	border: 0;
	border-radius: 16px;
	background: #ffffff;
	color: #1d2327;
	box-shadow: 0 20px 60px rgba(10, 10, 15, 0.25);
}

.app-auth-dialog::backdrop {
	background: rgba(10, 10, 15, 0.45);
}

.app-auth-dialog__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 12px;
}

.app-auth-dialog__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
}

.app-auth-dialog__close {
	padding: 4px 10px;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.app-auth-dialog .app-auth-socials-editor {
	max-width: none;
}
