/**
 * Revealist — Estilos base del frontend.
 *
 * Estructura:
 *   .revealist-list           ← contenedor de items (gap entre items)
 *     .revealist-item         ← contenedor de cada item (gap header↔panel)
 *       .revealist-header     ← pill superior (imagen + título + flecha)
 *       .revealist-panel      ← contenedor del panel desplegable
 *         .revealist-panel-inner  ← contenido (texto + botones)
 *
 * Decisiones de arquitectura:
 *   - .revealist-item NO tiene estilo visible: solo layout.
 *   - .revealist-header y .revealist-panel son visualmente independientes,
 *     cada uno con sus propios fondo/borde/radio/sombra.
 *   - .revealist-panel tiene overflow:hidden + border-radius para clipear el
 *     inner durante la animación max-height. El box-shadow exterior NO se
 *     recorta por overflow:hidden, así se ve la sombra correctamente.
 *   - Las sombras usan variables CSS para soportar responsive (Elementor no
 *     ofrece Group_Control_Box_Shadow responsive nativo).
 */

.revealist-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.revealist-item {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	position: relative;
}

.revealist-item *,
.revealist-item *::before,
.revealist-item *::after {
	box-sizing: border-box;
}

/* ----- Cabecera (pill) ----- */
.revealist-header {
	display: flex;
	align-items: center;
	width: 100%;
	background: transparent;
	border: 0;
	margin: 0;
	font: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
	gap: 12px;
	appearance: none;
	position: relative;
	z-index: 2;
	transition: background-color 0.25s ease, color 0.25s ease, border-radius 0.25s ease, box-shadow 0.25s ease;
	box-shadow: var(--rl-header-shadow-inset, ) var(--rl-header-shadow-x, 0) var(--rl-header-shadow-y, 4px) var(--rl-header-shadow-blur, 12px) var(--rl-header-shadow-spread, 0) var(--rl-header-shadow-color, rgba(0, 0, 0, 0.08));
}

.revealist-header:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.revealist-image-wrap {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.revealist-image {
	display: block;
	object-fit: cover;
	width: 56px;
	height: 56px;
}

.revealist-title-block {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.revealist-title {
	margin: 0;
	width: 100%;
	min-width: 0;
	white-space: normal;
	overflow-wrap: break-word;
	word-wrap: break-word;
	hyphens: auto;
}

.revealist-subtitle {
	display: block;
	margin: 0;
	width: 100%;
	min-width: 0;
	line-height: 1.3;
	white-space: normal;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.revealist-arrow {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.25s ease;
	line-height: 1;
}

.revealist-arrow .revealist-arrow-open {
	display: none;
}

.revealist-arrow .revealist-arrow-closed {
	display: inline-flex;
}

.revealist-item.is-open .revealist-arrow .revealist-arrow-open {
	display: inline-flex;
}

.revealist-item.is-open .revealist-arrow .revealist-arrow-closed {
	display: none;
}

.revealist-arrow svg,
.revealist-arrow i {
	display: inline-block;
	line-height: 1;
}

/* ----- Panel desplegable ----- */
.revealist-panel {
	overflow: hidden;
	position: relative;
	z-index: 1;
	margin-top: 8px;
	transition-property: max-height, margin-top;
	transition-duration: var(--rl-anim-duration, 500ms);
	transition-timing-function: var(--rl-anim-easing, ease);
	box-shadow: var(--rl-content-shadow-inset, ) var(--rl-content-shadow-x, 0) var(--rl-content-shadow-y, 4px) var(--rl-content-shadow-blur, 12px) var(--rl-content-shadow-spread, 0) var(--rl-content-shadow-color, rgba(0, 0, 0, 0.08));
}

.revealist-panel[hidden] {
	display: none;
}

.revealist-panel-inner {
	width: 100%;
}

.revealist-content > *:first-child {
	margin-top: 0;
}

.revealist-content > *:last-child {
	margin-bottom: 0;
}

/* ----- Botones ----- */
.revealist-buttons {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
}

.revealist-buttons-side {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

.revealist-buttons-side:empty {
	display: none;
}

.revealist-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.05s ease;
	line-height: 1.2;
}

.revealist-btn:active {
	transform: translateY(1px);
}

.revealist-btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.revealist-btn-icon svg,
.revealist-btn-icon i {
	display: inline-block;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.revealist-header,
	.revealist-arrow,
	.revealist-panel,
	.revealist-btn {
		transition: none;
	}
}
