/**
 * MemberPress Account Section
 * Scoped under #mepr-account-content so our styles override MemberPress.
 */

/* ---------- Trial banner ---------- */
.magix-trial-banner {
	margin: 0 0 16px 0;
	padding: 12px 20px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 6px;
	color: #856404;
}

.magix-trial-banner-text {
	margin: 0;
	font-weight: 600;
}

/* ---------- Subscriptions section (before table) ---------- */
.magix-memberpress-plan-info-section {
	margin: 20px 0;
	padding: 0;
}

.magix-plan-info-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 24px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.magix-plan-info-title {
	margin: 0 0 20px 0;
	padding: 0 0 12px 0;
	border-bottom: 2px solid #f0f0f0;
	font-size: 18px;
	font-weight: 600;
	color: #1d2327;
}

.magix-plan-summary {
	margin-bottom: 20px;
}

.magix-plan-hero {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

.magix-plan-name {
	font-size: 20px;
	font-weight: 700;
	color: #2271b1;
}

.magix-status-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.magix-status-active {
	background: #d4edda;
	color: #155724;
}

.magix-status-cancelled,
.magix-status-cancelling {
	background: #f8d7da;
	color: #721c24;
}

.magix-status-paused,
.magix-status-suspended {
	background: #fff3cd;
	color: #856404;
}

.magix-status-unknown {
	background: #e2e3e5;
	color: #383d41;
}

.magix-plan-meta {
	font-size: 14px;
	color: #646970;
}

.magix-alert {
	padding: 12px 16px;
	border-radius: 6px;
	margin: 16px 0;
	border-left: 4px solid;
}

.magix-alert-warning {
	background: #fff3cd;
	border-color: #ffc107;
	color: #856404;
}

.magix-alert-info {
	background: #d1ecf1;
	border-color: #17a2b8;
	color: #0c5460;
}

.magix-alert strong {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
}

.magix-alert p {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
}

.magix-alert-detail {
	margin-top: 8px;
	opacity: 0.95;
}

.magix-alert-cta {
	margin-top: 12px;
	margin-bottom: 0;
}

.magix-alert-cta .magix-plan-change-button {
	margin-top: 4px;
}

.magix-plan-change-cta {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.magix-plan-change-button {
	display: inline-block;
	padding: 10px 20px;
	background: #2271b1;
	color: #fff !important;
	text-decoration: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	transition: background 0.2s ease;
	border: none;
	cursor: pointer;
}

.magix-plan-change-button:hover {
	background: #135e96;
	color: #fff !important;
}

.magix-plan-change-button.magix-loading,
.magix-plan-change-button:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* ---------- License tab (Magix-style). Scoped to override MemberPress. ---------- */
#mepr-account-content .magix-license-tab,
.mepr-license-wrapper .magix-license-tab {
	display: block;
	margin: 24px 0;
	padding: 0;
	font-size: 16px;
	line-height: 1.5;
	color: #1d2327;
}

#mepr-account-content .magix-license-tab .magix-license-card,
.mepr-license-wrapper .magix-license-tab .magix-license-card {
	display: block;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 28px 32px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
	max-width: 640px;
	margin: 0;
}

#mepr-account-content .magix-license-tab .magix-license-welcome,
.mepr-license-wrapper .magix-license-tab .magix-license-welcome {
	margin: 0 0 20px 0;
	padding: 0;
	font-size: 24px;
	font-weight: 700;
	color: #1d2327;
	line-height: 1.3;
}

#mepr-account-content .magix-license-tab .magix-license-key-display,
.mepr-license-wrapper .magix-license-tab .magix-license-key-display {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	margin: 0 0 16px 0;
	padding: 0;
}

#mepr-account-content .magix-license-tab .magix-license-key-label,
.mepr-license-wrapper .magix-license-tab .magix-license-key-label {
	font-size: 14px;
	color: #646970;
	font-weight: 500;
}

#mepr-account-content .magix-license-tab .magix-license-key-masked,
.mepr-license-wrapper .magix-license-tab .magix-license-key-masked {
	font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
	font-size: 15px;
	letter-spacing: 0.5px;
	color: #1d2327;
	background: #f6f7f7;
	padding: 6px 12px;
	border-radius: 4px;
}

#mepr-account-content .magix-license-tab .magix-license-activated,
#mepr-account-content .magix-license-tab .magix-license-renewal,
.mepr-license-wrapper .magix-license-tab .magix-license-activated,
.mepr-license-wrapper .magix-license-tab .magix-license-renewal {
	margin: 0 0 12px 0;
	padding: 0;
	font-size: 15px;
	color: #50575e;
}

#mepr-account-content .magix-license-tab .magix-license-actions,
.mepr-license-wrapper .magix-license-tab .magix-license-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 24px 0 0 0;
	padding: 24px 0 0 0;
	border-top: 1px solid #eee;
}

#mepr-account-content .magix-license-tab .magix-btn,
.mepr-license-wrapper .magix-license-tab .magix-btn {
	display: inline-block;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	border-radius: 4px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	font-family: inherit;
}

#mepr-account-content .magix-license-tab .magix-btn-primary,
.mepr-license-wrapper .magix-license-tab .magix-btn-primary {
	background: #2271b1;
	color: #fff !important;
	border-color: #2271b1;
}

#mepr-account-content .magix-license-tab .magix-btn-primary:hover,
.mepr-license-wrapper .magix-license-tab .magix-btn-primary:hover {
	background: #135e96;
	color: #fff !important;
	border-color: #135e96;
}

#mepr-account-content .magix-license-tab .magix-btn-secondary,
.mepr-license-wrapper .magix-license-tab .magix-btn-secondary {
	background: #f6f7f7;
	color: #1d2327 !important;
	border-color: #c3c4c7;
}

#mepr-account-content .magix-license-tab .magix-btn-secondary:hover,
.mepr-license-wrapper .magix-license-tab .magix-btn-secondary:hover {
	background: #e8e8e8;
	color: #1d2327 !important;
	border-color: #8c8f94;
}

#mepr-account-content .magix-license-tab .magix-btn-outline,
.mepr-license-wrapper .magix-license-tab .magix-btn-outline {
	background: transparent;
	color: #2271b1 !important;
	border-color: #2271b1;
}

#mepr-account-content .magix-license-tab .magix-btn-outline:hover,
.mepr-license-wrapper .magix-license-tab .magix-btn-outline:hover {
	background: #2271b1;
	color: #fff !important;
}

#mepr-account-content .magix-license-tab .magix-btn.magix-loading,
#mepr-account-content .magix-license-tab .magix-btn:disabled,
.mepr-license-wrapper .magix-license-tab .magix-btn.magix-loading,
.mepr-license-wrapper .magix-license-tab .magix-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

#mepr-account-content .magix-license-tab .magix-license-help,
.mepr-license-wrapper .magix-license-tab .magix-license-help {
	margin: 28px 0 0 0;
	padding: 24px 0 0 0;
	border-top: 1px solid #eee;
}

#mepr-account-content .magix-license-tab .magix-license-help-title,
.mepr-license-wrapper .magix-license-tab .magix-license-help-title {
	margin: 0 0 8px 0;
	padding: 0;
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
}

#mepr-account-content .magix-license-tab .magix-license-help p,
.mepr-license-wrapper .magix-license-tab .magix-license-help p {
	margin: 0 0 16px 0;
	padding: 0;
	font-size: 14px;
	color: #50575e;
	line-height: 1.5;
}

#mepr-account-content .magix-license-tab .magix-license-help a,
.mepr-license-wrapper .magix-license-tab .magix-license-help a {
	color: #2271b1;
	text-decoration: none;
}

#mepr-account-content .magix-license-tab .magix-license-help a:hover,
.mepr-license-wrapper .magix-license-tab .magix-license-help a:hover {
	text-decoration: underline;
}

/* ---------- Account tab (Profile, Password, Billing Address) ---------- */
#mepr-account-content .magix-account-tab,
.mepr-settings-wrapper .magix-account-tab {
	display: block;
	margin: 24px 0;
	padding: 0;
	font-size: 16px;
	line-height: 1.5;
	color: #1a1a1a;
}

#mepr-account-content .magix-account-tab .magix-account-card,
.mepr-settings-wrapper .magix-account-tab .magix-account-card {
	display: block;
	background: #fff;
	border: none;
	border-radius: 0;
	padding: 8px 8px 32px;
	box-shadow: none;
	max-width: 640px;
}

#mepr-account-content .magix-account-tab .magix-account-title,
.mepr-settings-wrapper .magix-account-tab .magix-account-title {
	margin: 0 0 32px 0;
	padding: 0;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
	color: #111;
}

#mepr-account-content .magix-account-tab .magix-account-section,
.mepr-settings-wrapper .magix-account-tab .magix-account-section {
	margin: 0;
	padding: 0 0 24px 0;
	border-bottom: 1px solid #e8e8e8;
}

#mepr-account-content .magix-account-tab .magix-account-section + .magix-account-section,
.mepr-settings-wrapper .magix-account-tab .magix-account-section + .magix-account-section {
	margin-top: 24px;
}

#mepr-account-content .magix-account-tab .magix-account-section-title,
.mepr-settings-wrapper .magix-account-tab .magix-account-section-title {
	margin: 0 0 16px 0;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	color: #111;
}

#mepr-account-content .magix-account-tab .magix-account-field,
.mepr-settings-wrapper .magix-account-tab .magix-account-field {
	margin: 0 0 16px 0;
}

#mepr-account-content .magix-account-tab .magix-account-field:last-child,
.mepr-settings-wrapper .magix-account-tab .magix-account-field:last-child {
	margin-bottom: 0;
}

#mepr-account-content .magix-account-tab .magix-account-label,
.mepr-settings-wrapper .magix-account-tab .magix-account-label {
	display: block;
	margin: 0 0 4px 0;
	font-size: 13px;
	font-weight: 500;
	color: #6b6b6b;
}

#mepr-account-content .magix-account-tab .magix-account-value,
.mepr-settings-wrapper .magix-account-tab .magix-account-value {
	display: block;
	margin: 0;
	padding: 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: #111;
}

#mepr-account-content .magix-account-tab .magix-account-password,
.mepr-settings-wrapper .magix-account-tab .magix-account-password {
	letter-spacing: 0.04em;
}

#mepr-account-content .magix-account-tab .magix-account-address,
.mepr-settings-wrapper .magix-account-tab .magix-account-address {
	line-height: 1.6;
}

#mepr-account-content .magix-account-tab .magix-account-muted,
.mepr-settings-wrapper .magix-account-tab .magix-account-muted {
	color: #6b6b6b;
}

#mepr-account-content .magix-account-tab .magix-account-actions,
.mepr-settings-wrapper .magix-account-tab .magix-account-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 28px;
}

