/**
 * Auth page styles — register, login.
 *
 * @since 1.10.0
 */

/* Hide MemberPress duplicate login form when PMA auth is active */
.pma-auth-wrap ~ #mepr-template-login,
.pma-auth-wrap ~ .mp_wrapper,
body:has(.pma-auth-wrap) #mepr-template-login,
body:has(.pma-auth-wrap) .mp_wrapper.mp_login_form {
	display: none !important;
}

/* Divi theme overrides — hide sidebar, force full width */
body:has(.pma-auth-wrap) #sidebar { display: none !important; }
body:has(.pma-auth-wrap) #content-area,
body:has(.pma-auth-wrap) #left-area,
body:has(.pma-auth-wrap) #left-area article,
body:has(.pma-auth-wrap) #left-area .entry-content {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	padding: 0 !important;
}
body:has(.pma-auth-wrap) .entry-title,
body:has(.pma-auth-wrap) .page-title { display: none !important; }

/* Wrap */
.pma-auth-wrap {
	max-width: 460px;
	margin: 40px auto;
	font-family: var(--pma-font);
	color: var(--pma-text);
}

/* Hero */
.pma-auth-hero {
	background: linear-gradient(135deg, var(--pma-primary) 0%, #4f46e5 100%);
	color: #fff;
	text-align: center;
	padding: 40px 32px 32px;
	border-radius: var(--pma-radius-lg) var(--pma-radius-lg) 0 0;
}

.pma-auth-hero .pma-auth-logo {
	margin-bottom: 16px;
}

.pma-auth-hero .pma-auth-logo img {
	max-height: 48px;
	width: auto;
	border-radius: 6px;
}

.pma-auth-hero .pma-auth-logo-text {
	font-size: 20px;
	font-weight: 700;
	opacity: 0.9;
	letter-spacing: 0.5px;
}

.pma-auth-hero h1 {
	margin: 0 0 8px;
	font-size: 26px;
	font-weight: 700;
	color: #fff;
	line-height: 1.2;
}

.pma-auth-hero p {
	margin: 0;
	font-size: 15px;
	opacity: 0.85;
	color: #fff;
}

/* Card */
.pma-auth-card {
	background: var(--pma-bg);
	border: 1px solid var(--pma-border);
	border-top: 0;
	border-radius: 0 0 var(--pma-radius-lg) var(--pma-radius-lg);
	padding: 32px;
	box-shadow: var(--pma-shadow-md);
}

/* Form */
.pma-auth-card .pma-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.pma-auth-card .pma-form-group {
	margin-bottom: 20px;
}

.pma-auth-card .pma-form-group label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--pma-text);
	margin-bottom: 6px;
}

.pma-auth-card .pma-form-group input[type="text"],
.pma-auth-card .pma-form-group input[type="email"],
.pma-auth-card .pma-form-group input[type="password"] {
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid var(--pma-border);
	border-radius: var(--pma-radius-sm);
	font-size: 15px;
	font-family: var(--pma-font);
	color: var(--pma-text);
	background: var(--pma-bg);
	transition: border-color var(--pma-transition), box-shadow var(--pma-transition);
	box-sizing: border-box;
}

.pma-auth-card .pma-form-group input:focus {
	border-color: var(--pma-primary);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
	outline: none;
}

.pma-auth-card .pma-form-group input.pma-input-error {
	border-color: var(--pma-danger);
}

.pma-required {
	color: var(--pma-danger);
}

.pma-field-hint {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: var(--pma-text-light);
}

/* Password toggle */
.pma-password-wrap {
	position: relative;
}

.pma-password-wrap input {
	padding-right: 44px !important;
}

.pma-password-toggle {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: var(--pma-text-light);
	line-height: 1;
}

.pma-password-toggle:hover {
	color: var(--pma-text-secondary);
}

.pma-password-toggle .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

/* T&C Section */
.pma-tc-section {
	margin-bottom: 20px;
}

.pma-tc-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--pma-text);
	margin-bottom: 8px;
}

