/* PG Easy Login — tabbed Login / Sign Up card.
   Palette sampled from the reference design:
   maroon #900000 · gold #cea22d · cream #fafad7 */

.pgel-wrap {
	--pgel-primary: #900000;
	--pgel-primary-dark: #7a0000;
	--pgel-gold: #cea22d;
	--pgel-cream: #fafad7;
	--pgel-border: #cea22d;
	--pgel-radius: 10px;
	max-width: 400px;
	margin: 0 auto;
	font-family: inherit;
	line-height: 1.4;
}

.pgel-formcard {
	background: var(--pgel-cream);
	border: 2px solid var(--pgel-primary);
	border-radius: 12px;
	padding: 20px 18px 22px;
	box-shadow: 0 6px 24px rgba(120, 20, 10, 0.12);
	box-sizing: border-box;
}

/* Tabs */
.pgel-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border: 2px solid var(--pgel-primary);
	border-radius: var(--pgel-radius);
	overflow: hidden;
	margin: 0 0 18px;
}

.pgel-tab {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	background: transparent;
	color: var(--pgel-primary);
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	padding: 11px 8px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.pgel-tab:hover {
	background: rgba(144, 0, 0, 0.08);
}

.pgel-tab.active {
	background: var(--pgel-primary);
	color: var(--pgel-cream);
	cursor: default;
	font-weight: 700;
	box-shadow: inset 0 -3px 0 var(--pgel-gold);
}

.pgel-tab:focus-visible {
	outline: 2px dashed var(--pgel-primary);
	outline-offset: -5px;
}

/* Panels */
.pgel-panel {
	display: none;
}

.pgel-panel.active {
	display: block;
	animation: pgelFade 0.25s ease;
}

@keyframes pgelFade {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: none; }
}

/* Status message */
.pgel-msg {
	display: block;
	border-radius: 8px;
	padding: 10px 13px;
	margin: 0 0 14px;
	font-size: 14px;
	font-weight: 500;
}

.pgel-msg[hidden] {
	display: none;
}

.pgel-msg.error {
	background: #fdecea;
	color: var(--pgel-primary);
	border: 1px solid #eec0b8;
}

.pgel-msg.success {
	background: #e9f7ec;
	color: #1e6b34;
	border: 1px solid #bfe5c9;
}

/* Forgot-password panel */
.pgel-lost-text {
	color: #5a4a3a;
	font-size: 15px;
	line-height: 1.55;
	margin: 2px 0 16px;
}

.pgel-back-row {
	margin: 14px 0 0;
	text-align: center;
}

/* Fields */
.pgel-field {
	display: flex;
	align-items: stretch;
	background: #fff;
	border: 1.5px solid var(--pgel-border);
	border-radius: 9px;
	margin: 0 0 14px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.pgel-field:focus-within {
	border-color: var(--pgel-primary);
	box-shadow: 0 0 0 3px rgba(144, 0, 0, 0.12);
}

.pgel-ico {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	margin: 4px;
	border-radius: 7px;
	background: var(--pgel-gold);
	color: #fff;
}

.pgel-ico .pgel-svg {
	width: 19px;
	height: 19px;
}

.pgel-field input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	padding: 13px 12px 13px 10px;
	font-size: 15px;
	color: #333;
	font-family: inherit;
}

.pgel-field.pgel-plain input {
	padding-left: 14px;
}

.pgel-field input::placeholder {
	color: #8f8f8f;
	opacity: 1;
}

/* Eye (password visibility) toggle */
.pgel-eye {
	border: 0;
	background: none;
	padding: 0 12px;
	cursor: pointer;
	color: #4a4a4a;
	display: flex;
	align-items: center;
}

.pgel-eye .pgel-svg {
	width: 20px;
	height: 20px;
}

.pgel-eye:hover {
	color: var(--pgel-primary);
}

.pgel-eye .i-eye-off {
	display: none;
}

.pgel-eye.showing .i-eye {
	display: none;
}

.pgel-eye.showing .i-eye-off {
	display: block;
}

/* Remember me / forgot password row */
.pgel-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 2px 2px 0;
	font-size: 14px;
	font-weight: 600;
}

.pgel-remember {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
	color: var(--pgel-primary);
}

.pgel-remember input {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--pgel-primary);
	cursor: pointer;
}

.pgel-forgot {
	color: var(--pgel-primary);
	text-decoration: none;
	font-weight: 600;
}

.pgel-forgot:hover,
.pgel-forgot:focus {
	color: var(--pgel-primary-dark);
	text-decoration: underline;
}

/* Country code select */
.pgel-select-field {
	position: relative;
}

/* Country code + phone number share one line */
.pgel-phone-row {
	display: flex;
	align-items: stretch;
	gap: 10px;
}

