/* Auth Modal Styles - Sistema de Autenticación Quintaesencia */

/* Hover efectos para botones en navbar */
#auth-button:hover {
	box-shadow: 0 0 25px rgba(255, 215, 0, 0.8) !important;
	transform: translateY(-2px);
}

#auth-button:active {
	transform: translateY(0);
}

/* Animación de entrada para modales */
#auth-modal,
#profile-modal {
	animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
	from {
		opacity: 0;
		transform: scale(0.9);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Scroll suave para historial */
.profile-content {
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 215, 0, 0.5) rgba(50, 50, 100, 0.3);
}

.profile-content::-webkit-scrollbar {
	width: 6px;
}

.profile-content::-webkit-scrollbar-track {
	background: rgba(50, 50, 100, 0.3);
	border-radius: 10px;
}

.profile-content::-webkit-scrollbar-thumb {
	background: rgba(255, 215, 0, 0.5);
	border-radius: 10px;
}

.profile-content::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 215, 0, 0.8);
}

/* Efectos hover en inputs */
input[type="email"],
input[type="text"],
input[type="tel"],
textarea {
	transition: all 0.3s ease;
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
textarea:focus {
	border-color: #ffd700 !important;
	box-shadow: 0 0 10px rgba(255, 215, 0, 0.3) !important;
	background: rgba(20, 20, 50, 0.95) !important;
}

/* Botones en modales */
button:not([data-tab]):not([data-content]) {
	transition: all 0.3s ease;
}

button:not([data-tab]):not([data-content]):hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Redeem buttons con hover mejorado */
.redeem-btn {
	transition: all 0.3s ease;
}

.redeem-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 0 20px currentColor !important;
}

.redeem-btn:active {
	transform: translateY(0);
}

/* Responsive para móvil */
@media (max-width: 768px) {
	.auth-modal-content,
	.profile-modal-content {
		width: 95% !important;
		max-width: 100% !important;
		border-radius: 10px;
		max-height: 90vh;
		overflow-y: auto;
	}

	#auth-button {
		padding: 8px 12px !important;
		font-size: 0.85rem;
	}

	.profile-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
	}

	.profile-tab {
		white-space: nowrap;
		flex-shrink: 0;
	}
}

/* Animaciones de transición suave */
.auth-tab.active,
.profile-tab.active {
	animation: slideDown 0.3s ease;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* States especiales */
input::placeholder {
	color: #666;
	opacity: 0.8;
}

/* Validación visual (si es necesario) */
input:invalid {
	border-color: #ff6464;
}

input:valid {
	border-color: #64c864;
}

/* Tabla de actividad con efecto hover */
table tr:hover {
	background: rgba(255, 215, 0, 0.05);
}

table tr {
	transition: background 0.2s ease;
}

/* Efectos especiales en títulos */
.profile-modal-content h2,
.auth-modal-content h2 {
	animation: titleGlow 0.5s ease;
}

@keyframes titleGlow {
	from {
		text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
	}
	to {
		text-shadow: 0 0 15px rgba(255, 215, 0, 0.6), 0 0 25px rgba(255, 215, 0, 0.3);
	}
}

/* Smooth transitions para los contenidos */
.auth-content,
.profile-content {
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Link styling */
a {
	transition: all 0.3s ease;
}

.auth-content a:hover {
	text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Mejora de legibilidad en móvil */
@media (max-width: 480px) {
	#auth-button {
		font-size: 0.75rem;
		padding: 8px 10px;
	}

	.auth-modal-content,
	.profile-modal-content {
		padding: 20px !important;
	}

	.profile-tabs {
		gap: 8px;
	}

	.profile-tab {
		padding: 8px 10px !important;
		font-size: 0.9rem;
	}
}

/* Indicador visual de carga (si aplica) */
.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Focus visible para accesibilidad */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
	outline: 2px solid #ffd700;
	outline-offset: 2px;
}

/* Asegurar que solo UNA pestaña se muestra a la vez */
.auth-content {
	display: none !important;
	visibility: hidden !important;
	position: absolute !important;
	pointer-events: none !important;
	height: 0 !important;
	overflow: hidden !important;
	margin: 0 !important;
	padding: 0 !important;
}

.auth-content[style*="display: block"],
.auth-content.active {
	display: block !important;
	visibility: visible !important;
	position: static !important;
	pointer-events: auto !important;
	height: auto !important;
	overflow: visible !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Asegurar visibilidad correcta del contenido activo */
#content-login,
#content-register {
	width: 100%;
	margin: 0;
	padding: 0;
}

/* Botones X en móvil - hacerlos más grandes y fáciles de tocar */
@media (max-width: 768px) {
	.auth-close-btn,
	.profile-close-btn,
	.forgot-close-btn {
		width: 48px !important;
		height: 48px !important;
		top: 8px !important;
		right: 8px !important;
		font-size: 24px !important;
		z-index: 10005 !important;
		padding: 0 !important;
		border: 2px solid rgba(255, 100, 100, 1) !important;
		cursor: pointer !important;
		pointer-events: auto !important;
	}

	/* Asegurar que los modales en móvil son clicables */
	#auth-modal,
	#profile-modal,
	#forgot-password-modal,
	#reset-password-modal {
		display: flex !important;
		pointer-events: auto !important;
	}

	.auth-modal-content,
	.profile-modal-content {
		pointer-events: auto !important;
	}
}
