/**
 * Auth pages and shared form controls.
 *
 * Measurements ported from design-references/TutorAddons Theme.dc.html lines
 * 911–942. The form primitives (.ta-field, .ta-input, .ta-check, .ta-alert) are
 * reused by checkout and the account pages.
 */

.ta-auth {
	background: var(--ta-surface-soft);
}

.ta-auth__inner {
	display: grid;
	align-items: center;
	gap: 30px;
	max-width: 1000px;
	padding-block: 56px 80px;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Register carries more fields, so it gets one wider column instead of two. */
.ta-auth--wide .ta-auth__inner {
	max-width: 700px;
	grid-template-columns: 1fr;
}

.ta-auth__card {
	padding: clamp(24px, 3vw, 36px);
	border: 1px solid var(--ta-border);
	border-radius: var(--ta-radius-panel);
	background: var(--ta-surface);
}

.ta-auth__perks-title {
	font-size: clamp(22px, 2.4vw, 30px);
	font-weight: 700;
	line-height: 1.25;
}

/* -------------------------------------------------------------------------
 * Checklist (auth perks, product features, bundle contents)
 * ---------------------------------------------------------------------- */

.ta-checklist {
	display: grid;
	gap: 13px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.ta-checklist li {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	color: var(--ta-text-secondary);
	font-size: 14.5px;
	line-height: 1.65;
}

.ta-checklist svg {
	flex: none;
	margin-top: 4px;
	color: var(--ta-brand);
}

/* -------------------------------------------------------------------------
 * Form primitives
 * ---------------------------------------------------------------------- */

.ta-form__title {
	font-size: 26px;
	font-weight: 700;
}

.ta-form__lede {
	margin-top: 9px;
	color: var(--ta-text-muted);
	font-size: 14px;
}

.ta-form__body {
	display: grid;
	gap: 14px;
	margin-top: 24px;
}

.ta-field {
	display: grid;
	gap: 7px;
	color: var(--ta-text-muted);
	font-size: 13px;
	font-weight: 500;
}

.ta-input,
.ta-select--form,
.ta-form textarea {
	width: 100%;
	padding: 13px 14px;
	border: 1px solid var(--ta-border);
	border-radius: 10px;
	background: var(--ta-surface);
	color: var(--ta-text);
	font-family: inherit;
	font-size: 14.5px;
}

.ta-input::placeholder {
	color: var(--ta-text-meta);
}

.ta-input:focus,
.ta-select--form:focus {
	border-color: var(--ta-brand);
	outline: none;
}

.ta-form__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
}

.ta-check {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--ta-text-muted);
	cursor: pointer;
}

.ta-check input[type='checkbox'] {
	width: 16px;
	height: 16px;
	accent-color: var(--ta-brand);
}

.ta-form__link {
	color: var(--ta-brand);
	font-weight: 600;
}

.ta-form__link:hover {
	color: var(--ta-brand-hover);
}

.ta-btn--form {
	padding: 15px;
	border-radius: 11px;
	font-size: 15px;
}

.ta-form__foot {
	margin-top: 18px;
	color: var(--ta-text-muted);
	font-size: 13.5px;
	text-align: center;
}

/* -------------------------------------------------------------------------
 * Alerts
 * ---------------------------------------------------------------------- */

.ta-alert {
	margin-top: 18px;
	padding: 13px 16px;
	border-radius: 10px;
	font-size: 13.5px;
	line-height: 1.6;
}

.ta-alert--error {
	background: #fdeced;
	color: #b42318;
}

.ta-alert--success {
	background: var(--ta-success-bg);
	color: var(--ta-success);
}

.ta-alert p {
	margin: 0;
}

.ta-alert a {
	text-decoration: underline;
}

/* -------------------------------------------------------------------------
 * Two-up field rows (register: first/last name, password/confirm)
 * ---------------------------------------------------------------------- */

.ta-form__grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* The plugin injects its phone field through
 * `edd_dashboard_phone_number_register` with its own Tailwind markup; pull it
 * into line with the fields around it. */
.ta-form .iti,
.ta-form .edd-phone-wrap {
	width: 100%;
}

.ta-form .iti input[type='tel'] {
	width: 100%;
	padding: 13px 14px;
	border: 1px solid var(--ta-border);
	border-radius: 10px;
	background: var(--ta-surface);
	color: var(--ta-text);
	font-family: inherit;
	font-size: 14.5px;
}