.pgel-phone-row .pgel-select-field {
	flex: 0 0 44%;
	margin: 0 0 14px;
}

.pgel-phone-row .pgel-field.pgel-plain {
	flex: 1 1 auto;
	margin: 0 0 14px;
}

.pgel-select-field select {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	appearance: none;
	-webkit-appearance: none;
	padding: 13px 36px 13px 14px;
	font-size: 15px;
	color: #333;
	cursor: pointer;
	font-family: inherit;
}

.pgel-select-field::after {
	content: "";
	position: absolute;
	right: 15px;
	top: 50%;
	width: 8px;
	height: 8px;
	border-right: 2px solid #777;
	border-bottom: 2px solid #777;
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
}

/* Submit button */
.pgel-submit {
	display: block;
	width: calc(100% - 16px);
	margin: 20px 8px 4px;
	padding: 13px 16px;
	border: 0;
	border-radius: 9px;
	background: var(--pgel-primary);
	color: var(--pgel-cream);
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0.2px;
	cursor: pointer;
	position: relative;
	transition: background 0.2s, transform 0.05s;
}

.pgel-submit:hover {
	background: var(--pgel-primary-dark);
}

.pgel-submit:active {
	transform: translateY(1px);
}

.pgel-submit[disabled] {
	opacity: 0.75;
	cursor: progress;
}

.pgel-submit.loading::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 9px;
	border: 2px solid rgba(250, 250, 215, 0.45);
	border-top-color: var(--pgel-cream);
	border-radius: 50%;
	animation: pgelSpin 0.7s linear infinite;
	vertical-align: -2px;
}

@keyframes pgelSpin {
	to { transform: rotate(360deg); }
}

/* Logged-in state */
.pgel-hello {
	margin: 4px 2px 14px;
	font-size: 15px;
	color: #5c1010;
}

.pgel-logout {
	text-align: center;
	text-decoration: none;
}

/* Honeypot (never visible) */
.pgel-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden;
}

/* Small screens */
@media (max-width: 420px) {
	.pgel-formcard {
		padding: 16px 12px 18px;
	}

	.pgel-tab {
		font-size: 15px;
	}

	.pgel-submit {
		width: 100%;
		margin-left: 0;
		margin-right: 0;
	}

	.pgel-phone-row {
		gap: 8px;
	}

	.pgel-phone-row .pgel-select-field {
		flex-basis: 46%;
	}

	.pgel-phone-row .pgel-select-field select {
		padding: 13px 24px 13px 10px;
	}
}

/* Math captcha */
.pgel-captcha-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	padding: 6px 8px;
	border: 1px dashed var(--pgel-primary);
	border-radius: 10px;
	background: rgba(144, 0, 0, 0.04);
}

.pgel-cap-ico {
	flex: 0 0 34px;
	width: 34px;
	margin: 0;
	height: 34px;
}

.pgel-cap-ico .pgel-svg {
	width: 16px;
	height: 16px;
}

.pgel-captcha-q {
	flex: 1 1 auto;
	font-weight: 700;
	color: var(--pgel-primary);
	font-size: 15px;
	white-space: nowrap;
}

.pgel-captcha-in {
	flex: 0 0 76px;
	width: 76px;
	margin: 0;
	padding: 8px 8px;
	border: 1px solid var(--pgel-border);
	border-radius: 8px;
	background: #fff;
	font-size: 15px;
	font-weight: 700;
	text-align: center;
}

.pgel-cap-refresh {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 auto;
	border: 0;
	background: transparent;
	color: var(--pgel-primary);
	font-size: 17px;
	line-height: 1;
	padding: 2px;
	cursor: pointer;
}

.pgel-cap-refresh:hover {
	color: var(--pgel-primary-dark);
}

/* Popup modal — opens from any element with class "pgel-card" */
.pgel-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
}

.pgel-modal[hidden] {
	display: none;
}

body.pgel-modal-open {
	overflow: hidden;
}

.pgel-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(52, 34, 12, 0.55);
	animation: pgelFade 0.2s ease;
}

.pgel-modal-box {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 430px;
	animation: pgelPop 0.22s ease;
}

.pgel-modal-box .pgel-wrap {
	max-width: none;
	margin: 0;
}

.pgel-modal-x {
	position: absolute;
	top: -14px;
	right: -14px;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 2px solid var(--pgel-primary, #900000);
	border-radius: 50%;
	background: #fff;
	color: var(--pgel-primary, #900000);
	font-size: 20px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	z-index: 2;
}

.pgel-modal-x:hover {
	background: var(--pgel-primary, #900000);
	color: #fff;
}

@keyframes pgelPop {
	from { opacity: 0; transform: translateY(14px) scale(0.97); }
	to { opacity: 1; transform: none; }
}

@media (max-width: 420px) {
	.pgel-modal {
		padding: 12px;
	}
}
