/* Huertech QR de página. Estilos acotados al prefijo .huertech-qr-*; no tocan el tema. */

.huertech-qr-bar {
	margin-block-start: 0;
	padding: 0.75rem 1rem;
	text-align: center;
	font-size: 0.8125rem;
}

.huertech-qr-open {
	background: none;
	border: 0;
	padding: 0.5rem 0.75rem;
	font: inherit;
	color: var(--wp--preset--color--custom-texto-gris-carbon, #263238);
	text-decoration: underline;
	text-underline-offset: 0.2em;
	cursor: pointer;
}

.huertech-qr-open:hover {
	color: var(--wp--preset--color--custom-ppal-verde-huertech, #2e7d32);
}

.huertech-qr-open:focus-visible,
.huertech-qr-btn:focus-visible,
.huertech-qr-dialog__close:focus-visible {
	outline: 3px solid #00a9d6;
	outline-offset: 2px;
}

/* Diálogo nativo <dialog>: foco atrapado, Esc para cerrar y fondo inerte. */
.huertech-qr-dialog {
	box-sizing: border-box;
	width: min(92vw, 26rem);
	max-height: 92vh;
	padding: 0;
	overflow: auto;
	border: 4px solid #2e7d32;
	border-radius: 16px;
	background: #ffffff;
	color: #263238;
	font-family: inherit;
}

.huertech-qr-dialog::backdrop {
	background: rgba(20, 83, 45, 0.6);
}

.huertech-qr-dialog__inner {
	padding: 1.25rem;
}

.huertech-qr-dialog__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.huertech-qr-dialog__title {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.3;
	color: #14532d;
}

.huertech-qr-dialog__close {
	flex: none;
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	border-radius: 50%;
	background: #f1f7f2;
	color: #14532d;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.huertech-qr-preview {
	display: flex;
	justify-content: center;
	min-height: 6rem;
	margin-bottom: 0.75rem;
	text-align: center;
	font-size: 0.9375rem;
}

.huertech-qr-preview > svg {
	display: block;
	width: 100%;
	max-width: 15rem;
	height: auto;
}

.huertech-qr-url {
	margin: 0 0 1rem;
	font-size: 0.8125rem;
	text-align: center;
	overflow-wrap: anywhere;
}

.huertech-qr-actions {
	display: grid;
	gap: 0.5rem;
}

.huertech-qr-btn {
	padding: 0.75rem 1rem;
	border: 2px solid #2e7d32;
	border-radius: 8px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.huertech-qr-btn--primary {
	background: #2e7d32;
	color: #ffffff;
}

.huertech-qr-btn--ghost {
	background: #ffffff;
	color: #14532d;
}

.huertech-qr-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.huertech-qr-status {
	min-height: 1.4em;
	margin: 0.75rem 0 0;
	font-size: 0.875rem;
	text-align: center;
	color: #14532d;
}

@media print {
	.huertech-qr-bar,
	.huertech-qr-dialog {
		display: none !important;
	}
}
