/**
 * Estilos para el Panel de Cuenta Personalizado de DTF
 * 
 * @package WC_DTF_Simple
 * @since 2.1.0
 */

/* ========================================
   VARIABLES CSS Y CONFIGURACIÓN GLOBAL
   ======================================== */
:root {
	--dtf-primary-color: #2563eb;
	--dtf-primary-hover: #1d4ed8;
	--dtf-secondary-color: #64748b;
	--dtf-success-color: #059669;
	--dtf-warning-color: #d97706;
	--dtf-error-color: #dc2626;
	--dtf-background: #f8fafc;
	--dtf-card-background: #ffffff;
	--dtf-border-color: #e2e8f0;
	--dtf-text-primary: #1e293b;
	--dtf-text-secondary: #64748b;
	--dtf-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
	--dtf-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	--dtf-border-radius: 8px;
	--dtf-transition: all 0.3s ease;
}

/* ========================================
   ESTILOS GENERALES DEL PANEL DE CUENTA
   ======================================== */
.dtf-account-page {
	background-color: var(--dtf-background);
	min-height: 100vh;
}

/* Ocultar párrafos vacíos que causan espaciados excesivos */
.dtf-account-page p:empty,
.dtf-account-page .woocommerce p:empty,
.dtf-account-page .woocommerce-MyAccount-content p:empty {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	height: 0 !important;
	line-height: 0 !important;
}

/* Ocultar párrafos que solo contienen espacios en blanco */
.dtf-account-page p:not(:empty):has-text(""),
.dtf-account-page .woocommerce p:not(:empty):has-text(""),
.dtf-account-page .woocommerce-MyAccount-content p:not(:empty):has-text("") {
	display: none !important;
}

/* Regla adicional para párrafos con solo espacios (compatible con más navegadores) */
.dtf-account-page p:empty:before,
.dtf-account-page .woocommerce p:empty:before,
.dtf-account-page .woocommerce-MyAccount-content p:empty:before {
	content: none !important;
}

.dtf-account-page .woocommerce {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem;
}

/* ========================================
   NAVEGACIÓN SIMPLIFICADA
   ======================================== */
.dtf-account-page .woocommerce-MyAccount-navigation {
	background: var(--dtf-card-background);
	border-radius: var(--dtf-border-radius);
	box-shadow: var(--dtf-shadow);
	margin-bottom: 1rem;
	overflow: hidden;
}

.dtf-account-page .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	border-bottom: 1px solid var(--dtf-border-color);
}

.dtf-account-page .woocommerce-MyAccount-navigation li {
	flex: none;
	min-width: auto;
	border-bottom: 1px solid var(--dtf-border-color);
}

.dtf-account-page .woocommerce-MyAccount-navigation li:last-child {
	border-bottom: none;
}

.dtf-account-page .woocommerce-MyAccount-navigation a {
	display: block;
	padding: 1rem 1.5rem;
	text-decoration: none;
	color: var(--dtf-text-secondary);
	transition: var(--dtf-transition);
	border-bottom: 3px solid transparent;
	font-weight: 500;
	text-align: left;
}

.dtf-account-page .woocommerce-MyAccount-navigation a:hover {
	color: var(--dtf-primary-color);
	background-color: rgba(37, 99, 235, 0.05);
}

.dtf-account-page .woocommerce-MyAccount-navigation .is-active a {
	color: var(--dtf-primary-color);
	border-bottom-color: var(--dtf-primary-color);
	background-color: rgba(37, 99, 235, 0.05);
}

.dtf-account-page .woocommerce-MyAccount-content {
	background: var(--dtf-card-background);
	border-radius: var(--dtf-border-radius);
	box-shadow: var(--dtf-shadow);
	padding: 1.5rem;
}

/* ========================================
   DASHBOARD PERSONALIZADO
   ======================================== */
.dtf-account-dashboard {
	animation: fadeInUp 0.6s ease-out;
}

.dtf-welcome-section {
	text-align: center;
	margin-bottom: 3rem;
	padding: 2rem;
	background: linear-gradient(135deg, var(--dtf-primary-color), var(--dtf-primary-hover));
	color: white;
	border-radius: var(--dtf-border-radius);
	box-shadow: var(--dtf-shadow-lg);
}

