/**
 * Earn Dashboard — signup / login popup and inline forms.
 * A gradient header sells the offer; the form itself stays plain and quick.
 */

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

.earn-modal {
	position: fixed; inset: 0; z-index: 99999;
	display: flex; align-items: center; justify-content: center;
	padding: 20px;
	font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.earn-modal *, .earn-modal *::before, .earn-modal *::after { box-sizing: border-box; }

.earn-modal__backdrop {
	position: absolute; inset: 0;
	background: rgba(14, 10, 28, .62);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	animation: eaFade .25s ease;
}

.earn-modal__panel {
	position: relative;
	width: 100%; max-width: 430px; max-height: 92vh;
	overflow-y: auto; overflow-x: hidden;
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 40px 90px -30px rgba(14, 10, 28, .85);
	animation: eaPop .4s cubic-bezier(.2, .9, .3, 1);
}

@keyframes eaFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes eaPop { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

.earn-modal__close {
	position: absolute; top: 12px; right: 13px; z-index: 2;
	width: 34px; height: 34px;
	border: 0; border-radius: 50%;
	background: rgba(255,255,255,.2);
	color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
	transition: background .2s;
}

.earn-modal__close:hover { background: rgba(255,255,255,.35); }

/* ------------------------------------------------------------- header */

.earn-modal__head {
	position: relative; overflow: hidden;
	padding: 26px 26px 22px;
	background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 45%, #c026d3 100%);
	color: #fff;
	text-align: center;
}

.earn-modal__head::after {
	content: "";
	position: absolute; width: 320px; height: 320px; top: -200px; right: -90px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255,255,255,.4), transparent 65%);
}

.earn-modal__badge {
	position: relative;
	display: inline-grid; place-items: center;
	width: 46px; height: 46px; margin-bottom: 11px;
	border-radius: 15px;
	background: rgba(255,255,255,.2);
	border: 1px solid rgba(255,255,255,.3);
	color: #fff;
}