#mepr-account-content .magix-account-tab .magix-btn,
.mepr-settings-wrapper .magix-account-tab .magix-btn {
	display: inline-block;
	margin: 0;
	padding: 10px 22px;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	border-radius: 6px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	font-family: inherit;
	line-height: 1.4;
}

#mepr-account-content .magix-account-tab .magix-btn-outline,
.mepr-settings-wrapper .magix-account-tab .magix-btn-outline {
	background: #fff;
	color: #4d1dff !important;
	border-color: #4d1dff;
}

#mepr-account-content .magix-account-tab .magix-btn-outline:hover,
.mepr-settings-wrapper .magix-account-tab .magix-btn-outline:hover {
	background: #4d1dff;
	color: #fff !important;
	border-color: #4d1dff;
}

@media (max-width: 768px) {
	.magix-plan-info-card,
	#mepr-account-content .magix-license-tab .magix-license-card,
	.mepr-license-wrapper .magix-license-tab .magix-license-card {
		padding: 16px 20px;
	}

	.magix-plan-name {
		font-size: 18px;
	}

	#mepr-account-content .magix-license-tab .magix-license-welcome,
	.mepr-license-wrapper .magix-license-tab .magix-license-welcome {
		font-size: 20px;
	}

	#mepr-account-content .magix-license-tab .magix-license-key-display,
	.mepr-license-wrapper .magix-license-tab .magix-license-key-display {
		flex-direction: column;
		align-items: flex-start;
	}

	#mepr-account-content .magix-license-tab .magix-license-actions,
	.mepr-license-wrapper .magix-license-tab .magix-license-actions {
		flex-direction: column;
	}

	#mepr-account-content .magix-account-tab .magix-account-title,
	.mepr-settings-wrapper .magix-account-tab .magix-account-title {
		font-size: 26px;
	}

	#mepr-account-content .magix-account-tab .magix-account-actions,
	.mepr-settings-wrapper .magix-account-tab .magix-account-actions {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ---------- Loading overlay ---------- */
/* Modal styles are in modal.css (enqueued with modal.js). */
.magix-loading-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.65);
}

.magix-loading-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid #e2e8f0;
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: magix-spin 0.75s linear infinite;
}

@keyframes magix-spin {
	to {
		transform: rotate(360deg);
	}
}
