/**
 * Frontend Client Portal Styles.
 *
 * @package EXLMG
 * @since   1.0.0
 */

/* 1. Reset and Portal Wrapper */
.exlmg-portal-wrap {
	color: #001534;
	font-family: inherit;
	box-sizing: border-box;
}

.exlmg-portal-wrap *,
.exlmg-portal-wrap *::before,
.exlmg-portal-wrap *::after {
	box-sizing: border-box;
}

.exlmg-portal-wrap h1,
.exlmg-portal-wrap h2,
.exlmg-portal-wrap p,
.exlmg-portal-wrap button,
.exlmg-portal-wrap input {
	margin: 0;
}

/* 2. Header */
.exlmg-portal-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 30px;
	margin-bottom: 28px;
}

.exlmg-portal-head h1 {
	margin: 0 0 7px;
	padding: 0;
	color: #001534;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.3;
}

.exlmg-portal-head p {
	margin: 0;
	color: #687383;
	font-size: 15px;
	line-height: 1.5;
}

.exlmg-portal-wrap .exlmg-logout {
	display: inline-block;
	padding: 7px 14px;
	background: transparent;
	border: 1px solid rgba(0, 21, 52, 0.18);
	border-radius: 6px;
	color: #001534;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.exlmg-portal-wrap .exlmg-logout:hover,
.exlmg-portal-wrap .exlmg-logout:focus {
	background: rgba(0, 21, 52, 0.06);
	border-color: rgba(0, 21, 52, 0.35);
	color: #001534;
	text-decoration: none;
}

/* 3. Navigation Tabs */
.exlmg-tabs {
	display: flex;
	gap: 36px;
	margin-bottom: 26px;
	border-bottom: 1px solid #d5d9dd;
}

.exlmg-tab {
	margin: 0 0 -1px;
	padding: 0 4px 14px;
	background: transparent;
	border: 0;
	border-bottom: 3px solid transparent;
	color: #66717f;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: none;
	transition: color 0.2s, border-color 0.2s;
}

.exlmg-tab:hover {
	color: #001534;
}

.exlmg-tab.active {
	color: #001534;
	border-bottom-color: #287db8;
}

/* 4. Panels */
.exlmg-panel {
	display: none;
	background: rgba(255, 255, 255, 0.28);
	border: 1px solid rgba(0, 21, 52, 0.14);
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 21, 52, 0.05);
	overflow: hidden;
}

.exlmg-panel.active {
	display: block;
	animation: exlmg-fade 0.3s ease;
}

.exlmg-panel-head {
	padding: 24px 30px 20px;
	border-bottom: 1px solid #dfe3e7;
}

.exlmg-panel-head h2 {
	margin: 0 0 4px;
	color: #001534;
	font-size: 20px;
	font-weight: 700;
}

.exlmg-panel-head p {
	color: #687383;
	font-size: 14px;
}

/* 5. Licenses List */
.exlmg-license {
	padding: 0 30px;
}

.exlmg-license + .exlmg-license {
	border-top: 1px solid #dfe3e7;
}

.exlmg-license-grid {
	display: grid;
	grid-template-columns: 1.35fr 2.2fr 1.1fr 1.1fr auto;
	gap: 24px;
	align-items: center;
	padding: 24px 0 16px;
}

.exlmg-label {
	display: block;
	margin-bottom: 6px;
	color: #7c8793;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.exlmg-product-name {
	color: #001534;
	font-size: 18px;
	font-weight: 800;
}

.exlmg-plan {
	margin-top: 4px;
	color: #687383;
	font-size: 13px;
}

.exlmg-key-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.exlmg-key-wrap code {
	padding: 6px 10px;
	background: #f3f5f7;
	border: 1px solid #e5e8eb;
	border-radius: 4px;
	color: #203b59;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 14px;
}

.exlmg-copy {
	padding: 4px 6px;
	background: transparent;
	border: 0;
	color: #287db8;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
}

.exlmg-copy:hover {
	color: #1f6496;
}

.exlmg-metric {
	color: #001534;
	font-size: 15px;
	font-weight: 700;
}

.exlmg-status {
	display: inline-block;
	margin-left: 6px;
	padding: 3px 8px;
	background: #eaf8f0;
	border-radius: 20px;
	color: #168a50;
	font-size: 11px;
	font-weight: 700;
}

.exlmg-status.disabled {
	background: #f0f0f1;
	color: #50575e;
}

