/* Estilos de Control de Acceso (Pre-Login) para DoublePass 2FA */

body.doublepass-login-body {
	margin: 0;
	padding: 0;
	height: 100vh;
	min-height: 600px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: radial-gradient(circle at 10% 20%, rgba(15, 23, 42, 1) 0%, rgba(30, 41, 59, 1) 90%);
	color: #334155;
	overflow-x: hidden;
}

/* Decoraciones de fondo */
body.doublepass-login-body::before {
	content: '';
	position: absolute;
	width: 500px;
	height: 500px;
	background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
	top: -100px;
	right: -100px;
	z-index: 0;
	pointer-events: none;
}

body.doublepass-login-body::after {
	content: '';
	position: absolute;
	width: 600px;
	height: 600px;
	background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, rgba(0, 0, 0, 0) 70%);
	bottom: -200px;
	left: -200px;
	z-index: 0;
	pointer-events: none;
}

.doublepass-login-wrapper {
	position: relative;
	z-index: 10;
	width: 100%;
	max-width: 440px;
	padding: 20px;
	box-sizing: border-box;
}

/* La tarjeta de login */
.doublepass-login-card {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.6);
	border-radius: 24px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	padding: 40px 32px 32px 32px;
	display: flex;
	flex-direction: column;
	gap: 28px;
	transition: all 0.3s ease;
}

/* Cabecera de la Tarjeta */
.doublepass-card-header {
	text-align: center;
}

.doublepass-card-header .shield-badge {
	width: 56px;
	height: 56px;
	background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px auto;
	box-shadow: 0 8px 16px rgba(2, 132, 199, 0.25);
}

.doublepass-card-header .shield-badge .dashicons {
	color: #ffffff;
	font-size: 28px;
	width: 28px;
	height: 28px;
}

.doublepass-card-header h2 {
	margin: 0;
	font-size: 24px;
	font-weight: 800;
	color: #0f172a;
	letter-spacing: -0.5px;
}

.doublepass-card-header p {
	margin: 4px 0 0 0;
	font-size: 13px;
	color: #64748b;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* Pasos del progreso */
.doublepass-steps {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 0 10px;
}

.doublepass-steps .step-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: #cbd5e1;
	transition: all 0.3s ease;
}

.doublepass-steps .step-dot.active {
	background-color: #0284c7;
	box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.2);
}

.doublepass-steps .step-dot.completed {
	background-color: #10b981;
}

.doublepass-steps .step-line {
	height: 2px;
	width: 40px;
	background-color: #cbd5e1;
	border-radius: 1px;
	transition: all 0.3s ease;
}

.doublepass-steps .step-line.completed {
	background-color: #10b981;
}

/* Contenido de los pasos */
.wizard-step h3 {
	margin: 0 0 8px 0;
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
	text-align: center;
}

.wizard-step p.step-intro {
	margin: 0 0 24px 0;
	font-size: 14px;
	color: #64748b;
	text-align: center;
	line-height: 1.5;
}

/* Formularios y campos de texto */
.input-group {
	margin-bottom: 24px;
}

.input-group label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	color: #475569;
	margin-bottom: 8px;
}

.input-with-icon {
	position: relative;
	display: flex;
	align-items: center;
}

.input-with-icon .dashicons {
	position: absolute;
	left: 14px;
	color: #94a3b8;
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.input-with-icon input[type="email"] {
	width: 100%;
	padding: 12px 14px 12px 42px;
	border: 1.5px solid #e2e8f0;
	border-radius: 12px;
	background-color: #f8fafc;
	font-size: 15px;
	color: #0f172a;
	transition: all 0.2s ease-in-out;
}

.input-with-icon input[type="email"]:focus {
	border-color: #0284c7;
	background-color: #ffffff;
	box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.1);
	outline: none;
}

/* Botones */
.btn-primary {
	width: 100%;
	background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
	color: #ffffff;
	border: none;
	border-radius: 12px;
	padding: 14px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	transition: all 0.2s ease-in-out;
}

.btn-primary:hover:not(:disabled) {
	background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
	box-shadow: 0 6px 16px rgba(3, 105, 161, 0.3);
}

.btn-primary:disabled {
	background: #cbd5e1;
	color: #94a3b8;
	box-shadow: none;
	cursor: not-allowed;
}

