/*
 * Drawer (Quote + Favourites)
 *
 * 520px Right-Slide-In, dunkler Header, weißer Body. Klassennamen 1:1 aus
 * additional/layout/drawer.css, mit CSS-Variablen-Substitution.
 */

.drawer-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: var(--ln-z-drawer);
	backdrop-filter: blur(2px);
}

.drawer-overlay.is-open {
	display: block;
}

.drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 520px;
	max-width: 100vw;
	background: var(--ln-white);
	z-index: calc(var(--ln-z-drawer) + 1);
	transform: translateX(100%);
	transition: transform var(--ln-transition-slow);
	display: flex;
	flex-direction: column;
}

.drawer.is-open {
	transform: translateX(0);
	/* Schatten nur im geöffneten Zustand — sonst leckt er am rechten Rand. */
	box-shadow: -8px 0 40px rgba(0, 0, 0, 0.2);
}

.drawer-hdr {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
	border-bottom: 1px solid var(--ln-border);
	flex-shrink: 0;
	background: var(--ln-dark);
}

.drawer-title {
	font-size: 16px;
	font-weight: 800;
	color: var(--ln-white);
	margin: 0;
}

.drawer-close {
	width: 34px;
	height: 34px;
	border: none;
	background: rgba(255, 255, 255, 0.1);
	border-radius: var(--ln-radius-sm);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.7);
	transition: all 0.2s;
}

.drawer-close:hover {
	background: rgba(255, 255, 255, 0.2);
	color: var(--ln-white);
}

.drawer-body {
	flex: 1;
	overflow-y: auto;
	padding: 0;
}

.dw-section {
	padding: 20px 24px;
	border-bottom: 1px solid var(--ln-border);
}

.dw-section:last-child {
	border-bottom: none;
}

.dw-section-title {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.8px;
	color: var(--ln-mid);
	margin-bottom: 12px;
}

/* Inquiry-Liste */
.inquiry-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 60px;
}

.inquiry-empty,
.favs-empty {
	font-size: 12px;
	color: var(--ln-mid);
	padding: 14px 16px;
	background: var(--ln-light);
	border-radius: var(--ln-radius-sm);
	text-align: center;
	line-height: 1.55;
	border: 1px dashed var(--ln-border);
	margin: 0;
}

.inquiry-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid var(--ln-border);
	border-radius: var(--ln-radius-sm);
	background: var(--ln-white);
}

.inquiry-item-img {
	width: 44px;
	height: 44px;
	object-fit: contain;
	background: var(--ln-light);
	border-radius: var(--ln-radius-sm);
	flex-shrink: 0;
}

.inquiry-item-name {
	flex: 1;
	font-size: 12px;
	font-weight: 600;
	color: var(--ln-dark);
	line-height: 1.4;
}

.inquiry-item-remove {
	width: 26px;
	height: 26px;
	border: none;
	background: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ln-mid);
	border-radius: var(--ln-radius-sm);
	transition: all 0.15s;
	flex-shrink: 0;
}

.inquiry-item-remove:hover {
	background: #fee2e2;
	color: #dc2626;
}

/* Quote-Formular */
.qf-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin-bottom: 12px;
}

.qf-2col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

/* Konfigurierbare Felder (Quote-Drawer-Widget): 2-Spalten-Grid,
   1/2-Felder belegen eine Spalte, 1/1-Felder die volle Breite. */
.qf-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 12px;
}

.qf-field--full {
	grid-column: 1 / -1;
}

/* Halbe Felder unten ausrichten — sonst versetzt ein Label-loses Feld
   neben einem Feld mit Label die Inputs vertikal gegeneinander. */
.qf-grid > .qf-field {
	justify-content: flex-end;
}

.qf-field--hidden {
	display: none;
}

select.qf-input {
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
	cursor: pointer;
}

select.qf-input:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.qf-label {
	font-size: 10px;
	font-weight: 700;
	color: var(--ln-dark);
	text-transform: uppercase;
	letter-spacing: 0.8px;
}

.qf-input {
	padding: 9px 12px;
	border: 1px solid var(--ln-border);
	border-radius: var(--ln-radius-sm);
	font-size: 13px;
	color: var(--ln-dark);
	background: var(--ln-white);
	outline: none;
	transition: border-color 0.2s;
	font-family: inherit;
}

.qf-input:focus {
	border-color: var(--ln-primary);
}

.qf-textarea {
	resize: vertical;
	min-height: 76px;
}

.qf-status {
	min-height: 16px;
	font-size: 12px;
	color: var(--ln-mid);
}

.qf-status.is-success {
	color: #16a34a;
}

.qf-status.is-error {
	color: #dc2626;
}

.qf-submit {
	display: block;
	width: 100%;
	padding: 14px;
	background: var(--ln-primary);
	color: var(--ln-white);
	text-align: center;
	font-size: 14px;
	font-weight: 700;
	border: none;
	border-radius: var(--ln-radius-sm);
	cursor: pointer;
	transition: background 0.2s;
	margin-top: 4px;
}

.qf-submit:hover {
	background: var(--ln-primary-dark);
}

.qf-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Erfolgs-Panel (ersetzt nach dem Absenden das Formular). Basis-Optik;
   Farben/Typografie/Ausrichtung sind im Quote-Drawer-Widget stylebar. */
.qf-success {
	padding: 40px 28px;
	text-align: center;
	overflow-y: auto;
}

.qf-success__msg {
	font-size: 16px;
	line-height: 1.6;
	color: var(--ln-dark);
	margin-bottom: 22px;
}

.qf-success__close {
	display: inline-block;
	padding: 12px 28px;
	background: var(--ln-primary);
	color: var(--ln-white);
	font-size: 14px;
	font-weight: 700;
	border: none;
	border-radius: var(--ln-radius-sm);
	cursor: pointer;
	transition: background 0.2s;
}

.qf-success__close:hover {
	background: var(--ln-primary-dark);
}