.exlmg-status.expired {
	background: #fcf0f1;
	color: #d63638;
}

.exlmg-portal-wrap .exlmg-btn {
	display: inline-block;
	padding: 9px 16px;
	background: #287db8;
	border: 1px solid #287db8;
	border-radius: 6px;
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
}

.exlmg-portal-wrap .exlmg-btn:hover,
.exlmg-portal-wrap .exlmg-btn:focus {
	background: #1f6496;
	border-color: #1f6496;
	color: #fff;
	text-decoration: none;
}

.exlmg-manage {
	padding: 0 0 16px;
	background: transparent;
	border: 0;
	color: #001534;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
}

.exlmg-manage:hover {
	color: #287db8;
}

.exlmg-sites {
	display: none;
	margin: 0 0 20px;
	padding: 16px 20px;
	background: #f7f9fb;
	border: 1px solid #e3e7eb;
	border-radius: 8px;
}

.exlmg-sites.open {
	display: block;
	animation: exlmg-fade 0.3s ease;
}

.exlmg-site-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 10px 0;
	border-bottom: 1px dashed #d8dde2;
}

.exlmg-site-row:last-child {
	border-bottom: 0;
}

.exlmg-site-url {
	color: #001534;
	font-weight: 700;
	font-size: 14px;
}

.exlmg-site-meta {
	margin-top: 3px;
	color: #687383;
	font-size: 12px;
}

.exlmg-revoke-btn {
	padding: 6px 12px;
	background: #fff;
	border: 1px solid #d76363;
	border-radius: 5px;
	color: #b73d3d;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.exlmg-revoke-btn:hover {
	background: #fcf0f1;
	color: #b73d3d;
}

/* 6. Account Panel */
.exlmg-account-content {
	padding: 0 30px;
}

.exlmg-account-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 22px 0;
	border-bottom: 1px solid #dfe3e7;
}

.exlmg-account-row:last-child {
	border-bottom: 0;
}

.exlmg-account-title {
	margin-bottom: 3px;
	color: #001534;
	font-size: 16px;
	font-weight: 700;
}

.exlmg-account-sub {
	color: #687383;
	font-size: 14px;
}

.exlmg-portal-wrap .exlmg-secondary {
	display: inline-block;
	padding: 8px 14px;
	background: transparent;
	border: 1px solid rgba(0, 21, 52, 0.25);
	border-radius: 6px;
	color: #001534;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
}

.exlmg-portal-wrap .exlmg-secondary:hover {
	background: rgba(0, 21, 52, 0.06);
	border-color: rgba(0, 21, 52, 0.45);
}

.exlmg-account-password {
	flex-direction: column;
	align-items: stretch;
}

.exlmg-account-password-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	width: 100%;
}

/* 7. Password Visibility & Field Wrap */
.exlmg-password-field-wrap {
	position: relative;
	width: 100%;
	display: flex;
	align-items: center;
}