.btn-secondary {
	background: #ffffff;
	color: #475569;
	border: 1.5px solid #cbd5e1;
	border-radius: 12px;
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
}

.btn-secondary:hover {
	background: #f8fafc;
	border-color: #94a3b8;
	color: #0f172a;
}

.action-buttons {
	display: flex;
	gap: 12px;
	margin-top: 24px;
}

.action-buttons .btn-primary {
	flex: 1;
}

/* Cajas de Alerta */
.alert-box {
	background-color: #fef2f2;
	color: #991b1b;
	border: 1px solid #fee2e2;
	border-radius: 12px;
	padding: 12px 16px;
	font-size: 13px;
	line-height: 1.5;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.alert-box::before {
	content: "\f225"; /* dashicons-warning */
	font-family: dashicons;
	font-size: 18px;
	color: #ef4444;
}

/* Tarjetas de Selección de Método */
.methods-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.method-card {
	display: flex;
	align-items: center;
	border: 1.5px solid #e2e8f0;
	border-radius: 16px;
	padding: 16px;
	cursor: pointer;
	background-color: #ffffff;
	transition: all 0.2s ease;
}

.method-card:hover {
	border-color: #cbd5e1;
	background-color: #f8fafc;
}

.method-card.active {
	border-color: #0284c7;
	background-color: rgba(2, 132, 199, 0.03);
}

.method-card .card-icon {
	background: #f1f5f9;
	border-radius: 12px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 16px;
	transition: all 0.2s ease;
}

.method-card.active .card-icon {
	background: rgba(2, 132, 199, 0.1);
	color: #0284c7;
}

.method-card .card-icon .dashicons {
	font-size: 22px;
	width: 22px;
	height: 22px;
}

.method-card .card-details {
	flex: 1;
}

.method-card .card-details h4 {
	margin: 0 0 2px 0;
	font-size: 15px;
	font-weight: 600;
	color: #0f172a;
}

.method-card .card-details p {
	margin: 0;
	font-size: 12px;
	color: #64748b;
}

.method-card .card-radio {
	width: 20px;
	height: 20px;
	border: 2px solid #cbd5e1;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.method-card.active .card-radio {
	border-color: #0284c7;
}

.method-card .card-radio .radio-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: #0284c7;
	transform: scale(0);
	transition: transform 0.2s ease;
}

.method-card.active .card-radio .radio-dot {
	transform: scale(1);
}

/* Casillas para Código de 6 Dígitos */
.code-inputs {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 10px;
	margin: 28px 0;
}

.code-inputs input.code-digit {
	width: 100%;
	height: 56px;
	border: 2px solid #cbd5e1; /* Borde más visible */
	border-radius: 12px;
	text-align: center;
	font-size: 24px;
	font-weight: 800;
	color: #0f172a;
	background-color: #ffffff; /* Fondo blanco para contraste */
	box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.04);
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.code-inputs input.code-digit:focus {
	border-color: #0284c7;
	background-color: #ffffff;
	box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15), inset 0 2px 4px rgba(15, 23, 42, 0.04);
	outline: none;
}

.code-inputs input.code-digit:hover:not(:disabled) {
	border-color: #94a3b8;
}

.code-inputs input.code-digit:disabled {
	background-color: #f1f5f9; /* Fondo gris visible */
	color: #94a3b8;
	cursor: not-allowed;
	border-color: #cbd5e1; /* Mantener borde visible */
	opacity: 0.7;
	box-shadow: none;
}

/* Sección de Reenvío */
.resend-block {
	text-align: center;
	font-size: 13px;
	color: #64748b;
	margin: 20px 0;
}

.resend-block button {
	background: none;
	border: none;
	color: #0284c7;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	padding: 0;
}

.resend-block button:hover {
	color: #0369a1;
}

/* Animación de carga (Loader) */
.spinner {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

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

/* Pie de Página */
.doublepass-card-footer {
	text-align: center;
	font-size: 11px;
	color: #94a3b8;
	border-top: 1px solid #f1f5f9;
	padding-top: 20px;
	margin-top: 10px;
}

.doublepass-card-footer p {
	margin: 0;
}

/* Estilos para el logo de la entidad personalizado */
.company-logo-container {
	margin: 0 auto 16px auto;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 64px;
}

.company-logo {
	max-height: 64px;
	max-width: 180px;
	object-fit: contain;
	border-radius: 8px;
	filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
	display: block;
}
