/**
 * 2G Vibe — Login / Register card
 * Location: woostify-child/assets/css/account.css
 * Loaded only on the account page when logged out.
 *
 * The reference design was a blue sky gradient. This uses the store brand gold
 * as a soft wash instead, with the black primary button the theme already uses.
 */

:root {
	--tg-au-gold:      #cda60d;
	--tg-au-gold-soft: #fdf7e0;
	--tg-au-gold-ink:  #7a6304;
	--tg-au-ink:       #2b2b2b;
	--tg-au-muted:     #6f6f6f;
	--tg-au-line:      #e6e6e6;
}

/* Woostify floats the account wrapper on some layouts, which collapses this
   centred card. Scoped to the account page only. */
.woocommerce-account .woocommerce {
	float: none !important;
	width: auto !important;
}

.woocommerce-account .woocommerce > .woocommerce-notices-wrapper { display: none; }

.tg-auth {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 62vh;
	padding: 48px 20px 72px;
	margin-inline: calc(50% - 50vw);
	width: 100vw;
	box-sizing: border-box;
	background:
		radial-gradient(120% 90% at 50% 0%, rgba(205, 166, 13, .18) 0%, rgba(205, 166, 13, .05) 45%, rgba(255, 255, 255, 0) 75%),
		linear-gradient(180deg, #fdfaf0 0%, #ffffff 60%);
}

.tg-auth * { box-sizing: border-box; }

.tg-auth__card {
	width: 100%;
	max-width: 430px;
	background: #ffffff;
	border: 1px solid var(--tg-au-line);
	border-radius: 18px;
	padding: 34px 32px 30px;
	box-shadow: 0 18px 50px rgba(43, 43, 43, .10), 0 2px 6px rgba(43, 43, 43, .04);
	text-align: center;
}

.tg-auth__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	margin-bottom: 18px;
	border-radius: 15px;
	background: var(--tg-au-gold-soft);
	color: var(--tg-au-gold-ink);
	border: 1px solid rgba(205, 166, 13, .28);
}

.tg-auth__title {
	margin: 0 0 7px;
	font-size: 25px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--tg-au-ink) !important;
}

.tg-auth__sub {
	margin: 0 0 24px;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--tg-au-muted);
}

.tg-auth__pane { display: none; }
.tg-auth[data-pane="login"]    .tg-auth__pane--login    { display: block; }
.tg-auth[data-pane="register"] .tg-auth__pane--register { display: block; }

.tg-auth__form { margin: 0; }

.tg-field {
	position: relative;
	margin: 0 0 12px;
	text-align: left;
}

.tg-field__icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	color: #9a9a9a;
	pointer-events: none;
}

