/**
 * Talleres — Estilos front-end
 * Sección: Formularios de registro y login.
 * Prefijo .talleres-* para aislamiento visual.
 */

/* ===== Contenedor general ===== */
.talleres-form-registro,
.talleres-form-login {
	max-width: 560px;
	margin: 0 auto;
	padding: 1.5rem;
	box-sizing: border-box;
}

/* ===== Campos ===== */
.talleres-field {
	margin-bottom: 1.25rem;
}

.talleres-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.talleres-field input[type="text"],
.talleres-field input[type="email"],
.talleres-field input[type="tel"],
.talleres-field input[type="password"],
.talleres-field select,
.talleres-field textarea {
	width: 100%;
	padding: 0.625rem 0.75rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1rem;
	box-sizing: border-box;
	transition: border-color 0.2s;
}

.talleres-field input:focus,
.talleres-field select:focus,
.talleres-field textarea:focus {
	border-color: #007cba;
	outline: none;
	box-shadow: 0 0 0 1px #007cba;
}

/* ===== Campo checkbox ===== */
.talleres-field-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
}

.talleres-checkbox-label input[type="checkbox"] {
	margin-top: 0.25rem;
	flex-shrink: 0;
}

.talleres-checkbox-label span {
	font-size: 0.9rem;
	line-height: 1.4;
}

/* ===== Indicadores ===== */
.talleres-required {
	color: #d63638;
	margin-left: 2px;
}

/* ===== Errores ===== */
.talleres-error,
.talleres-error-general {
	background: #fef0f0;
	border: 1px solid #d63638;
	color: #d63638;
	padding: 0.75rem 1rem;
	border-radius: 4px;
	margin-bottom: 1rem;
}

.talleres-error-msg {
	display: block;
	color: #d63638;
	font-size: 0.85rem;
	margin-top: 0.25rem;
}

/* input con error */
.talleres-field.has-error input,
.talleres-field.has-error select,
.talleres-field.has-error textarea {
	border-color: #d63638;
}

/* ===== Éxito ===== */
.talleres-success {
	background: #edfaef;
	border: 1px solid #00a32a;
	color: #007017;
	padding: 0.75rem 1rem;
	border-radius: 4px;
	margin-bottom: 1rem;
}

/* ===== Botón ===== */
.talleres-btn {
	display: inline-block;
	padding: 0.625rem 1.5rem;
	font-size: 1rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	text-transform: uppercase;
	transition: background 0.2s, opacity 0.2s;
}

.talleres-btn-primary {
	background: #FFFFFF;
    color: #000000;
    border: solid 1px #bebdbd;
	font-family: "Work Sans", Arial, Helvetica, sans-serif;
}

.talleres-btn-primary:hover {
	border: solid 1px #000;
}

.talleres-btn-loading {
	opacity: 0.6;
	cursor: wait;
}

/* ===== Medidor de contraseña ===== */
.talleres-password-hint {
	font-size: 0.8rem;
	color: #666;
	margin-top: 0.25rem;
}

.talleres-password-strength {
	font-size: 0.85rem;
	font-weight: 600;
	margin-top: 0.25rem;
}

