/**
 * Estilos Frontend — Plugin Canal de Denuncias (v1.0.5)
 * Conforme a Ley 2/2023 - Modelo Jiménez y Carmona
 */
:root {
	--wb-primary: #1a73e8;
	--wb-primary-hover: #1557b0;
	--wb-success: #188038;
	--wb-error: #d93025;
	--wb-text: #3c4043;
	--wb-text-light: #70757a;
	--wb-border: #dadce0;
	--wb-bg: #ffffff;
	--wb-bg-alt: #f8f9fa;
	--wb-radius: 8px;
	--wb-shadow: 0 1px 3px rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
}

.wb-canal-container {
	max-width: 850px;
	margin: 2rem auto;
	background: var(--wb-bg);
	border: 1px solid var(--wb-border);
	border-radius: var(--wb-radius);
	overflow: hidden;
	box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: var(--wb-text);
	box-sizing: border-box;
}

.wb-canal-container * {
	box-sizing: border-box;
}

/* Navegación por Pestañas */
.wb-canal-nav {
	display: flex;
	background: var(--wb-bg-alt);
	border-bottom: 1px solid var(--wb-border);
}

.wb-canal-nav-btn {
	flex: 1;
	padding: 1.25rem 1rem;
	border: none;
	background: none;
	cursor: pointer;
	font-weight: 700;
	font-size: 0.85rem;
	color: var(--wb-text-light);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	transition: all 0.3s ease;
	border-bottom: 3px solid transparent;
}

.wb-canal-nav-btn:hover {
	background: rgba(0,0,0,0.02);
	color: var(--wb-primary);
}

.wb-canal-nav-btn.active {
	background: var(--wb-bg);
	color: var(--wb-primary);
	border-bottom-color: var(--wb-primary);
}

/* Contenedor de Secciones */
.wb-canal-content {
	padding: 2.5rem;
}

.wb-canal-section {
	display: none;
	animation: wbFadeIn 0.4s ease-out;
}

.wb-canal-section.active {
	display: block;
}

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

/* Introducción Legal */
.wb-legal-intro {
	margin-bottom: 2rem;
	padding: 1.25rem;
	background: #fdf6ec;
	border-left: 4px solid #e6a23c;
	border-radius: 4px;
	font-size: 0.95rem;
	line-height: 1.6;
}

/* Info Pills (Uso/Procedimiento) */
.wb-info-pills {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	margin-bottom: 2.5rem;
}

.wb-info-pill {
	background: #e8f0fe;
	border-radius: var(--wb-radius);
	border: 1px solid #d2e3fc;
}

.wb-info-pill summary {
	padding: 1rem;
	font-weight: 600;
	color: var(--wb-primary);
	cursor: pointer;
	list-style: none;
	text-align: center;
}

.wb-info-pill .wb-pill-content {
	padding: 1.25rem;
	background: #fff;
	border-top: 1px solid #d2e3fc;
	font-size: 0.9rem;
	line-height: 1.5;
}

/* Formulario Grid */
.wb-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
}

.wb-form__group {
	margin-bottom: 1.5rem;
	min-width: 0;
}

.wb-form__label {
	display: block;
	margin-bottom: 0.6rem;
	font-weight: 600;
	font-size: 0.9rem;
}

.wb-form__control {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding: 0.8rem 1rem;
	border: 1px solid var(--wb-border);
	border-radius: 6px;
	font-size: 1rem;
	transition: all 0.2s;
	box-sizing: border-box;
}

