/**
 * Starway Account login page — same dark/glass/blue-purple visual
 * language as wallet-center.css (shared variable values, separate file
 * since this page loads standalone, outside Wallet Center's shortcode).
 */

/* Owner-reported 2026-07-19: Google's rendered "Sign in" button/iframe
   overflowed the login card on narrow phones -- starway-auth.js now sizes
   it to the container's real width, this is just a defensive clamp in
   case Google's own injected markup ever renders wider than requested. */
#swp-google-btn {
	max-width: 100%;
	overflow: hidden;
}

.swp-auth {
	--swp-auth-bg: #0b0e1a;
	--swp-auth-card-bg: rgba(255, 255, 255, 0.06);
	--swp-auth-border: rgba(255, 255, 255, 0.12);
	--swp-auth-accent: #7c5cff;
	--swp-auth-accent-2: #4f8dfd;
	--swp-auth-text: #f2f2f7;
	--swp-auth-muted: #a3a8c2;
	--swp-auth-error: #ff6b6b;

	max-width: 420px;
	margin: 0 auto 64px;
	padding: 0 16px;
	color: var(--swp-auth-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 2026-07-27: TWO separate sitewide resets were both zeroing out this
   element's own top spacing, leaving the login card flush against the
   header -- (1) starway-header-footer-spacing.php's physical `margin-top:
   0 !important`, specificity (0,2,0), and (2) the theme's own block-theme
   default using the LOGICAL property `margin-block-start: 0` via `:root
   :where(.is-layout-constrained) > :first-child` -- `:root` and
   `:first-child` are pseudo-classes so that selector is ALSO (0,2,0)
   despite :where() zeroing out everything inside it. A same-specificity
   `!important` tie is broken by source order, which these two resets kept
   winning -- `html body .swp-auth.swp-auth` adds 2 real elements, making
   this (0,2,2), which actually outranks both. 60px matches the standard
   spacing already used on /catalog-product/blood-strike/, so header-to-
   container distance reads the same across the site. */
html body .swp-auth.swp-auth {
	margin-top: 60px !important;
	margin-block-start: 60px !important;
}

.swp-auth-card {
	background: var(--swp-auth-card-bg);
	border: 1px solid var(--swp-auth-border);
	border-radius: 24px;
	padding: 32px 28px;
	backdrop-filter: blur(16px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.swp-auth-google {
	display: flex;
	justify-content: center;
	margin-bottom: 20px;
}

.swp-auth-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
	color: var(--swp-auth-muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.swp-auth-divider::before,
.swp-auth-divider::after {
	content: "";
	flex: 1 1 0%;
	height: 1px;
	background: var(--swp-auth-border);
}

.swp-auth-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 24px;
	background: rgba(0, 0, 0, 0.25);
	border-radius: 999px;
	padding: 4px;
}

.swp-auth-tab {
	flex: 1 1 0%;
	padding: 10px 16px;
	border-radius: 999px;
	background: transparent;
	border: none;
	color: var(--swp-auth-muted);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.swp-auth-tab.swp-auth-tab-active {
	background: linear-gradient(135deg, var(--swp-auth-accent), var(--swp-auth-accent-2));
	color: #fff;
	box-shadow: 0 4px 14px rgba(124, 92, 255, 0.35);
}

.swp-auth-panel {
	display: none;
}

.swp-auth-panel.swp-auth-panel-active {
	display: block;
}

.swp-auth-field {
	margin-bottom: 18px;
}

.swp-auth-hint {
	font-size: 12px;
	color: var(--swp-auth-muted);
	margin: 6px 0 0;
}

.swp-auth label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--swp-auth-muted);
	margin-bottom: 6px;
}

.swp-auth input[type="email"],
.swp-auth input[type="password"],
.swp-auth input[type="text"] {
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid var(--swp-auth-border);
	color: var(--swp-auth-text);
	border-radius: 12px;
	padding: 12px 14px;
	width: 100%;
	box-sizing: border-box;
	font-size: 14px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.swp-auth input[type="email"]:focus,
.swp-auth input[type="password"]:focus,
.swp-auth input[type="text"]:focus {
	outline: none;
	border-color: var(--swp-auth-accent-2);
	box-shadow: 0 0 0 3px rgba(79, 141, 253, 0.2);
}

.swp-auth-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: -6px 0 20px;
}

.swp-auth-checkbox {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--swp-auth-muted);
	margin: 0;
}

.swp-auth-checkbox input {
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.04);
	cursor: pointer;
	position: relative;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.swp-auth-checkbox input:hover {
	border-color: rgba(124, 92, 255, 0.6);
}

.swp-auth-checkbox input:checked {
	background: linear-gradient(135deg, var(--swp-auth-accent), var(--swp-auth-accent-2));
	border-color: var(--swp-auth-accent-2);
}

.swp-auth-checkbox input:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 4px;
	height: 8px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.swp-auth-checkbox input:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.3);
}

.swp-auth-link {
	background: none;
	border: none;
	padding: 0;
	color: var(--swp-auth-accent-2);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}

.swp-auth-link:hover {
	text-decoration: underline;
}

.swp-auth-btn {
	display: block;
	width: 100%;
	padding: 13px 24px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--swp-auth-accent), var(--swp-auth-accent-2));
	color: #fff;
	text-decoration: none;
	text-align: center;
	border: none;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(124, 92, 255, 0.3);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.swp-auth-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 28px rgba(124, 92, 255, 0.4);
}

.swp-auth-error {
	color: var(--swp-auth-error);
	font-size: 13px;
	margin: 0 0 14px;
}

.swp-auth-notice {
	color: #4ade80;
	font-size: 13px;
	margin: 0 0 14px;
}

/*
 * 2026-07-27: this whole page was built for the site's dark-by-default
 * background (see the docblock at the top) -- near-white text, near-black
 * translucent input fills, and a near-invisible card tint all assumed a
 * dark canvas. The site now defaults to a light theme for non-entitled
 * visitors, and this login page never got its own light-theme pass.
 * Redefining the same custom properties this file already uses everywhere
 * re-themes most of it in one place; a few hardcoded (non-variable) colors
 * below need their own override.
 */
body.swc-light-default .swp-auth {
	--swp-auth-card-bg: #ffffff;
	--swp-auth-border: rgba(20, 25, 60, 0.12);
	--swp-auth-text: #182B43;
	--swp-auth-muted: #5a6b85;
}

body.swc-light-default .swp-auth-card {
	box-shadow: 0 20px 60px rgba(20, 25, 60, 0.12), 0 0 0 1px rgba(20, 25, 60, 0.02) inset;
}

body.swc-light-default .swp-auth-tabs {
	background: rgba(20, 25, 60, 0.05);
}

body.swc-light-default .swp-auth input[type="email"],
body.swc-light-default .swp-auth input[type="password"],
body.swc-light-default .swp-auth input[type="text"] {
	background: #f7f8fc;
}

body.swc-light-default .swp-auth-checkbox input {
	border-color: rgba(20, 25, 60, 0.18);
	background: rgba(20, 25, 60, 0.03);
}

body.swc-light-default .swp-auth-checkbox input:hover {
	border-color: rgba(124, 92, 255, 0.6);
}