.talleres-strength-weak { color: #d63638; }
.talleres-strength-medium { color: #dba617; }
.talleres-strength-strong { color: #00a32a; }

/* ===== Coincidencia de contraseña ===== */
.talleres-password-match {
	font-size: 0.85rem;
	font-weight: 600;
	margin-top: 0.25rem;
}

.talleres-match-ok { color: #00a32a; }
.talleres-match-fail { color: #d63638; }

/* ===== Honeypot ===== */
.talleres-honeypot {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
	.talleres-form-registro,
	.talleres-form-login {
		padding: 1rem;
	}
}

/* ========================================================================
   FASE 7 — Zona de Usuario
   ======================================================================== */

/* ===== Contenedor principal ===== */
.talleres-zona-usuario {
	max-width: 900px;
	margin: 0 auto;
	padding: 1.5rem;
	box-sizing: border-box;
}

/* ===== Navegación por tabs ===== */
.talleres-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	border-bottom: 2px solid #e0e0e0;
	margin-bottom: 1.5rem;
	padding: 0;
	list-style: none;
	overflow-x: auto;
}

.talleres-tab-link {
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	padding: 0.75rem 1.2rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: #555;
	cursor: pointer;
	transition: color 0.2s, border-color 0.2s;
	white-space: nowrap;
}

.talleres-tab-link:hover {
	color: #007cba;
}

.talleres-tab-link.active {
	color: #007cba;
	border-bottom-color: #007cba;
}

/* ===== Contenido de tabs ===== */
.talleres-tab-content {
	display: none;
	animation: talleres-fade-in 0.3s ease;
}

.talleres-tab-content.active {
	display: block;
}

@keyframes talleres-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.talleres-tab-content h2 {
	margin-top: 0;
	margin-bottom: 1rem;
	font-size: 1.5rem;
}

.talleres-tab-content h3 {
	font-size: 1.15rem;
	margin-top: 1.5rem;
}

/* ===== Tablas ===== */
.talleres-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5rem;
}

.talleres-table th,
.talleres-table td {
	padding: 0.65rem 0.75rem;
	text-align: left;
	border-bottom: 1px solid #e5e5e5;
}

.talleres-table th {
	font-weight: 700;
	background: #f8f9fa;
	font-size: 0.9rem;
}

.talleres-table-licencia th {
	width: 200px;
	vertical-align: top;
}

/* ===== Badges ===== */
.talleres-badge {
	display: inline-block;
	padding: 0.25rem 0.65rem;
	border-radius: 12px;
	font-size: 0.85rem;
	font-weight: 600;
	white-space: nowrap;
}

.talleres-badge-activa {
	background: #22c55e;
	color: #fff;
}

.talleres-badge-caducada {
	background: #ef4444;
	color: #fff;
}

.talleres-badge-suspendida {
	background: #f59e0b;
	color: #fff;
}

.talleres-badge-cancelada {
	background: #6b7280;
	color: #fff;
}

/* Badges de envío */
.talleres-badge-envio-pendiente {
	background: #fef3c7;
	color: #92400e;
}

.talleres-badge-envio-enviado {
	background: #dbeafe;
	color: #1e40af;
}

.talleres-badge-envio-entregado {
	background: #d1fae5;
	color: #065f46;
}

/* ===== Formulario de perfil ===== */
.talleres-form-perfil .talleres-field-note {
	font-size: 0.85rem;
	color: #888;
	display: block;
	margin-top: 0.25rem;
}

.talleres-perfil-msg {
	margin-top: 1rem;
	padding: 0.5rem 0.75rem;
	border-radius: 4px;
	display: none;
}

.talleres-perfil-msg.success {
	background: #edfaef;
	border: 1px solid #00a32a;
	color: #007017;
	display: block;
}

.talleres-perfil-msg.error {
	background: #fef0f0;
	border: 1px solid #d63638;
	color: #d63638;
	display: block;
}

/* ===== Bloque cancelar suscripción ===== */
.talleres-cancel-sub-block {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e5e5e5;
}

.talleres-btn-cancel-sub {
	background: #6b7280;
	color: #fff;
}

.talleres-btn-cancel-sub:hover {
	background: #4b5563;
}

.talleres-cancel-sub-msg {
	margin-top: 0.75rem;
}

/* ===== Planes (mejorar plan) ===== */
.talleres-planes-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.5rem;
	margin-top: 1rem;
}

.talleres-plan-card {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 1.5rem;
	text-align: center;
	background: #fff;
	transition: box-shadow 0.2s, transform 0.2s;
}

.talleres-plan-card:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
	transform: translateY(-2px);
}

.talleres-plan-card h3 {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
}

.talleres-plan-precio {
	font-size: 1.8rem;
	font-weight: 700;
	color: #007cba;
	margin-bottom: 1rem;
}

.talleres-plan-periodo {
	font-size: 0.95rem;
	font-weight: 400;
	color: #777;
}

.talleres-plan-features {
	list-style: none;
	padding: 0;
	margin: 0 0 1.25rem;
	text-align: left;
}

.talleres-plan-features li {
	padding: 0.35rem 0;
	border-bottom: 1px solid #f0f0f0;
	font-size: 0.92rem;
}

/* ===== Productos ===== */
.talleres-productos-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1rem;
}

.talleres-producto-item {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 1rem;
	background: #fff;
}

.talleres-producto-item h4 {
	margin: 0 0 0.5rem;
}

.talleres-producto-desc {
	font-size: 0.9rem;
	color: #666;
	margin: 0 0 0.5rem;
}

.talleres-producto-tipo,
.talleres-producto-envio {
	font-size: 0.9rem;
	margin: 0.25rem 0;
}

/* ===== Links ===== */
.talleres-link-pdf,
.talleres-link-producto {
	color: #007cba;
	text-decoration: none;
	font-weight: 600;
}

.talleres-link-pdf:hover,
.talleres-link-producto:hover {
	text-decoration: underline;
}

/* ===== Botones ===== */
.talleres-btn-secondary {
	background: #6b7280;
	color: #fff;
}

.talleres-btn-secondary:hover {
	background: #4b5563;
}

.talleres-btn-baja {
	background: #dc2626;
	color: #fff;
}

.talleres-btn-baja:hover {
	background: #b91c1c;
}

.talleres-btn-danger {
	background: #dc2626;
	color: #fff;
}

