/* =====================================================
   zlp-style.css — Zebra Label Printer UI
   Stile: industrial/utility — pulito, tecnico, leggibile
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

/* ── Reset wrapper ────────────────────────────── */
.zlp-wrapper {
	font-family: 'IBM Plex Sans', sans-serif;
	max-width: 480px;
	margin: 1.5rem 0;
}

/* ── Card ─────────────────────────────────────── */
.zlp-card {
	background: #fafafa;
	border: 2px solid #1a1a1a;
	border-radius: 4px;
	padding: 1.5rem;
	box-shadow: 4px 4px 0 #1a1a1a;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* ── Header ───────────────────────────────────── */
.zlp-header {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding-bottom: 1rem;
	border-bottom: 1.5px solid #1a1a1a;
}

.zlp-icon {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	color: #1a1a1a;
	margin-top: 2px;
}

.zlp-title-group {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.zlp-title {
	font-size: 1rem !important;
	font-weight: 600 !important;
	color: #1a1a1a !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1.3 !important;
	border: none !important;
}

.zlp-order-badge {
	display: inline-block;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 0.75rem;
	font-weight: 500;
	color: #fff;
	background: #1a1a1a;
	padding: 2px 8px;
	border-radius: 2px;
	letter-spacing: 0.05em;
	width: fit-content;
}

/* ── Label ────────────────────────────────────── */
.zlp-label {
	display: block;
	font-size: 0.7rem;
	font-weight: 600;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: 0.35rem;
}

/* ── Input ────────────────────────────────────── */
.zlp-input-row,
.zlp-printer-row {
	display: flex;
	flex-direction: column;
}

.zlp-input {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 0.95rem;
	color: #1a1a1a;
	background: #fff;
	border: 1.5px solid #bbb;
	border-radius: 3px;
	padding: 0.5rem 0.75rem;
	outline: none;
	transition: border-color 0.15s;
	width: 100%;
	box-sizing: border-box;
}

.zlp-input:focus {
	border-color: #1a1a1a;
}

/* ── Select ───────────────────────────────────── */
.zlp-select {
	font-family: 'IBM Plex Sans', sans-serif;
	font-size: 0.9rem;
	color: #1a1a1a;
	background: #fff;
	border: 1.5px solid #bbb;
	border-radius: 3px;
	padding: 0.5rem 0.75rem;
	outline: none;
	cursor: pointer;
	transition: border-color 0.15s;
	width: 100%;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a1a1a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	padding-right: 2rem;
}

.zlp-select:focus {
	border-color: #1a1a1a;
}

/* ── Status message ───────────────────────────── */
.zlp-status {
	font-size: 0.85rem;
	font-family: inherit;
	padding: 0.55rem 0.8rem;
	border-radius: 3px;
	border: 1px solid transparent;
	transition: all 0.2s;
}

.zlp-status--hidden {
	display: none;
}

.zlp-status--info {
	background: #f0f4ff;
	border-color: #d0d8f0;
	color: #2d3a6b;
}

.zlp-status--success {
	background: #f2f9f4;
	border-color: #c6e0cc;
	color: #1e5c30;
}

.zlp-status--error {
	background: #fdf2f2;
	border-color: #f0cccc;
	color: #7a1c1c;
}

.zlp-status--demo {
	background: #f8f8f8;
	border-color: #ddd;
	color: #555;
}

/* ── Button ───────────────────────────────────── */
.zlp-btn {
	display: block;
	width: 100%;
	font-family: 'IBM Plex Sans', sans-serif;
	font-size: 0.9rem;
	font-weight: 600;
	color: #fff !important;
	background: #1a1a1a;
	border: 1px solid #1a1a1a;
	border-radius: 3px;
	padding: 0.65rem 1.25rem;
	cursor: pointer;
	transition: background 0.15s;
	letter-spacing: 0.01em;
	text-decoration: none !important;
	text-align: center;
}

.zlp-btn:hover:not(:disabled) {
	background: #333;
}

.zlp-btn:disabled,
.zlp-btn--loading {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ── Preview row (input ID + bottone anteprima) ── */
.zlp-preview-row {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.zlp-preview-row .zlp-input {
	flex: 1;
	min-width: 0;
}

.zlp-preview-row .zlp-btn {
	flex-shrink: 0;
	width: auto;
	white-space: nowrap;
}

/* ── Button outline (anteprima) ───────────────── */
.zlp-btn--outline {
	background: transparent;
	color: #1a1a1a !important;
	border: 1.5px solid #1a1a1a;
}

.zlp-btn--outline:hover:not(:disabled) {
	background: #f0f0f0;
}

/* ── Preview image ────────────────────────────── */
.zlp-preview-img {
	display: block;
	width: 100%;
	border: 1.5px solid #ccc;
	border-radius: 3px;
	image-rendering: -webkit-optimize-contrast;
	image-rendering: crisp-edges;
}

/* ── Error fallback ───────────────────────────── */
.zlp-error {
	color: #b91c1c;
	font-size: 0.9rem;
	padding: 0.5rem;
	border: 1px solid #fca5a5;
	border-radius: 3px;
	background: #fef2f2;
}