.tg-auth .tg-field__input {
	width: 100%;
	height: 48px;
	padding: 0 44px 0 42px;
	border: 1px solid var(--tg-au-line);
	border-radius: 11px;
	background: #f7f7f8;
	font-size: 14.5px;
	color: var(--tg-au-ink);
	line-height: 48px;
	transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.tg-auth .tg-field__input::placeholder { color: #9a9a9a; }

.tg-auth .tg-field__input:focus {
	outline: none;
	background: #ffffff;
	border-color: var(--tg-au-gold);
	box-shadow: 0 0 0 3px rgba(205, 166, 13, .16);
}

.tg-field__peek {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #9a9a9a;
	cursor: pointer;
}

.tg-field__peek:hover { color: var(--tg-au-ink); }

.tg-field__peek:focus-visible,
.tg-auth__link:focus-visible,
.tg-auth__btn:focus-visible {
	outline: 2px solid var(--tg-au-gold);
	outline-offset: 2px;
}

.tg-auth__forgot {
	margin: 0 0 16px;
	text-align: right;
	font-size: 13px;
}

.tg-auth__forgot a { color: var(--tg-au-gold-ink); text-decoration: none; }
.tg-auth__forgot a:hover { text-decoration: underline; }

.tg-auth .tg-auth__btn {
	display: block;
	width: 100%;
	height: 48px;
	padding: 0 20px;
	border: 0;
	border-radius: 11px;
	background: #111111;
	color: #ffffff;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 48px;
	text-align: center;
	cursor: pointer;
	transition: background .16s ease, transform .1s ease;
}

.tg-auth .tg-auth__btn:hover { background: #000000; color: #ffffff; }
.tg-auth .tg-auth__btn:active { transform: translateY(1px); }

.tg-auth__remember {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 14px 0 0;
	font-size: 13.5px;
	color: var(--tg-au-muted);
	cursor: pointer;
}

.tg-auth__remember input { margin: 0; }

.tg-auth__note {
	margin: 0 0 14px;
	padding: 10px 12px;
	border-radius: 9px;
	background: var(--tg-au-gold-soft);
	font-size: 13px;
	color: var(--tg-au-gold-ink);
	text-align: left;
}

.tg-auth__switch {
	margin: 22px 0 0;
	padding-top: 18px;
	border-top: 1px solid #f0f0f0;
	font-size: 14px;
	color: var(--tg-au-muted);
}

.tg-auth__link {
	padding: 0;
	border: 0;
	background: none;
	font-size: 14px;
	font-weight: 700;
	color: var(--tg-au-gold-ink);
	cursor: pointer;
	text-decoration: underline;
}

.tg-auth__link:hover { color: #5c4a03; }

/*
 * WooCommerce notices are printed inside the card. Restyled compactly so an
 * error sits with the form that produced it rather than floating at the top of
 * the page, far from the fields the customer needs to fix.
 */
.tg-auth .woocommerce-error,
.tg-auth .woocommerce-message,
.tg-auth .woocommerce-info {
	margin: 0 0 18px;
	padding: 11px 14px;
	border: 1px solid transparent;
	border-radius: 10px;
	list-style: none;
	font-size: 13.5px;
	line-height: 1.5;
	text-align: left;
}

.tg-auth .woocommerce-error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #b91c1c;
}

.tg-auth .woocommerce-message {
	background: #f0fdf4;
	border-color: #bbf7d0;
	color: #15803d;
}

.tg-auth .woocommerce-info {
	background: var(--tg-au-gold-soft);
	border-color: rgba(205, 166, 13, .3);
	color: var(--tg-au-gold-ink);
}

.tg-auth .woocommerce-error::before,
.tg-auth .woocommerce-message::before,
.tg-auth .woocommerce-info::before { display: none; }

.tg-auth .woocommerce-error li { margin: 0; padding: 0; list-style: none; }
.tg-auth .woocommerce-error a,
.tg-auth .woocommerce-info a { color: inherit; text-decoration: underline; }

@media (max-width: 520px) {
	.tg-auth { padding: 28px 16px 52px; min-height: 0; }
	.tg-auth__card { padding: 28px 20px 24px; border-radius: 15px; }
	.tg-auth__title { font-size: 22px; }
}

/* =========================================================================
 * WIDTH RESET  (fixed after live testing)
 *
 * Two separate things were squeezing the form:
 *
 * 1. WooCommerce core styles form.login / form.register with its own border,
 *    padding and margin. That produced the dashed box inside the card and ate
 *    the horizontal space.
 * 2. Woostify constrains WooCommerce input widths, which truncated the fields
 *    to about 120px so the placeholders read "Ema" and "Pass".
 *
 * !important is used deliberately here. These rules exist only to beat theme
 * and plugin CSS that is more specific than a single class, and every selector
 * is scoped under .tg-auth so nothing else on the site can be affected.
 * ====================================================================== */

.tg-auth__card { max-width: 480px; }

/* 1. Strip WooCommerce own box around both forms. */
.tg-auth form.login,
.tg-auth form.register,
.tg-auth .woocommerce-form {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
}

/* 2. Force every field and its wrapper to fill the card. */
.tg-auth .tg-field,
.tg-auth .form-row {
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	padding: 0 !important;
}

.tg-auth .tg-field__input,
.tg-auth input.tg-field__input,
.tg-auth input[type="text"].tg-field__input,
.tg-auth input[type="email"].tg-field__input,
.tg-auth input[type="password"].tg-field__input {
	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	display: block !important;
	box-sizing: border-box !important;
}

/* 3. Full-width button, and stop the label truncating to "Sign". */
.tg-auth .tg-auth__btn,
.tg-auth button.tg-auth__btn {
	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	white-space: nowrap !important;
	overflow: visible !important;
	text-overflow: clip !important;
}

/* 4. Keep the remember-me row on one tidy line. */
.tg-auth .tg-auth__remember {
	width: 100% !important;
	white-space: nowrap;
}

.tg-auth .tg-auth__remember input[type="checkbox"] {
	width: auto !important;
	flex: 0 0 auto;
}

/* 5. Notices and switch row span the card too. */
.tg-auth .tg-auth__switch,
.tg-auth .tg-auth__forgot,
.tg-auth .tg-auth__note { width: 100%; }