.talleres-btn-danger:hover {
	background: #b91c1c;
}

.talleres-btn-danger:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ===== Export y Baja blocks ===== */
.talleres-export-block {
	margin-bottom: 2rem;
}

.talleres-baja-block {
	border: 2px solid #dc2626;
	border-radius: 8px;
	padding: 1.5rem;
	background: #fef2f2;
}

.talleres-baja-block h3 {
	color: #dc2626;
	margin-top: 0;
}

/* ===== Modal ===== */
.talleres-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.talleres-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
}

.talleres-modal-content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	padding: 2rem;
	max-width: 500px;
	width: 90%;
	max-height: 85vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0,0,0,0.3);
	z-index: 1;
}

.talleres-modal-content h3 {
	margin-top: 0;
	color: #dc2626;
}

.talleres-modal-warning {
	background: #fef2f2;
	border-left: 4px solid #dc2626;
	padding: 1rem;
	border-radius: 4px;
	margin: 1rem 0;
}

.talleres-modal-warning ol {
	margin: 0.5rem 0 0 1.5rem;
	padding: 0;
}

.talleres-modal-warning li {
	padding: 0.2rem 0;
	font-size: 0.9rem;
}

.talleres-modal-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 1rem 0;
	font-size: 0.92rem;
}

.talleres-modal-label {
	display: block;
	margin: 1rem 0;
	font-weight: 600;
}

.talleres-modal-label input[type="password"] {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	margin-top: 0.35rem;
	box-sizing: border-box;
}

.talleres-modal-buttons {
	display: flex;
	gap: 0.75rem;
	margin-top: 1.5rem;
	justify-content: flex-end;
}

.talleres-baja-msg {
	margin-top: 0.75rem;
	font-size: 0.9rem;
}

.talleres-baja-msg.error {
	color: #dc2626;
}

/* ===== Responsive mobile — tabs acordeón ===== */
@media (max-width: 768px) {
	.talleres-tabs-nav {
		flex-direction: column;
		border-bottom: none;
	}

	.talleres-tab-link {
		border-bottom: 1px solid #e0e0e0;
		border-left: 3px solid transparent;
		text-align: left;
		padding: 0.75rem 1rem;
	}

	.talleres-tab-link.active {
		border-bottom-color: #e0e0e0;
		border-left-color: #007cba;
	}

	.talleres-modal-content {
		padding: 1.25rem;
		width: 95%;
	}

	.talleres-planes-grid {
		grid-template-columns: 1fr;
	}

	.talleres-productos-list {
		grid-template-columns: 1fr;
	}

	.talleres-table {
		font-size: 0.85rem;
	}

	.talleres-table th,
	.talleres-table td {
		padding: 0.5rem;
	}
}

@media (max-width: 480px) {
	.talleres-table-facturas,
	.talleres-table-pagos,
	.talleres-table-sedes {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}

	.talleres-modal-buttons {
		flex-direction: column-reverse;
	}

	.talleres-modal-buttons .talleres-btn {
		width: 100%;
	}
}

/* ========================================================================
   FASE 8 — Shortcodes Públicos: Grid de Planes, Cards, Toggle Físico
   ======================================================================== */

/* ===== Grid responsivo de planes ===== */
.talleres-planes-public {
	display: grid;
	gap: 1.5rem;
	margin: 2rem 0;
}

/* Desktop: N columnas configurables via CSS var --talleres-cols */
@media ( min-width: 1024px ) {
	.talleres-planes-public {
		grid-template-columns: repeat( var( --talleres-cols, 3 ), 1fr );
	}
}

/* Tablet: 2 columnas */
@media ( min-width: 769px ) and ( max-width: 1023px ) {
	.talleres-planes-public {
		grid-template-columns: repeat( 2, 1fr );
	}
}

/* Mobile: 1 columna */
@media ( max-width: 768px ) {
	.talleres-planes-public {
		grid-template-columns: 1fr;
	}
}

/* ===== Card individual ===== */
.talleres-plan-public {
	position: relative;
	border: 1px solid #e5e7eb;
	border-radius: 0.75rem;
	padding: 1.5rem;
	background: #fff;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s, transform 0.2s;
}

.talleres-plan-public:hover {
	box-shadow: 0 4px 12px rgba( 0, 0, 0, 0.1 );
	transform: translateY( -2px );
}

/* Plan destacado */
.talleres-plan-public.talleres-plan-destacado {
	border-color: #3b82f6;
	border-width: 2px;
}

/* Badge "Más popular" */
.talleres-badge-popular {
	position: absolute;
	top: -12px;
	left: 50%;
	transform: translateX( -50% );
	background: #3b82f6;
	color: #fff;
	padding: 4px 12px;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 600;
	white-space: nowrap;
	z-index: 1;
}