.wb-form__control:focus {
	outline: none;
	border-color: var(--wb-primary);
	box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

input[type="date"].wb-form__control {
	min-height: 2.5rem;
	-webkit-appearance: none;
	background-color: #fff;
}

/* Radio & Checkbox */
.wb-form__radio-group {
	display: flex;
	gap: 2rem;
	background: var(--wb-bg-alt);
	padding: 1rem;
	border-radius: 6px;
}

.wb-radio-label, .wb-checkbox-label {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	cursor: pointer;
	font-size: 0.95rem;
}

.wb-radio-label input, .wb-checkbox-label input {
	width: 1.1rem;
	height: 1.1rem;
	accent-color: var(--wb-primary);
}

/* Consentimiento */
.wb-consent {
	background: #f8fafc;
	padding: 1.25rem;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
}

.wb-consent a {
	color: var(--wb-primary);
	text-decoration: underline;
}

/* Acordeones Inferiores */
.wb-info-accordions {
	margin-top: 3rem;
	border-top: 1px solid var(--wb-border);
	padding-top: 2rem;
}

.wb-accordion {
	border: 1px solid var(--wb-border);
	border-radius: 6px;
	margin-bottom: 0.75rem;
	overflow: hidden;
}

.wb-accordion__summary {
	padding: 1rem 1.25rem;
	font-weight: 700;
	font-size: 0.9rem;
	background: var(--wb-bg-alt);
	cursor: pointer;
	color: var(--wb-primary);
}

.wb-accordion__content {
	padding: 1.25rem;
	border-top: 1px solid var(--wb-border);
	font-size: 0.9rem;
	line-height: 1.6;
}

/* Seguimiento */
.wb-tracking-result {
	margin-top: 2rem;
	padding: 1.5rem;
	background: var(--wb-bg-alt);
	border-radius: 6px;
}

/* Otros Canales */
.wb-others-info {
	background: #f0f7ff;
	padding: 2rem;
	border-radius: 12px;
	border: 1px solid #cce3ff;
}

.wb-others-title {
	margin-top: 0;
	color: #004a99;
}

.wb-contact-list {
	list-style: none;
	padding: 0;
	margin: 1.5rem 0;
}

.wb-contact-list li {
	margin-bottom: 1.2rem;
	display: flex;
	gap: 1rem;
	font-size: 1.1rem;
}

.wb-presencial-info {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #cce3ff;
}

/* Botones Premium */
.wb-btn {
	padding: 1rem 2.5rem;
	border-radius: 6px;
	font-weight: 700;
	cursor: pointer;
	border: none;
	font-size: 1rem;
	transition: all 0.2s;
}

.wb-btn--primary {
	background: var(--wb-primary);
	color: #fff;
	box-shadow: 0 2px 4px rgba(26, 115, 232, 0.3);
}

.wb-btn--primary:hover {
	background: var(--wb-primary-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(26, 115, 232, 0.4);
}

/* Datos de Identidad */
.wb-identity-box {
	border: 1px solid var(--wb-border);
	padding: 1.5rem;
	border-radius: var(--wb-radius);
	margin-bottom: 2rem;
	background: var(--wb-bg-alt);
}

/* Responsivo */
@media (max-width: 768px) {
	.wb-canal-nav {
		flex-direction: column;
	}
	.wb-canal-nav-btn {
		border-bottom: none;
		border-left: 3px solid transparent;
		text-align: left;
		padding: 1rem 1.5rem;
	}
	.wb-canal-nav-btn.active {
		border-left-color: var(--wb-primary);
	}
	.wb-canal-content {
		padding: 1.25rem;
	}
	.wb-info-pills, .wb-form__row {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
	.wb-form__radio-group {
		flex-direction: column;
		gap: 1rem;
	}
	.wb-info-pill summary {
		text-align: left;
	}
	.wb-identity-box {
		padding: 1rem;
	}
}

@media (max-width: 480px) {
	.wb-btn {
		width: 100%;
		display: block;
	}
	.wb-canal-container {
		margin: 0;
		border-radius: 0;
		border: none;
	}
	.wb-canal-content {
		padding: 1rem;
	}
}

/* Pantalla de Éxito */
.wb-success-screen {
	text-align: center;
	padding: 3rem 2rem;
}

.wb-token-box {
	margin: 2rem auto;
	background: #fff;
	border: 2px dashed var(--wb-primary);
	padding: 1.5rem;
	border-radius: var(--wb-radius);
	max-width: 500px;
}

#wb-generated-token {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--wb-primary);
	letter-spacing: 1px;
	word-break: break-all;
	display: block;
	line-height: 1.4;
	font-family: monospace;
}

.wb-token-actions {
	margin-top: 1.5rem;
}

/* Enlaces Informativos (Modales) */
.wb-info-links {
	display: flex;
	gap: 1.5rem;
	margin-bottom: 2rem;
	padding: 1rem;
	background: #f1f3f4;
	border-radius: 8px;
}

.wb-info-links a {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--wb-primary);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	transition: opacity 0.2s;
}

.wb-info-links a:hover {
	opacity: 0.8;
}

/* Modales */
.wb-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wb-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.5);
	backdrop-filter: blur(4px);
}