.dtf-welcome-section h2 {
	font-size: 2.5rem;
	margin: 0 0 1rem 0;
	font-weight: 700;
}

.dtf-welcome-section p {
	font-size: 1.1rem;
	margin: 0;
	opacity: 0.9;
}

/* ========================================
   GRID DE ESTADÍSTICAS
   ======================================== */
.dtf-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1.5rem;
	margin-bottom: 3rem;
}

.dtf-stat-card {
	background: var(--dtf-card-background);
	border-radius: var(--dtf-border-radius);
	padding: 2rem;
	box-shadow: var(--dtf-shadow);
	transition: var(--dtf-transition);
	border: 1px solid var(--dtf-border-color);
	display: flex;
	align-items: center;
	gap: 1.5rem;
	opacity: 0;
	transform: translateY(20px);
}

.dtf-stat-card.dtf-stat-animated {
	opacity: 1;
	transform: translateY(0);
}

.dtf-stat-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--dtf-shadow-lg);
	border-color: var(--dtf-primary-color);
}

.dtf-stat-icon {
	width: 60px;
	height: 60px;
	background: linear-gradient(135deg, var(--dtf-primary-color), var(--dtf-primary-hover));
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 2rem;
	color: white;
}

.dtf-stat-content h3 {
	font-size: 2.5rem;
	margin: 0 0 0.5rem 0;
	color: var(--dtf-text-primary);
	font-weight: 700;
}

.dtf-stat-content p {
	margin: 0;
	color: var(--dtf-text-secondary);
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-weight: 500;
}

/* ========================================
   SECCIÓN DE ÚLTIMO PEDIDO
   ======================================== */
.dtf-last-order {
	background: var(--dtf-card-background);
	border-radius: var(--dtf-border-radius);
	padding: 2rem;
	box-shadow: var(--dtf-shadow);
	border: 1px solid var(--dtf-border-color);
}

.dtf-last-order h3 {
	margin: 0 0 1.5rem 0;
	color: var(--dtf-text-primary);
	font-size: 1.5rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.dtf-last-order h3::before {
	content: '';
	width: 4px;
	height: 24px;
	background: var(--dtf-primary-color);
	border-radius: 2px;
}

.dtf-order-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
}

.dtf-order-summary p {
	margin: 0;
	padding: 0.75rem;
	background: rgba(37, 99, 235, 0.05);
	border-radius: 6px;
	border-left: 3px solid var(--dtf-primary-color);
}

.dtf-order-summary strong {
	color: var(--dtf-text-primary);
	font-weight: 600;
}

/* ========================================
   SECCIONES PERSONALIZADAS
   ======================================== */
.dtf-orders-section,
.dtf-edit-address-section,
.dtf-edit-account-section {
	animation: fadeInUp 0.6s ease-out;
}

