/* Pa entrar — modal de login/registro.
   --pent-accent: color de Ajustes; si no, contraste del tema. */
:root {
	--pent-c: var(--pent-accent, var(--wp--preset--color--contrast, #111));
}

/* ── Enlace del header ([pa_entrar]) ── */
/* Dos líneas, ambas centradas. */
.pent-header {
	display: block;
	width: 100%;
	text-align: center;
}

/* Dos líneas: saludo arriba, acción abajo. */
.pent-header .pent-line1,
.pent-header .pent-line2 {
	display: block;
	line-height: 1.45;
}

/* Avatar circular del lector (foto de Gravatar o la del perfil). */
.pent-header img.pent-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	vertical-align: middle;
	margin-right: 7px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.pent-header a {
	color: inherit;
	text-decoration: none;
}

/* "(Accede)" en negro, no con el rojo de los enlaces del tema. */
.pent-header a.pent-login-tgr {
	color: #111;
}

.pent-header a:hover {
	text-decoration: underline;
}

.pent-header strong {
	font-weight: 700;
}

#pent-overlay {
	position: fixed;
	inset: 0;
	z-index: 99995;
	background: rgba(0, 0, 0, 0.5);
}

#pent-overlay[hidden],
#pent-modal[hidden] {
	display: none;
}

body.pent-noscroll {
	overflow: hidden;
}

#pent-modal {
	position: fixed;
	inset: 0;
	margin: auto;
	height: fit-content;
	max-height: 92vh;
	overflow-y: auto;
	width: min(400px, 92vw);
	z-index: 99996;
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--contrast, #111);
	border-radius: 16px;
	padding: 28px 26px 24px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}

#pent-close {
	position: absolute;
	top: 12px;
	right: 12px;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	padding: 4px;
	line-height: 0;
	opacity: 0.6;
}

#pent-close:hover {
	opacity: 1;
}

.pent-title {
	margin: 0 0 2px;
	font-size: 1.25em;
	text-align: center;
}

.pent-sub {
	margin: 0 0 18px;
	text-align: center;
	font-size: 0.9em;
	opacity: 0.7;
}

/* ── Social ── */
.pent-social {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

#pent-google {
	min-height: 40px;
	display: flex;
	justify-content: center;
	width: 320px;
	max-width: 100%;
}

.pent-btn-social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 320px;
	max-width: 100%;
	box-sizing: border-box;
	padding: 10px 16px;
	border-radius: 999px;
	border: 1px solid #dadce0;
	font-size: 0.9em;
	font-weight: 500;
	text-decoration: none;
	color: var(--wp--preset--color--contrast, #111);
	background: #fff;
	transition: background 0.15s ease;
}

.pent-btn-social:hover {
	background: #f5f5f5;
	color: inherit;
}

.pent-btn-social[hidden] { display: none !important; } /* sin configurar: el atributo hidden gana a inline-flex */
.pent-fb svg { color: #1877f2; }
.pent-x svg { color: #000; }

/* ── Separador ── */
.pent-sep {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 18px 0 12px;
	font-size: 0.78em;
	opacity: 0.6;
}

.pent-sep::before,
.pent-sep::after {
	content: '';
	flex: 1;
	height: 1px;
	background: rgba(0, 0, 0, 0.12);
}

/* ── Tabs ── */
.pent-tabs {
	display: flex;
	gap: 6px;
	margin-bottom: 14px;
}

.pent-tab {
	flex: 1;
	padding: 9px 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font-weight: 600;
	font-size: 0.9em;
	cursor: pointer;
}

.pent-tab.is-active {
	background: var(--pent-c);
	color: var(--wp--preset--color--base, #fff);
}

/* ── Formularios ── */
.pent-panel {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.pent-panel[hidden] {
	display: none;
}

.pent-panel input {
	padding: 11px 14px;
	border: 1.5px solid rgba(0, 0, 0, 0.18);
	border-radius: 10px;
	font-size: 0.92em;
	background: var(--wp--preset--color--base, #fff);
	color: inherit;
}

.pent-panel input:focus {
	outline: 2px solid var(--pent-c);
	outline-offset: 1px;
	border-color: transparent;
}

.pent-btn-primary {
	padding: 12px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--pent-c);
	color: var(--wp--preset--color--base, #fff);
	font-weight: 700;
	font-size: 0.95em;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.pent-btn-primary:hover {
	opacity: 0.88;
}

.pent-btn-primary:disabled {
	opacity: 0.5;
	cursor: wait;
}

.pent-forgot {
	text-align: center;
	font-size: 0.8em;
	color: inherit;
	opacity: 0.65;
	text-decoration: underline;
}

/* ── Cuentas conectadas (Mis datos) ── */
.pent-links-field {
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 14px;
	padding: 18px;
	margin: 18px 0;
}

.pent-links-field legend {
	padding: 0 8px;
	font-weight: 700;
}

.pent-links-hint {
	font-size: 0.85em;
	opacity: 0.65;
	margin: 0 0 12px;
}

.pent-link-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	flex-wrap: wrap;
}

.pent-link-row:last-of-type {
	border-bottom: 0;
}

.pent-link-net {
	font-weight: 700;
	min-width: 90px;
}

.pent-link-status {
	font-size: 0.9em;
	opacity: 0.8;
}

.pent-link-connect {
	padding: 7px 16px;
	border-radius: 999px;
	border: 1.5px solid var(--pent-c);
	color: var(--pent-c);
	font-size: 0.85em;
	font-weight: 600;
	text-decoration: none;
}

.pent-link-connect:hover {
	background: var(--pent-c);
	color: var(--wp--preset--color--base, #fff);
}

.pent-unlink {
	margin-left: auto;
	border: 0;
	background: transparent;
	color: inherit;
	opacity: 0.55;
	font-size: 0.8em;
	text-decoration: underline;
	cursor: pointer;
}

.pent-unlink:hover {
	opacity: 1;
}

/* Honeypot: fuera de pantalla (no display:none — algunos bots lo detectan). */
.pent-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

/* ── Mensajes ── */
#pent-msg {
	margin: 12px 0 0;
	font-size: 0.85em;
	text-align: center;
	padding: 9px 12px;
	border-radius: 10px;
}

#pent-msg.pent-error {
	background: #fdecec;
	color: #b3261e;
}

#pent-msg.pent-ok {
	background: #e6f6ec;
	color: #1e7d3c;
}