.wb-modal__content {
	position: relative;
	background: #fff;
	width: 90%;
	max-width: 700px;
	max-height: 80vh;
	border-radius: 12px;
	padding: 2.5rem;
	box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
	overflow-y: auto;
	animation: wbModalScale 0.3s ease-out;
}

@keyframes wbModalScale {
	from { opacity: 0; transform: scale(0.95); }
	to { opacity: 1; transform: scale(1); }
}

.wb-modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: none;
	border: none;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	color: #999;
}

.wb-modal__title {
	margin-top: 0;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #eee;
	color: var(--wb-primary);
}

.wb-modal__body {
	font-size: 1rem;
	line-height: 1.6;
}

.wb-modal-open {
	overflow: hidden;
}

/* Responsivo */
@media (max-width: 768px) {
	.wb-info-links {
		flex-direction: column;
		gap: 0.75rem;
	}
	.wb-modal__content {
		padding: 1.5rem;
		width: 95%;
	}
}

.wb-required { color: var(--wb-error); margin-left: 3px; }
.wb-notice { padding: 1rem; border-radius: 6px; margin: 1rem 0; font-weight: 500; }
.wb-notice--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.wb-notice--success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.wb-notice--warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* Mensajes e Historial */
.wb-messages {
	max-height: 450px;
	overflow-y: auto;
	border: 1px solid var(--wb-border);
	border-radius: var(--wb-radius);
	padding: 1.5rem;
	background: #fafafa;
	margin-bottom: 2rem;
}

.wb-message {
	margin-bottom: 1.5rem;
	padding: 1.25rem;
	border-radius: var(--wb-radius);
	max-width: 90%;
	position: relative;
}

.wb-message--admin {
	background: #fff;
	border: 1px solid var(--wb-border);
	margin-right: auto;
	box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.wb-message--user {
	background: #e8f0fe;
	border: 1px solid #d2e3fc;
	margin-left: auto;
	color: #1a4da1;
}

.wb-message__header {
	font-size: 0.8rem;
	margin-bottom: 0.5rem;
	color: var(--wb-text-light);
	display: flex;
	justify-content: space-between;
}

.wb-message__content {
	line-height: 1.5;
	font-size: 0.95rem;
}

.wb-messages__empty {
	text-align: center;
	color: var(--wb-text-light);
	padding: 2rem;
	font-style: italic;
}

/* Badges de Estado */
.wb-badge {
	display: inline-block;
	padding: 0.4rem 1rem;
	border-radius: 50px;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #fff;
}

.wb-badge--received { background: #2271b1; }
.wb-badge--investigating { background: #dba617; }
.wb-badge--closed { background: #999; }

/* Bloque de Tracking Integrado */
.wb-tracking-result-v2 {
	margin-top: 2.5rem;
	padding: 2rem;
	background: #fff;
	border: 1px solid var(--wb-border);
	border-radius: 12px;
	box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.wb-track-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #eee;
}

.wb-reply-section {
	background: #fff;
	border: 1px solid var(--wb-border);
	padding: 1.5rem;
	border-radius: var(--wb-radius);
}