/* ===== Nombre y descripción ===== */
.talleres-plan-public .talleres-plan-nombre {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	font-weight: 700;
}

.talleres-plan-public .talleres-plan-descripcion {
	color: #6b7280;
	font-size: 0.92rem;
	margin: 0 0 1rem;
	line-height: 1.5;
}

/* ===== Precio ===== */
.talleres-plan-public .talleres-plan-precio {
	font-size: 1.8rem;
	font-weight: 700;
	color: #007cba;
	margin-bottom: 1rem;
	display: flex;
	align-items: baseline;
	gap: 0.35rem;
}

.talleres-plan-public .talleres-precio-periodo {
	font-size: 0.95rem;
	font-weight: 400;
	color: #6b7280;
}

/* ===== Features list ===== */
.talleres-plan-public .talleres-plan-features {
	list-style: none;
	padding: 0;
	margin: 0 0 1.25rem;
	text-align: left;
}

.talleres-plan-public .talleres-plan-features li {
	padding: 0.35rem 0;
	border-bottom: 1px solid #f0f0f0;
	font-size: 0.92rem;
}

.talleres-plan-public .talleres-plan-features li:last-child {
	border-bottom: none;
}

/* Check / Cross icons */
.talleres-check::before {
	content: "✓ ";
	color: #22c55e;
	font-weight: 700;
}

.talleres-cross::before {
	content: "✗ ";
	color: #ef4444;
	font-weight: 700;
}

/* ===== Toggle versión física ===== */
.talleres-plan-fisico {
	margin: 0 0 1.25rem;
	padding: 0.75rem;
	background: #f9fafb;
	border-radius: 0.5rem;
}

.talleres-toggle {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	cursor: pointer;
	font-size: 0.9rem;
	line-height: 1.4;
}

.talleres-toggle input[type="checkbox"] {
	margin-top: 0.2rem;
	flex-shrink: 0;
	cursor: pointer;
}

/* ===== Desglose dinámico de precio físico ===== */
.talleres-desglose-fisico {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid #e5e7eb;
}

.talleres-desglose-fisico .talleres-linea {
	display: flex;
	justify-content: space-between;
	padding: 0.25rem 0;
	font-size: 0.85rem;
	color: #4b5563;
}

.talleres-desglose-fisico .talleres-linea-total {
	display: flex;
	justify-content: space-between;
	padding: 0.5rem 0 0;
	margin-top: 0.35rem;
	border-top: 1px solid #e5e7eb;
	font-weight: 700;
	font-size: 0.95rem;
	color: #111827;
}

/* ===== Botón CTA ===== */
.talleres-plan-public .talleres-plan-boton {
	display: block;
	width: 100%;
	text-align: center;
	text-decoration: none;
	margin-top: auto;
}

/* ===== Botón de registro individual ===== */
.talleres-btn-registro {
	display: inline-block;
	text-decoration: none;
}

/* ===== Sin planes ===== */
.talleres-no-planes {
	text-align: center;
	color: #6b7280;
	padding: 2rem;
	font-size: 1rem;
}

/* ===== Modal de sedes (overlay) ===== */
.talleres-sedes-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba( 0, 0, 0, 0.6 );
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.talleres-sedes-modal {
	background: #fff;
	border-radius: 0.75rem;
	padding: 2rem;
	max-width: 600px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.3 );
}

.talleres-sedes-modal h3 {
	margin-top: 0;
	margin-bottom: 1.5rem;
	font-size: 1.35rem;
}

.talleres-sedes-forms {
	margin-bottom: 1.5rem;
}

.talleres-sede-form {
	padding: 1rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
	margin-bottom: 1rem;
}

.talleres-sede-form h4 {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	color: #007cba;
}

.talleres-sede-form input[type="text"],
.talleres-sede-form input[type="tel"],
.talleres-sede-form input[type="email"],
.talleres-sede-form textarea {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 0.95rem;
	box-sizing: border-box;
	margin-bottom: 0.5rem;
	font-family: inherit;
}

.talleres-sede-form textarea {
	resize: vertical;
	min-height: 60px;
}

.talleres-sede-form input:focus,
.talleres-sede-form textarea:focus {
	border-color: #007cba;
	outline: none;
	box-shadow: 0 0 0 1px #007cba;
}

.talleres-sedes-modal .talleres-btn {
	width: 100%;
}

/* ===== Responsive para botón CTA en mobile ===== */
@media ( max-width: 768px ) {
	.talleres-plan-public {
		padding: 1.25rem;
	}

	.talleres-plan-public .talleres-plan-precio {
		font-size: 1.5rem;
	}

	.talleres-sedes-modal {
		padding: 1.25rem;
		width: 95%;
	}
}
