/**
 * PDF Menu Uploader — stili del modulo pubblico.
 * I colori sono esposti come custom properties: il tema può sovrascriverle
 * (per esempio --accent) senza toccare il plugin.
 */

.pmu-box {
	--pmu-accent: var(--e-global-color-accent, var(--accent, #0073aa));
	--pmu-accent-hover: var(--accent-hover, #005f8d);
	--pmu-border: #d5d8dc;
	--pmu-surface: #fafafa;
	--pmu-text: #2f3336;
	--pmu-muted: #5b6165;

	box-sizing: border-box;
	max-width: 480px;
	margin: 0 auto;
	padding: 24px 28px;
	border: 1px solid var(--pmu-border);
	border-radius: 6px;
	background: var(--pmu-surface);
	color: var(--pmu-text);
}

.pmu-box *,
.pmu-box *::before,
.pmu-box *::after {
	box-sizing: inherit;
}

.pmu-header {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.pmu-title {
	margin: 0 0 16px;
	font-size: 1.1em;
	line-height: 1.3;
	color: var(--pmu-text);
}

.pmu-header .pmu-title {
	margin-bottom: 0;
}

.pmu-box label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: var(--pmu-text);
}

.pmu-box input[type="password"],
.pmu-box input[type="file"] {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #c3c7cb;
	border-radius: 4px;
	background: #fff;
	font-size: 0.95em;
	font-family: inherit;
	color: inherit;
}

.pmu-box input[type="password"]:focus-visible,
.pmu-box input[type="file"]:focus-visible,
.pmu-box .pmu-btn:focus-visible,
.pmu-box .pmu-logout:focus-visible,
.pmu-box a:focus-visible {
	outline: 2px solid var(--pmu-accent);
	outline-offset: 2px;
}

.pmu-field {
	margin: 0 0 16px;
}

.pmu-actions {
	margin: 0;
}

.pmu-btn {
	display: inline-block;
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	background: var(--pmu-accent);
	color: #fff;
	font-size: 0.95em;
	font-family: inherit;
	line-height: 1.2;
	cursor: pointer;
}

.pmu-btn:hover,
.pmu-btn:focus {
	background: var(--pmu-accent-hover);
	color: #fff;
}

.pmu-logout {
	color: #b32d2e;
	text-decoration: none;
	font-size: 0.9em;
}

.pmu-logout:hover,
.pmu-logout:focus {
	text-decoration: underline;
}

.pmu-hint,
.pmu-current {
	margin: 4px 0 16px;
	font-size: 0.85em;
	line-height: 1.5;
	color: var(--pmu-muted);
}

.pmu-current {
	padding: 8px 12px;
	border-radius: 4px;
	background: #f0f2f4;
}

.pmu-stable-link {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
	align-items: baseline;
}

.pmu-stable-label {
	font-weight: 600;
}

.pmu-stable-url {
	word-break: break-all;
	font-size: 0.95em;
}

.pmu-messages:empty {
	display: none;
}

.pmu-notice {
	margin-bottom: 16px;
	padding: 10px 14px;
	border-radius: 4px;
	font-size: 0.95em;
	line-height: 1.5;
}

.pmu-success {
	border: 1px solid #46b450;
	background: #edfaed;
	color: #1f5423;
}

.pmu-error {
	border: 1px solid #d63638;
	background: #fde8e8;
	color: #8a1f1f;
}

.pmu-warning {
	border: 1px solid #dba617;
	background: #fdf6e3;
	color: #6b4d02;
}

@media (max-width: 480px) {
	.pmu-box {
		padding: 20px;
	}

	.pmu-btn {
		width: 100%;
	}
}

/* ---------------------------------------------------------------------
 * Widget Elementor "Menu PDF – Pulsante"
 * Questi sono soltanto i valori di partenza: ogni proprieta' e' pensata
 * per essere sovrascritta dai controlli di stile del widget, che hanno
 * specificita' piu' alta.
 * ------------------------------------------------------------------ */

.pmu-elementor-button {
	--pmu-accent: var(--e-global-color-accent, var(--accent, #0073aa));

	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	border: none;
	border-radius: 4px;
	background-color: var(--pmu-accent);
	color: #fff;
	font-family: inherit;
	font-size: 1em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s;
}

.pmu-elementor-button:hover,
.pmu-elementor-button:focus {
	color: #fff;
	text-decoration: none;
}

.pmu-elementor-button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.pmu-elementor-button-icon {
	display: inline-flex;
	align-items: center;
}

.pmu-elementor-button-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* Allineamento "larghezza piena". */
.pmu-button-align-justify .pmu-elementor-button {
	display: flex;
	width: 100%;
}

/* Avviso mostrato solo dentro l'editor Elementor. */
.pmu-elementor-button-notice {
	display: block;
	margin-top: 8px;
	font-size: 0.8em;
	line-height: 1.4;
	color: #8a6d1f;
}