.exlmg-password-field-wrap input {
	width: 100%;
	min-height: 48px;
	padding: 10px 42px 10px 12px !important;
	background: #fcfbf7;
	border: 1px solid rgba(0, 21, 52, 0.16);
	border-radius: 6px;
	color: #001534;
	font-size: 15px;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.exlmg-password-field-wrap input:focus {
	border-color: #287db8;
	box-shadow: 0 0 0 2px rgba(40, 125, 184, 0.15);
}

.exlmg-toggle-password {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: 0;
	padding: 4px;
	margin: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #687383;
	transition: color 0.15s;
	line-height: 0;
}

.exlmg-toggle-password:hover {
	color: #001534;
}

.exlmg-eye-icon {
	display: inline-block;
	width: 18px;
	height: 18px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23687383' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.exlmg-toggle-password.is-visible .exlmg-eye-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23287db8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

.exlmg-password-form {
	display: none;
	margin: 16px 0 0;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.exlmg-password-form.open {
	display: grid;
}

.exlmg-portal-wrap .exlmg-password-form .exlmg-save-password {
	grid-column: 1 / -1;
	justify-self: start;
	margin-top: 4px;
}

.exlmg-password-msg {
	grid-column: 1 / -1;
	font-size: 13px;
	font-weight: 600;
}

.exlmg-password-msg.exlmg-error {
	color: #d63638;
}

.exlmg-password-msg.exlmg-success {
	color: #168a50;
}

/* 8. Login & Reset Password Wrappers */
.exlmg-frontend-login-wrap {
	max-width: 400px;
	margin: 0 auto;
	padding: 30px;
	background: rgba(255, 255, 255, 0.28);
	border: 1px solid rgba(0, 21, 52, 0.14);
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 21, 52, 0.05);
	color: #001534;
}

.exlmg-frontend-login-wrap h1 {
	margin-bottom: 24px;
	color: #001534;
	font-size: 28px;
	font-weight: 700;
	text-align: center;
}

.exlmg-frontend-login-wrap form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.exlmg-frontend-login-wrap label {
	display: block;
	color: #001534;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
}

.exlmg-frontend-login-wrap input[type="text"],
.exlmg-frontend-login-wrap input[type="password"] {
	display: block;
	width: 100%;
	height: 46px;
	min-height: 46px;
	padding: 10px 12px;
	background: #fcfbf7;
	border: 1px solid rgba(0, 21, 52, 0.16);
	border-radius: 6px;
	color: #001534;
	font-size: 15px;
	line-height: normal;
	outline: none;
}

.exlmg-frontend-login-wrap input[type="text"]:focus,
.exlmg-frontend-login-wrap input[type="password"]:focus {
	border-color: #287db8;
	box-shadow: 0 0 0 2px rgba(40, 125, 184, 0.15);
}

.exlmg-frontend-login-wrap .login-remember label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	cursor: pointer;
}

.exlmg-frontend-login-wrap .login-remember input[type="checkbox"] {
	appearance: auto;
	width: 16px;
	height: 16px;
	min-width: 16px;
	min-height: 16px;
	margin: 0;
	padding: 0;
	flex-shrink: 0;
	accent-color: #287db8;
}

.exlmg-frontend-login-wrap input[type="submit"] {
	width: 100%;
	min-height: 48px;
	padding: 10px 16px;
	background: #287db8;
	border: 0;
	border-radius: 6px;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s;
}

.exlmg-frontend-login-wrap input[type="submit"]:hover {
	background: #1f6496;
}

.exlmg-login-links {
	margin-top: 20px;
	text-align: center;
	font-size: 13px;
}

.exlmg-login-links a {
	color: #287db8;
	text-decoration: none;
	font-weight: 600;
}

.exlmg-login-links a:hover {
	text-decoration: underline;
}

/* 9. Notices & Helper Classes */
.exlmg-notice-error {
	color: #d63638;
	font-size: 14px;
	margin-bottom: 16px;
	text-align: center;
	font-weight: 600;
}

.exlmg-notice-success {
	color: #168a50;
	font-size: 18px;
	font-weight: 700;
	text-align: center;
	margin-bottom: 16px;
}

.exlmg-action-center {
	text-align: center;
	margin-top: 20px;
}

.exlmg-btn-block {
	width: 100%;
	justify-content: center;
}

.exlmg-logged-in-notice {
	padding: 16px;
	background: #f7f9fb;
	border-radius: 6px;
	font-size: 14px;
}

/* 10. Dedicated Checkout Styles */
.exlmg-checkout-module {
	max-width: 460px;
	margin: 0 auto;
}

.exlmg-checkout-module.exlmg-checkout-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
	max-width: 1080px;
	margin: 0 auto;
	align-items: stretch;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #0b172a;
	box-sizing: border-box;
}

.exlmg-checkout-grid *,
.exlmg-checkout-grid *::before,
.exlmg-checkout-grid *::after {
	box-sizing: border-box;
}

.exlmg-checkout-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 36px;
	box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.06);
}

.exlmg-step-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 26px;
}

.exlmg-step-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: #f5f2e8;
	color: #001534;
	font-size: 13px;
	font-weight: 800;
	flex-shrink: 0;
}

.exlmg-step-header h2 {
	margin: 0;
	font-size: 21px;
	font-weight: 800;
	color: #001534;
	padding: 0;
}

.exlmg-checkout-form-fields {
	margin: 20px 0;
}

.exlmg-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 18px;
}

.exlmg-form-col {
	flex: 1;
}

.exlmg-form-group {
	margin-bottom: 6px;
}

.exlmg-checkout-card label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 8px;
}

.exlmg-field {
	width: 100%;
	height: 48px;
	padding: 0 16px;
	border: 1px solid #dbe3ef !important;
	border-radius: 10px !important;
	background: #ffffff;
	font-size: 14px;
	color: #0f172a;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.exlmg-field::placeholder {
	color: #94a3b8;
}