.pma-tc-box {
	max-height: 200px;
	overflow-y: auto;
	border: 1.5px solid var(--pma-border);
	border-radius: var(--pma-radius-sm);
	padding: 16px;
	font-size: 12px;
	line-height: 1.6;
	color: var(--pma-text-secondary);
	background: var(--pma-bg-secondary);
	margin-bottom: 8px;
}

.pma-tc-box:focus {
	border-color: var(--pma-primary);
	outline: none;
}

.pma-tc-box h2, .pma-tc-box h3, .pma-tc-box h4 {
	color: var(--pma-text);
	margin-top: 16px;
	margin-bottom: 8px;
}

.pma-tc-box h2 { font-size: 15px; }
.pma-tc-box h3 { font-size: 13px; }
.pma-tc-box h4 { font-size: 12px; }

.pma-tc-box ul {
	padding-left: 20px;
	margin: 8px 0;
}

.pma-tc-box li {
	margin-bottom: 4px;
}

.pma-tc-box p {
	margin: 8px 0;
}

.pma-tc-fulllink {
	display: inline-block;
	font-size: 12px;
	color: var(--pma-primary);
	margin-bottom: 12px;
}

.pma-tc-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	cursor: pointer;
}

.pma-tc-checkbox input[type="checkbox"] {
	margin-top: 2px;
	flex-shrink: 0;
}

.pma-tc-checkbox span {
	font-size: 13px;
	color: var(--pma-text);
	line-height: 1.4;
}

/* Privacy Pledge */
.pma-privacy-pledge {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: var(--pma-radius-sm);
	padding: 16px;
	margin-bottom: 20px;
}

.pma-privacy-pledge-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	color: #166534;
}

.pma-privacy-pledge-icon {
	flex-shrink: 0;
	color: #16a34a;
}

.pma-privacy-pledge-header strong {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.pma-privacy-pledge-list {
	margin: 0 0 10px;
	padding-left: 18px;
	list-style: none;
}

.pma-privacy-pledge-list li {
	position: relative;
	font-size: 12px;
	line-height: 1.55;
	color: #15803d;
	margin-bottom: 6px;
	padding-left: 6px;
}

.pma-privacy-pledge-list li:last-child {
	margin-bottom: 0;
}

.pma-privacy-pledge-list li::before {
	content: "\2713";
	position: absolute;
	left: -16px;
	font-weight: 700;
	color: #16a34a;
}

.pma-privacy-pledge-note {
	margin: 0;
	font-size: 11px;
	line-height: 1.5;
	color: #4b5563;
	font-style: italic;
	padding-top: 8px;
	border-top: 1px solid #dcfce7;
}

/* Submit button */
.pma-btn-full {
	width: 100%;
	padding: 12px;
	font-size: 16px;
	font-weight: 600;
	margin-top: 4px;
}

.pma-btn-full:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Messages */
.pma-auth-message {
	padding: 10px 14px;
	border-radius: var(--pma-radius-sm);
	font-size: 13px;
	margin-bottom: 16px;
	line-height: 1.4;
}

.pma-auth-message.pma-msg-error {
	background: var(--pma-danger-light);
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.pma-auth-message.pma-msg-success {
	background: var(--pma-success-light);
	color: #065f46;
	border: 1px solid #a7f3d0;
}

/* Footer */
.pma-auth-footer {
	text-align: center;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--pma-border);
}

.pma-auth-footer p {
	margin: 0;
	font-size: 14px;
	color: var(--pma-text-secondary);
}

.pma-auth-footer a {
	color: var(--pma-primary);
	font-weight: 600;
	text-decoration: none;
}

.pma-auth-footer a:hover {
	text-decoration: underline;
}

/* Auth links row */
.pma-auth-links {
	text-align: right;
	margin-bottom: 20px;
}

.pma-auth-links a {
	font-size: 13px;
	color: var(--pma-primary);
	text-decoration: none;
}

.pma-auth-links a:hover {
	text-decoration: underline;
}

/* Responsive */
@media (max-width: 520px) {
	.pma-auth-wrap {
		margin: 20px 16px;
	}

	.pma-auth-hero {
		padding: 28px 20px 24px;
	}

	.pma-auth-card {
		padding: 24px 20px;
	}

	.pma-auth-card .pma-form-row {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.pma-auth-hero h1 {
		font-size: 22px;
	}
}
