/* TH · Hojas de pedido — botones de descarga (PDF/Word) */

.thpd {
	--thpd-solid-bg: #C91C1C;
	--thpd-solid-text: #ffffff;
	--thpd-ghost: #C91C1C;
	--thpd-radius: 4px;
	--thpd-gap: 10px;
	--thpd-font-size: 14px;
	display: flex;
	flex-wrap: wrap;
	gap: var(--thpd-gap);
	align-items: stretch;
}
.thpd--stack { flex-direction: column; }
.thpd--stack .thpd-item,
.thpd--stack .thpd-btn { width: 100%; }

.thpd-item { position: relative; display: inline-flex; }
.thpd--stack .thpd-item { display: flex; }

/* Botón principal */
.thpd-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	box-sizing: border-box;
	padding: 13px 20px;
	font-size: var(--thpd-font-size);
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	line-height: 1.1;
	text-decoration: none;
	border: 2px solid var(--thpd-solid-bg);
	border-radius: var(--thpd-radius);
	cursor: pointer;
	transition: filter .15s ease, background .15s ease, color .15s ease;
}
.thpd-btn:focus-visible { outline: 3px solid rgba(201,28,28,.35); outline-offset: 2px; }

/* Variante sólida */
.thpd-item--solid .thpd-btn {
	background: var(--thpd-solid-bg);
	color: var(--thpd-solid-text);
}
.thpd-item--solid .thpd-btn:hover { filter: brightness(.92); }

/* Variante ghost */
.thpd-item--ghost .thpd-btn {
	background: #fff;
	color: var(--thpd-ghost);
	border-color: var(--thpd-ghost);
}
.thpd-item--ghost .thpd-btn:hover { background: var(--thpd-ghost); color: #fff; }

/* Icono de descarga (círculo + flecha) */
.thpd-ico { flex-shrink: 0; width: 20px; height: 20px; display: inline-flex; }
.thpd-ico svg { width: 100%; height: 100%; }

.thpd-label { flex: 1; text-align: left; }
.thpd--inline .thpd-label { flex: 0 1 auto; }

.thpd-caret {
	flex-shrink: 0;
	margin-left: auto;
	font-size: .8em;
	opacity: .85;
	transition: transform .15s ease;
}
.thpd-item.is-open .thpd-caret { transform: rotate(180deg); }

/* Menú desplegable de formatos */
.thpd-menu {
	position: absolute;
	z-index: 30;
	top: calc(100% + 4px);
	left: 0;
	min-width: 100%;
	background: #fff;
	border: 1px solid #e1e1e1;
	border-radius: var(--thpd-radius);
	box-shadow: 0 8px 24px rgba(0,0,0,.14);
	padding: 6px;
	display: none;
}
.thpd-item.is-open .thpd-menu { display: block; }

.thpd-menu__link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 12px;
	border-radius: 3px;
	text-decoration: none;
	color: #222;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}
.thpd-menu__link:hover { background: #f4f4f4; color: var(--thpd-solid-bg); }
.thpd-menu__fmt {
	display: inline-block;
	min-width: 42px;
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	padding: 2px 6px;
	border-radius: 3px;
	color: #fff;
	text-transform: uppercase;
}
.thpd-menu__fmt--pdf  { background: #C91C1C; }
.thpd-menu__fmt--word { background: #2B579A; }

/* Aviso del editor de Elementor */
.thpd-editor-note {
	padding: 22px;
	text-align: center;
	color: #888;
	background: #F5F5F3;
	border: 2px dashed #D0D0CE;
	font-size: 14px;
	line-height: 1.5;
}