.exlmg-field:focus {
	border-color: #2563eb !important;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
	outline: none;
}

.exlmg-input-hint {
	margin: 8px 0 0;
	font-size: 12.5px;
	color: #64748b;
}

.exlmg-card-divider {
	border: 0;
	border-top: 1px solid #eef2f6;
	margin: 24px 0;
}

.exlmg-terms-box {
	display: flex !important;
	align-items: center;
	gap: 12px;
	padding: 15px 18px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	cursor: pointer;
	font-size: 13.5px !important;
	font-weight: 500 !important;
	color: #475569 !important;
	margin-bottom: 24px !important;
}

.exlmg-terms-box input[type="checkbox"] {
	width: 17px;
	height: 17px;
	margin: 0;
	accent-color: #1d4ed8;
	cursor: pointer;
	flex-shrink: 0;
}

.exlmg-terms-box a {
	color: #1d4ed8;
	font-weight: 700;
	text-decoration: none;
}

.exlmg-terms-box a:hover {
	text-decoration: underline;
}

.exlmg-validation-msg {
	margin: -12px 0 20px;
	padding: 10px 14px;
	border-radius: 8px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #dc2626;
	font-size: 13px;
	font-weight: 600;
}

.exlmg-trust-list {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.exlmg-trust-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.exlmg-trust-icon {
	margin-top: 2px;
	flex-shrink: 0;
}

.exlmg-trust-text {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.exlmg-trust-text strong {
	font-size: 13.5px;
	font-weight: 700;
	color: #0f172a;
}

.exlmg-trust-text span {
	font-size: 13px;
	color: #64748b;
	line-height: 1.45;
}

.exlmg-summary-product h3 {
	margin: 0 0 6px;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	color: #001534;
}

.exlmg-plan-details {
	display: block;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
	color: #64748b;
}

.exlmg-total-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 28px;
}

.exlmg-total-labels {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.exlmg-total-labels strong {
	font-size: 15px;
	font-weight: 800;
	color: #0b172a;
}

.exlmg-total-labels span {
	font-size: 12.5px;
	color: #64748b;
}

.exlmg-total-amount {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.exlmg-old-price {
	font-size: 16px;
	color: #94a3b8;
	font-weight: 600;
}

.exlmg-final-price {
	font-size: 30px;
	font-weight: 900;
	color: #0b172a;
	letter-spacing: -0.02em;
}

.exlmg-step-payment {
	margin-top: 8px;
	margin-bottom: 14px;
}

.exlmg-payment-desc {
	margin: 0 0 20px;
	font-size: 13.5px;
	color: #64748b;
	line-height: 1.5;
}

.exlmg-purchase-success {
	padding: 24px;
	background: #eaf8f0;
	border: 1px solid #168a50;
	border-radius: 8px;
	text-align: center;
}

.exlmg-purchase-success h4 {
	margin: 0 0 8px;
	color: #168a50;
	font-size: 18px;
}

.exlmg-purchase-success p {
	margin: 0;
	color: #1d2327;
	font-size: 14px;
}

@media (max-width: 860px) {
	.exlmg-checkout-module.exlmg-checkout-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 520px) {
	.exlmg-checkout-card {
		padding: 24px;
	}
	.exlmg-form-row {
		grid-template-columns: 1fr;
	}
}

/* 11. Animations & Responsive */
@keyframes exlmg-fade {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 900px) {
	.exlmg-portal-head {
		align-items: flex-start;
		flex-direction: column;
	}

	.exlmg-license-grid {
		grid-template-columns: 1fr 1fr;
	}

	.exlmg-license-actions {
		grid-column: 1 / -1;
	}
}

@media (max-width: 560px) {
	.exlmg-license-grid {
		grid-template-columns: 1fr;
	}

	.exlmg-panel-head,
	.exlmg-license,
	.exlmg-account-content {
		padding-left: 20px;
		padding-right: 20px;
	}

	.exlmg-account-row {
		align-items: flex-start;
		flex-direction: column;
	}

	.exlmg-password-form {
		grid-template-columns: 1fr;
	}

	.exlmg-portal-head h1,
	.exlmg-frontend-login-wrap h1 {
		font-size: 24px;
	}

	.exlmg-form-row {
		flex-direction: column;
	}
}