.earn-modal__title { position: relative; margin: 0 0 5px; font-size: 24px; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.earn-modal__sub { position: relative; margin: 0; font-size: 13.5px; color: rgba(255,255,255,.85); }

.earn-modal__body { padding: 22px 26px 26px; }

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

/* --------------------------------------------------------------- tabs */

.earn-auth__tabs {
	position: relative;
	display: flex; gap: 0;
	margin-bottom: 18px; padding: 4px;
	border-radius: 999px;
	background: #f3f0fa;
}

.earn-auth__ink {
	position: absolute; top: 4px; left: 4px;
	width: calc(50% - 4px); height: calc(100% - 8px);
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 3px 10px -4px rgba(20,16,31,.5);
	transition: transform .32s cubic-bezier(.2, .9, .3, 1);
}

.earn-auth[data-active="login"] .earn-auth__ink { transform: translateX(100%); }

.earn-auth__tab {
	position: relative; z-index: 1;
	flex: 1; padding: 9px 10px;
	border: 0; border-radius: 999px;
	background: transparent;
	color: #6b6480;
	font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif; font-size: 13.5px; font-weight: 700;
	cursor: pointer;
	transition: color .2s;
}

.earn-auth__tab[aria-selected="true"] { color: #14101f; }

.earn-auth [data-earn-panel][hidden] { display: none; }

/* -------------------------------------------------------------- perks */

.earn-auth__perks {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
	margin-bottom: 18px;
}

.earn-perk {
	display: flex; flex-direction: column; align-items: center; gap: 5px;
	padding: 11px 6px;
	border: 1px solid #ece8f6; border-radius: 13px;
	background: #fbfaff;
	text-align: center;
	font-size: 11px; line-height: 1.3; color: #6b6480;
}

.earn-perk b { display: block; font-size: 13.5px; font-weight: 800; color: #14101f; }

.earn-perk__ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; }
.earn-perk__ico--gift { background: rgba(15,157,88,.12); color: #0f9d58; }
.earn-perk__ico--money { background: rgba(124,58,237,.11); color: #7c3aed; }
.earn-perk__ico--bolt { background: rgba(217,119,6,.12); color: #d97706; }

/* ------------------------------------------------------------- fields */

.earn-modal .earn-field,
.earn-inline-auth .earn-field,
.earn-gate .earn-field { display: block; margin-bottom: 14px; }

.earn-modal .earn-field > span,
.earn-inline-auth .earn-field > span,
.earn-gate .earn-field > span {
	display: block; margin-bottom: 6px;
	font-size: 12.5px; font-weight: 700; color: #5a5370;
}

.earn-modal .earn-field input,
.earn-inline-auth .earn-field input,
.earn-gate .earn-field input {
	width: 100%; padding: 12px 14px;
	border: 1px solid #e4dff2; border-radius: 12px;
	background: #fff; color: #14101f;
	font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif; font-size: 15px;
	transition: border-color .2s, box-shadow .2s;
}

.earn-modal .earn-field input:focus,
.earn-inline-auth .earn-field input:focus,
.earn-gate .earn-field input:focus {
	outline: none; border-color: #7c3aed;
	box-shadow: 0 0 0 4px rgba(124,58,237,.14);
}

.earn-check { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; font-size: 13.5px; color: #5a5370; }

/* The honeypot: present for bots, gone for everybody else. */
.earn-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------ buttons */

.earn-modal .earn-btn,
.earn-inline-auth .earn-btn,
.earn-gate .earn-btn,
.earn-modal .earn-btn:hover,
.earn-inline-auth .earn-btn:hover,
.earn-gate .earn-btn:hover {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 20px;
	border: 0; border-radius: 12px;
	font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif; font-size: 14.5px; font-weight: 700; line-height: 1.2;
	text-transform: none; letter-spacing: 0;
	cursor: pointer; text-decoration: none;
	transition: transform .2s cubic-bezier(.2,.8,.3,1), box-shadow .2s, filter .2s;
}

.earn-modal .earn-btn--primary,
.earn-inline-auth .earn-btn--primary,
.earn-gate .earn-btn--primary,
.earn-modal .earn-btn--primary:hover,
.earn-inline-auth .earn-btn--primary:hover,
.earn-gate .earn-btn--primary:hover {
	background: linear-gradient(135deg, #7c3aed, #c026d3);
	color: #fff;
	box-shadow: 0 12px 26px -12px rgba(192, 38, 211, .95);
}

.earn-modal .earn-btn:hover,
.earn-inline-auth .earn-btn:hover,
.earn-gate .earn-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }

.earn-btn--block { width: 100%; }
.earn-btn--lg { padding: 14px 22px; font-size: 15px; }

.earn-form__trust {
	display: flex; align-items: center; justify-content: center; gap: 6px;
	margin: 12px 0 0; font-size: 12px; color: #918ba6; text-align: center;
}

.earn-form__trust svg { color: #0f9d58; flex: 0 0 auto; }
.earn-form__links { margin: 12px 0 0; font-size: 13px; text-align: center; }
.earn-form__links a { color: #7c3aed; }

.earn-form__error {
	margin: 12px 0 0; padding: 11px 14px; border-radius: 11px;
	background: rgba(225,29,72,.08); border: 1px solid rgba(225,29,72,.22);
	color: #be123c; font-size: 13.5px;
}

/* ------------------------------------------------------ inline / gate */

.earn-inline-auth, .earn-gate {
	max-width: 430px; margin: 0 auto; padding: 26px;
	border: 1px solid #ece8f6; border-radius: 22px;
	background: #fff;
	box-shadow: 0 20px 50px -34px rgba(20,16,31,.8);
	font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.earn-gate h3 { margin: 0 0 18px; font-size: 19px; font-weight: 800; text-align: center; color: #14101f; }
.earn-note { color: #5a5370; font-size: 14px; }
.earn-note a { color: #7c3aed; font-weight: 700; }

@media ( max-width: 520px ) {
	.earn-modal { padding: 0; align-items: flex-end; }
	.earn-modal__panel { max-width: none; max-height: 94vh; border-radius: 22px 22px 0 0; }
	.earn-auth__perks { grid-template-columns: 1fr; }
	.earn-perk { flex-direction: row; justify-content: flex-start; gap: 10px; text-align: left; }
}

@media ( prefers-reduced-motion: reduce ) {
	.earn-modal__panel, .earn-modal__backdrop { animation: none; }
	.earn-auth__ink { transition: none; }
	.earn-modal .earn-btn:hover { transform: none; }
}

/* Same face inside the popup and the inline forms. */
.earn-modal, .earn-modal *,
.earn-inline-auth, .earn-inline-auth *,
.earn-gate, .earn-gate * {
	font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.earn-modal, .earn-inline-auth, .earn-gate { letter-spacing: .005em; }

/* ======================================================================
   Tab buttons. The theme paints bare <button> dark, which covered the
   sliding white pill and left dark-on-dark text. These selectors carry
   enough specificity to win without !important, and every interactive
   state is pinned so hover cannot repaint it either.
   ====================================================================== */

.earn-modal .earn-auth .earn-auth__tab,
.earn-inline-auth .earn-auth .earn-auth__tab,
.earn-gate .earn-auth .earn-auth__tab,
.earn-modal .earn-auth .earn-auth__tab:hover,
.earn-inline-auth .earn-auth .earn-auth__tab:hover,
.earn-gate .earn-auth .earn-auth__tab:hover,
.earn-modal .earn-auth .earn-auth__tab:focus,
.earn-modal .earn-auth .earn-auth__tab:active {
	background: transparent;
	background-color: transparent;
	background-image: none;
	border: 0;
	border-radius: 999px;
	box-shadow: none;
	text-shadow: none;
	color: #6b6480;
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	line-height: 1.3;
	padding: 9px 10px;
	min-height: 0;
	transition: color .2s;
}

/* Hover only tints the label; the pill stays where it is. */
.earn-modal .earn-auth .earn-auth__tab:hover,
.earn-inline-auth .earn-auth .earn-auth__tab:hover,
.earn-gate .earn-auth .earn-auth__tab:hover {
	color: #7c3aed;
}

.earn-modal .earn-auth .earn-auth__tab[aria-selected="true"],
.earn-inline-auth .earn-auth .earn-auth__tab[aria-selected="true"],
.earn-gate .earn-auth .earn-auth__tab[aria-selected="true"],
.earn-modal .earn-auth .earn-auth__tab[aria-selected="true"]:hover,
.earn-inline-auth .earn-auth .earn-auth__tab[aria-selected="true"]:hover,
.earn-gate .earn-auth .earn-auth__tab[aria-selected="true"]:hover {
	background: transparent;
	background-color: transparent;
	color: #14101f;
}

.earn-modal .earn-auth .earn-auth__tab:focus-visible,
.earn-inline-auth .earn-auth .earn-auth__tab:focus-visible,
.earn-gate .earn-auth .earn-auth__tab:focus-visible {
	outline: 2px solid #7c3aed;
	outline-offset: 2px;
}

/* The pill the theme was hiding behind the button background. */
.earn-modal .earn-auth__ink,
.earn-inline-auth .earn-auth__ink,
.earn-gate .earn-auth__ink {
	z-index: 0;
	background: #ffffff;
}

.earn-modal .earn-auth__tab,
.earn-inline-auth .earn-auth__tab,
.earn-gate .earn-auth__tab { position: relative; z-index: 1; }

/* The close button is a bare <button> too. */
.earn-modal .earn-modal__close,
.earn-modal .earn-modal__close:hover,
.earn-modal .earn-modal__close:focus {
	background: rgba(255, 255, 255, .2);
	background-image: none;
	border: 0;
	color: #ffffff;
	box-shadow: none;
	text-shadow: none;
	padding: 0;
	line-height: 1;
}

.earn-modal .earn-modal__close:hover { background: rgba(255, 255, 255, .38); }

/* Optional referral code on signup. */
.earn-field--ref span em { font-style: normal; font-weight: 600; color: #8b84a3; }
.earn-field--ref input { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.earn-field--ref input::placeholder { text-transform: none; letter-spacing: 0; font-weight: 500; }
