/**
 * Drawer "Richiedi noleggio" — pannello laterale da destra.
 * Token brand come variabili (override dal tema: ridefinisci --anl-* su :root).
 */
:root {
	--anl-primary: #14110F;
	--anl-accent: #C87B3D;
	--anl-accent-dark: #A35A25;
	--anl-bg: #FBF7EE;
	--anl-muted: #6B5D4E;
	--anl-border: rgba(20, 17, 15, 0.12);
	--anl-radius: 12px;
	--anl-z: 1200;
}

/* ---------- Shell ---------- */
.anl-drawer {
	position: fixed;
	inset: 0;
	z-index: var(--anl-z);
	pointer-events: none;
}
.anl-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(20, 17, 15, 0.45);
	opacity: 0;
	transition: opacity 0.3s ease;
}
.anl-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: min(480px, 100%);
	display: flex;
	flex-direction: column;
	background: #fff;
	color: var(--anl-primary);
	box-shadow: -12px 0 40px rgba(0, 0, 0, 0.14);
	transform: translateX(100%);
	transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
/* [hidden] deve vincere sulle regole `display` del tema/Woo su form e box. */
.anl-drawer .anl-form[hidden],
.anl-drawer .anl-form__status[hidden],
.anl-drawer .anl-drawer__success[hidden] { display: none; }

.anl-drawer.is-open { pointer-events: auto; }
.anl-drawer.is-open .anl-drawer__overlay { opacity: 1; }
.anl-drawer.is-open .anl-drawer__panel { transform: none; }
body.has-anl-drawer-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.anl-drawer__overlay, .anl-drawer__panel { transition: none; }
}

/* ---------- Header prodotto ---------- */
.anl-drawer__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 24px 28px 20px;
	border-bottom: 1px solid var(--anl-border);
	background: var(--anl-bg);
}
.anl-drawer__product { display: flex; gap: 14px; align-items: center; min-width: 0; }
.anl-drawer__thumb {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--anl-border);
	display: flex;
	align-items: center;
	justify-content: center;
}
.anl-drawer__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.anl-drawer__product-body { min-width: 0; }
.anl-drawer__eyebrow {
	display: block;
	margin-bottom: 4px;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--anl-accent);
}
.anl-drawer__title { margin: 0; font-size: 1.15rem; font-weight: 600; line-height: 1.25; color: var(--anl-primary); }
.anl-drawer__meta { margin: 6px 0 0; font-size: 0.85rem; color: var(--anl-muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.anl-drawer__meta strong { color: var(--anl-primary); font-weight: 600; }
.anl-drawer__sku { font-size: 0.78rem; }
.anl-drawer__close {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--anl-border);
	border-radius: 50%;
	background: #fff;
	color: var(--anl-primary);
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}
.anl-drawer__close:hover { border-color: var(--anl-accent); color: var(--anl-accent); }

/* ---------- Form ---------- */
.anl-form { padding: 22px 28px 32px; display: flex; flex-direction: column; gap: 14px; }
.anl-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.anl-form__intro { margin: 0 0 4px; font-size: 0.9rem; line-height: 1.5; color: var(--anl-muted); }
.anl-form__row { display: flex; flex-direction: column; gap: 6px; }
.anl-form__row--split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.anl-form__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.anl-form__label {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--anl-muted);
}
.anl-form input:not([type="checkbox"]),
.anl-form select,
.anl-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--anl-border);
	border-radius: 8px;
	background: #fff;
	color: var(--anl-primary);
	font: inherit;
	font-size: 0.95rem;
	line-height: 1.3;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.anl-form input:focus, .anl-form select:focus, .anl-form textarea:focus {
	outline: none;
	border-color: var(--anl-accent);
	box-shadow: 0 0 0 3px rgba(200, 123, 61, 0.18);
}
.anl-form textarea { resize: vertical; min-height: 84px; }
.anl-form__hint { margin: -4px 0 0; font-size: 0.78rem; line-height: 1.45; color: var(--anl-muted); }
.anl-form__privacy { display: flex; gap: 10px; align-items: flex-start; font-size: 0.82rem; line-height: 1.45; color: var(--anl-muted); }
.anl-form__privacy input { margin-top: 3px; accent-color: var(--anl-accent); }
.anl-form__privacy a { color: var(--anl-accent); }
.anl-form__status {
	padding: 10px 14px;
	border-radius: 8px;
	background: #FBE3E3;
	color: #BA3535;
	font-size: 0.88rem;
	line-height: 1.45;
}
.anl-form__submit {
	width: 100%;
	padding: 0.95rem 1.2rem;
	border: 0;
	border-radius: 24px;
	background: var(--anl-accent);
	color: #fff;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.1s ease;
}
.anl-form__submit:hover:not(:disabled) { background: var(--anl-accent-dark); }
.anl-form__submit:active:not(:disabled) { transform: scale(0.98); }
.anl-form__submit:disabled { opacity: 0.5; cursor: wait; }
.anl-form__foot { margin: 0; text-align: center; font-size: 0.78rem; color: var(--anl-muted); }

@media (max-width: 480px) {
	.anl-drawer__header { padding: 20px 20px 16px; }
	.anl-form { padding: 20px 20px 28px; }
	.anl-form__row--split { grid-template-columns: 1fr; }
}

/* ---------- Success ---------- */
.anl-drawer__success { padding: 48px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.anl-drawer__success-icon { color: #5A8D6E; }
.anl-drawer__success-title { margin: 0; font-size: 1.35rem; font-weight: 600; color: var(--anl-primary); }
.anl-drawer__success-text { margin: 0; max-width: 34ch; font-size: 0.92rem; line-height: 1.55; color: var(--anl-muted); }
.anl-drawer__success-close {
	margin-top: 12px;
	padding: 0.8rem 1.6rem;
	border: 1px solid var(--anl-primary);
	border-radius: 24px;
	background: transparent;
	color: var(--anl-primary);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.anl-drawer__success-close:hover { background: var(--anl-primary); color: #fff; }