.dtf-orders-section h2,
.dtf-edit-address-section h2,
.dtf-edit-account-section h2 {
	color: var(--dtf-text-primary);
	font-size: 2rem;
	margin: 0 0 1rem 0;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.dtf-orders-section h2::before,
.dtf-edit-address-section h2::before,
.dtf-edit-account-section h2::before {
	content: '';
	width: 4px;
	height: 32px;
	background: var(--dtf-primary-color);
	border-radius: 2px;
}

.dtf-orders-section p,
.dtf-edit-address-section p,
.dtf-edit-account-section p {
	color: var(--dtf-text-secondary);
	font-size: 1.1rem;
	margin: 0 0 2rem 0;
	line-height: 1.6;
}

/* ========================================
   BOTONES PERSONALIZADOS
   ======================================== */
.dtf-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	background: var(--dtf-primary-color);
	color: white;
	text-decoration: none;
	border-radius: var(--dtf-border-radius);
	font-weight: 500;
	transition: var(--dtf-transition);
	border: none;
	cursor: pointer;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.dtf-button:hover {
	background: var(--dtf-primary-hover);
	color: white;
	transform: translateY(-1px);
	box-shadow: var(--dtf-shadow-lg);
}

.dtf-button-small {
	padding: 0.5rem 1rem;
	font-size: 0.8rem;
}

/* ========================================
   FORMULARIOS PERSONALIZADOS
   ======================================== */
.dtf-form-field {
	margin-bottom: 1.5rem;
}

.dtf-form-field label {
	display: block;
	margin-bottom: 0.5rem;
	color: var(--dtf-text-primary);
	font-weight: 500;
}

.dtf-form-field input[type="text"],
.dtf-form-field input[type="email"],
.dtf-form-field input[type="password"],
.dtf-form-field input[type="tel"],
.dtf-form-field textarea,
.dtf-form-field select {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 2px solid var(--dtf-border-color);
	border-radius: var(--dtf-border-radius);
	font-size: 1rem;
	transition: var(--dtf-transition);
	background: var(--dtf-card-background);
	color: var(--dtf-text-primary);
}

.dtf-form-field input[type="text"]:focus,
.dtf-form-field input[type="email"]:focus,
.dtf-form-field input[type="password"]:focus,
.dtf-form-field input[type="tel"]:focus,
.dtf-form-field textarea:focus,
.dtf-form-field select:focus {
	outline: none;
	border-color: var(--dtf-primary-color);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ========================================
   ESTADOS DE LOADING
   ======================================== */
.dtf-loading {
	opacity: 0.6;
	pointer-events: none;
	position: relative;
}

.dtf-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	border: 2px solid var(--dtf-border-color);
	border-top-color: var(--dtf-primary-color);
	border-radius: 50%;
	animation: spin 1s linear infinite;
	transform: translate(-50%, -50%);
}

@keyframes spin {
	to {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}

/* ========================================
   ANIMACIONES
   ======================================== */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
	.dtf-account-page .woocommerce {
		padding: 0.5rem;
	}
	
	.dtf-account-page .woocommerce-MyAccount-navigation {
		margin-bottom: 1rem;
	}
	
	.dtf-account-page .woocommerce-MyAccount-content {
		padding: 1rem;
	}
	
	.dtf-welcome-section {
		padding: 1.5rem;
	}
	
	.dtf-welcome-section h2 {
		font-size: 2rem;
	}
	
	.dtf-stats-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
	
	.dtf-stat-card {
		padding: 1.5rem;
	}
	
	.dtf-order-summary {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.dtf-account-page .woocommerce {
		padding: 0.25rem;
	}
	
	.dtf-account-page .woocommerce-MyAccount-content {
		padding: 0.75rem;
	}
	
	.dtf-welcome-section {
		padding: 1rem;
	}
	
	.dtf-welcome-section h2 {
		font-size: 1.75rem;
	}
	
	.dtf-stat-card {
		padding: 1rem;
		flex-direction: column;
		text-align: center;
	}
	
	.dtf-stat-icon {
		margin-bottom: 1rem;
	}
}

/* ========================================
   ESTADOS ESPECIALES
   ======================================== */
.dtf-account-page .woocommerce-message,
.dtf-account-page .woocommerce-info,
.dtf-account-page .woocommerce-error {
	padding: 1rem 1.5rem;
	border-radius: var(--dtf-border-radius);
	margin-bottom: 1.5rem;
	border-left: 4px solid;
}

.dtf-account-page .woocommerce-message {
	background: rgba(5, 150, 105, 0.1);
	border-color: var(--dtf-success-color);
	color: var(--dtf-success-color);
}

.dtf-account-page .woocommerce-info {
	background: rgba(37, 99, 235, 0.1);
	border-color: var(--dtf-primary-color);
	color: var(--dtf-primary-color);
}

.dtf-account-page .woocommerce-error {
	background: rgba(220, 38, 38, 0.1);
	border-color: var(--dtf-error-color);
	color: var(--dtf-error-color);
}

/* ========================================
   SISTEMA DE LOGIN/REGISTRO PROGRESIVO
   ======================================== */

/* Contenedor principal */
.dtf-progressive-auth-container {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 0;
	background: transparent;
}

/* Tarjeta de autenticación */
.dtf-auth-card {
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	max-width: 480px;
	width: 100%;
	overflow: hidden;
	animation: slideUp 0.3s ease-out;
	border: 1px solid #e2e8f0;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Header */
.dtf-auth-header {
	padding: 1rem 1.5rem 0.5rem;
	text-align: center;
	background: transparent;
	border-bottom: 1px solid #e2e8f0;
}

.dtf-auth-title {
	margin: 0 0 0.25rem;
	font-size: 1.375rem;
	font-weight: 700;
	letter-spacing: -0.025em;
	color: var(--dtf-text-primary);
}

.dtf-auth-subtitle {
	margin: 0;
	font-size: 0.875rem;
	color: var(--dtf-text-secondary);
	line-height: 1.3;
}

/* Badge de estado (Login / Registro) */
.dtf-auth-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	margin-bottom: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.dtf-auth-badge.login {
	background: rgba(37, 99, 235, 0.1);
	color: var(--dtf-primary-color);
}

.dtf-auth-badge.register {
	background: rgba(5, 150, 105, 0.1);
	color: var(--dtf-success-color);
}

/* Formulario */
.dtf-progressive-form {
	padding: 1rem 1.5rem 1.5rem;
}

/* Pasos del formulario */
.dtf-form-step {
	animation: fadeIn 0.4s ease;
}

.dtf-form-step:not(.active) {
	display: none;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateX(20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Grupos de formulario */
.dtf-form-group {
	margin-bottom: 1rem;
}

.dtf-form-label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: var(--dtf-text-primary);
	font-size: 0.875rem;
}

.dtf-form-input {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	font-size: 1rem;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.dtf-form-input:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dtf-form-input.has-error {
	border-color: var(--dtf-error-color);
}

.dtf-form-input.has-success {
	border-color: var(--dtf-success-color);
}

/* Wrapper de contraseña */
.dtf-password-wrapper {
	position: relative;
}

.dtf-toggle-password {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	padding: 8px;
	cursor: pointer;
	color: var(--dtf-secondary-color);
	transition: color 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dtf-toggle-password:hover {
	color: var(--dtf-primary-color);
}

.dtf-eye-icon {
	width: 20px;
	height: 20px;
}

/* Estado de campos */
.dtf-field-status {
	margin-top: 0.5rem;
	font-size: 0.875rem;
	min-height: 20px;
}

.dtf-field-status.error {
	color: var(--dtf-error-color);
	animation: shake 0.3s ease;
}

.dtf-field-status.success {
	color: var(--dtf-success-color);
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-5px); }
	75% { transform: translateX(5px); }
}

/* Display de email */
.dtf-email-display {
	background: #f8fafc;
	padding: 1rem;
	border-radius: 8px;
	margin-bottom: 1.5rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border: 2px solid #e2e8f0;
}

.dtf-email-value {
	font-weight: 600;
	color: var(--dtf-text-primary);
	word-break: break-all;
}

.dtf-btn-change-email,
.dtf-btn-change-email-reg {
	background: none;
	border: none;
	color: #667eea;
	font-weight: 600;
	cursor: pointer;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	transition: background 0.2s ease;
	font-size: 0.875rem;
}

.dtf-btn-change-email:hover,
.dtf-btn-change-email-reg:hover {
	background: rgba(102, 126, 234, 0.1);
}

/* Mensaje de bienvenida */
.dtf-welcome-message {
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
	padding: 1rem;
	border-radius: 8px;
	margin-bottom: 1.5rem;
	border-left: 4px solid #667eea;
}

.dtf-welcome-message p {
	margin: 0;
	color: var(--dtf-text-primary);
	font-weight: 500;
}

/* Fortaleza de contraseña */
.dtf-password-strength {
	margin-top: 0.5rem;
	height: 4px;
	background: #e2e8f0;
	border-radius: 2px;
	overflow: hidden;
	position: relative;
}

.dtf-password-strength::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 0%;
	background: var(--dtf-success-color);
	transition: all 0.3s ease;
}

.dtf-password-strength.weak::after {
	width: 33%;
	background: var(--dtf-error-color);
}

.dtf-password-strength.medium::after {
	width: 66%;
	background: var(--dtf-warning-color);
}

.dtf-password-strength.strong::after {
	width: 100%;
	background: var(--dtf-success-color);
}

/* Requisitos de contraseña */
.dtf-password-requirements {
	background: #f8fafc;
	padding: 1rem;
	border-radius: 8px;
	margin-bottom: 1.5rem;
	border: 1px solid #e2e8f0;
}

.dtf-password-requirements p {
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--dtf-text-primary);
}

.dtf-password-requirements ul {
	margin: 0;
	padding-left: 1.25rem;
	list-style: none;
}

.dtf-password-requirements li {
	font-size: 0.875rem;
	color: var(--dtf-text-secondary);
	margin-bottom: 0.25rem;
	position: relative;
}

.dtf-password-requirements li::before {
	content: '○';
	position: absolute;
	left: -1.25rem;
	color: var(--dtf-border-color);
}

.dtf-password-requirements li.valid {
	color: var(--dtf-success-color);
}

.dtf-password-requirements li.valid::before {
	content: '✓';
	color: var(--dtf-success-color);
}

/* Opciones de formulario */
.dtf-form-options {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.dtf-checkbox-label {
	display: flex;
	align-items: center;
	cursor: pointer;
	font-size: 0.875rem;
	color: var(--dtf-text-secondary);
}

.dtf-checkbox-label input[type="checkbox"] {
	margin-right: 0.5rem;
	cursor: pointer;
}

.dtf-forgot-password {
	font-size: 0.875rem;
	color: #667eea;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

.dtf-forgot-password:hover {
	color: #764ba2;
	text-decoration: underline;
}

/* Botones */
.dtf-btn {
	width: 100%;
	padding: 0.875rem 1.5rem;
	border: none;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dtf-btn-primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	box-shadow: 0 4px 6px -1px rgba(102, 126, 234, 0.3);
}

.dtf-btn-primary:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgba(102, 126, 234, 0.4);
}

.dtf-btn-primary:active:not(:disabled) {
	transform: translateY(0);
}

.dtf-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.dtf-btn-text {
	transition: opacity 0.2s ease;
}

.dtf-btn.loading .dtf-btn-text {
	opacity: 0;
}

/* Loader del botón */
.dtf-btn-loader {
	position: absolute;
	width: 20px;
	height: 20px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: white;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.dtf-btn.loading .dtf-btn-loader {
	opacity: 1;
}

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

/* Mensajes de auth */
.dtf-auth-message {
	padding: 1rem;
	border-radius: 8px;
	margin-top: 1rem;
	font-size: 0.875rem;
	font-weight: 500;
	text-align: center;
	animation: slideDown 0.3s ease;
}

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

.dtf-auth-message.success {
	background: rgba(5, 150, 105, 0.1);
	color: var(--dtf-success-color);
	border: 1px solid var(--dtf-success-color);
}

.dtf-auth-message.error {
	background: rgba(220, 38, 38, 0.1);
	color: var(--dtf-error-color);
	border: 1px solid var(--dtf-error-color);
}

/* Footer de seguridad */
.dtf-auth-footer {
	padding: 0.75rem 1.5rem;
	background: #f8fafc;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border-top: 1px solid #e2e8f0;
}

.dtf-lock-icon {
	width: 16px;
	height: 16px;
	color: var(--dtf-secondary-color);
}

.dtf-auth-footer span {
	font-size: 0.75rem;
	color: var(--dtf-text-secondary);
}

/* ========================================
   PASO DE AUTENTICACIÓN EN CHECKOUT (/check)
   ======================================== */

/* Bloque de redirección (usuario ya logueado) */
.dtf-checkout-redirect {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 50vh;
	padding: 2rem 1rem;
}

.dtf-redirect-card {
	background: white;
	border-radius: 16px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	padding: 3rem 2rem;
	text-align: center;
	max-width: 400px;
	width: 100%;
	animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.dtf-redirect-icon {
	width: 80px;
	height: 80px;
	margin: 0 auto 1.5rem;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dtf-redirect-icon svg {
	width: 40px;
	height: 40px;
	color: white;
}

.dtf-redirect-card h2 {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--dtf-text-primary);
}

.dtf-redirect-card > p {
	margin: 0 0 2rem;
	font-size: 1rem;
	color: var(--dtf-text-secondary);
}

.dtf-redirect-loader {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.dtf-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid #e2e8f0;
	border-top-color: #667eea;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

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

.dtf-redirect-loader p {
	margin: 0;
	font-size: 0.875rem;
	color: var(--dtf-text-secondary);
}

/* Bloque de carrito vacío */
.dtf-checkout-empty-cart {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 50vh;
	padding: 2rem 1rem;
}

.dtf-empty-cart-card {
	background: white;
	border-radius: 16px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	padding: 3rem 2rem;
	text-align: center;
	max-width: 400px;
	width: 100%;
	animation: fadeInUp 0.5s ease;
}

.dtf-empty-cart-icon {
	width: 80px;
	height: 80px;
	margin: 0 auto 1.5rem;
	background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dtf-empty-cart-icon svg {
	width: 40px;
	height: 40px;
	color: white;
}

.dtf-empty-cart-card h2 {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--dtf-text-primary);
}

.dtf-empty-cart-card p {
	margin: 0 0 2rem;
	font-size: 1rem;
	color: var(--dtf-text-secondary);
}

.dtf-empty-cart-card .dtf-btn {
	margin: 0 auto;
}

/* Página completa /check */
.dtf-checkout-auth-page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem;
}

.dtf-checkout-auth-header {
	text-align: center;
	padding: 1rem 0;
	margin-bottom: 1rem;
}

.dtf-checkout-auth-header h1 {
	margin: 0 0 0.5rem;
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--dtf-text-primary);
}

.dtf-checkout-auth-header p {
	margin: 0;
	font-size: 1rem;
	color: var(--dtf-text-secondary);
}

/* Contenedor principal del paso de autenticación */
.dtf-checkout-auth-step {
	margin-bottom: 1rem;
	padding: 1rem;
	background: transparent;
	border-radius: 8px;
}

.dtf-checkout-auth-wrapper {
	max-width: 480px;
	margin: 0 auto;
}

.dtf-checkout-auth-main {
	/* Login/Registro en una sola columna */
}

.dtf-checkout-auth-main .dtf-progressive-auth-container {
	padding: 0;
}

.dtf-checkout-auth-main .dtf-auth-card {
	max-width: 100%;
}

/* Sección de invitado inline */
.dtf-guest-checkout-inline {
	margin-top: 2rem;
	text-align: center;
}

.dtf-divider {
	position: relative;
	text-align: center;
	margin: 2rem 0 1.5rem;
}

.dtf-divider::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 1px;
	background: #e2e8f0;
}

.dtf-divider-text {
	display: inline-block;
	background: #fff;
	padding: 0 1rem;
	color: var(--dtf-text-secondary);
	font-size: 0.875rem;
	font-weight: 500;
	position: relative;
	z-index: 1;
}

.dtf-new-customer-text {
	margin: 0 0 1rem;
	font-size: 0.9rem;
	color: var(--dtf-text-primary);
	font-weight: 500;
}

.dtf-btn-secondary {
	background: white;
	color: var(--dtf-primary-color);
	border: 2px solid var(--dtf-primary-color);
	box-shadow: none;
}

.dtf-btn-secondary:hover:not(:disabled) {
	background: var(--dtf-primary-color);
	color: white;
}

/* Nota de seguridad del checkout */
.dtf-checkout-auth-note {
	text-align: center;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	color: var(--dtf-text-secondary);
	font-size: 0.875rem;
}

.dtf-shield-icon {
	width: 18px;
	height: 18px;
	color: var(--dtf-success-color);
}

/* Responsive */
@media (max-width: 768px) {
	.dtf-checkout-auth-page {
		padding: 0.5rem;
	}
	
	.dtf-checkout-auth-step {
		padding: 0.5rem;
		margin-bottom: 0.5rem;
	}
	
	.dtf-checkout-auth-header {
		padding: 0.5rem 0;
		margin-bottom: 0.5rem;
	}
	
	.dtf-checkout-auth-header h1 {
		font-size: 1.5rem;
	}
}

@media (max-width: 480px) {
	.dtf-progressive-auth-container {
		padding: 0;
	}
	
	.dtf-auth-card {
		border-radius: 8px;
	}
	
	.dtf-auth-header {
		padding: 1rem 1rem 0.5rem;
	}
	
	.dtf-auth-title {
		font-size: 1.125rem;
	}
	
	.dtf-progressive-form {
		padding: 1rem;
	}
	
	.dtf-form-options {
		flex-direction: column;
		align-items: flex-start;
	}
}
