/**
 * KSW Geräteliste & Anfrage – Re-Skin der NATIVEN YITH-Anfrageseite
 * (die Seite hinter "Weiter zur Anfrage", z. B. /angebotsanfrage/).
 *
 * Diese Seite wird komplett von YITH Request a Quote gerendert – wir
 * greifen hier NICHT in die PHP-Templates ein, sondern passen nur per CSS
 * Optik/Layout an, damit es zum Rest des Auftritts passt. Selektoren sind
 * die offiziellen YITH-Klassen/IDs (Free & Premium identisch aufgebaut).
 *
 * Wird nur auf der YITH-Anfrageseite selbst geladen (siehe ksw-geraeteliste.php).
 */

:root {
	--ksw-yith-primary: #1c4e80;
	--ksw-yith-primary-hover: #163d64;
	--ksw-yith-accent: #f39c12;
	--ksw-yith-text: #2b2b2b;
	--ksw-yith-text-muted: #6b7280;
	--ksw-yith-border: #e2e5ea;
	--ksw-yith-bg: #ffffff;
	--ksw-yith-bg-head: #f5f7fa;
	--ksw-yith-bg-alt: #fafbfc;
	--ksw-yith-radius: 6px;
}

/* Grundschrift auf der Anfrageseite vereinheitlichen */
.ywraq_list_empty_message,
.return-to-shop,
#yith-ywrq-table-list,
#yith-ywraq-mail-form,
.yith-ywraq-totals {
	font-size: 14px;
	color: var(--ksw-yith-text);
}

/* ---------- Leere Liste ---------- */
.ywraq_list_empty_message {
	display: block;
	background: var(--ksw-yith-bg-alt);
	border: 1px solid var(--ksw-yith-border);
	border-radius: var(--ksw-yith-radius);
	padding: 18px 20px;
	margin: 0 0 16px;
	color: var(--ksw-yith-text-muted);
}

.return-to-shop {
	margin: 0 0 32px;
}

.return-to-shop .button,
.return-to-shop .wc-backward {
	display: inline-block;
	background: var(--ksw-yith-primary);
	color: #fff !important;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	padding: 11px 20px;
	border-radius: var(--ksw-yith-radius);
	transition: background 0.15s ease;
}

.return-to-shop .button:hover,
.return-to-shop .wc-backward:hover {
	background: var(--ksw-yith-primary-hover);
	color: #fff !important;
}

/* ---------- Positionstabelle ---------- */
#yith-ywrq-table-list,
table.shop_table.cart {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--ksw-yith-bg);
	border: 1px solid var(--ksw-yith-border);
	border-radius: var(--ksw-yith-radius);
	overflow: hidden;
	margin: 0 0 24px;
}

#yith-ywrq-table-list thead th,
table.shop_table.cart thead th {
	background: var(--ksw-yith-bg-head);
	text-align: left;
	font-size: 13px;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-weight: 600;
	padding: 10px 16px;
	border-bottom: 1px solid var(--ksw-yith-border);
}

/* Menge-Spalte: Kopf und Zelle mittig ausrichten und schmal halten,
   statt über die volle Restbreite zu strecken (Standard-YITH-Verhalten). */
#yith-ywrq-table-list th.product-quantity,
table.shop_table.cart th.product-quantity,
#yith-ywrq-table-list td.product-quantity,
table.shop_table.cart td.product-quantity {
	width: 110px;
	text-align: center;
}

#yith-ywrq-table-list tbody td,
table.shop_table.cart tbody td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--ksw-yith-border);
	font-size: 14px;
	vertical-align: middle;
}

#yith-ywrq-table-list tbody tr:last-child td,
table.shop_table.cart tbody tr:last-child td {
	border-bottom: none;
}

#yith-ywrq-table-list tbody tr:hover,
table.shop_table.cart tbody tr:hover {
	background: var(--ksw-yith-bg-alt);
}

#yith-ywrq-table-list .product-name a,
table.shop_table.cart .product-name a {
	color: var(--ksw-yith-primary);
	font-weight: 600;
	text-decoration: none;
}

#yith-ywrq-table-list .product-name a:hover,
table.shop_table.cart .product-name a:hover {
	text-decoration: underline;
}

#yith-ywrq-table-list .product-thumbnail img,
table.shop_table.cart .product-thumbnail img {
	border-radius: var(--ksw-yith-radius);
	max-width: 64px;
	height: auto;
}

/* Mengenfeld */
#yith-ywrq-table-list input.qty,
table.shop_table.cart input.qty,
#yith-ywrq-table-list .product-quantity input[type="number"],
table.shop_table.cart .product-quantity input[type="number"] {
	width: 60px;
	height: 34px;
	border: 1px solid var(--ksw-yith-border);
	border-radius: var(--ksw-yith-radius);
	text-align: center;
	font-size: 14px;
	padding: 0 4px;
	/* Native Browser-Spin-Buttons (die kurz aufblitzenden +/- Pfeile) konsequent
	   ausblenden, statt sie erst nach dem Laden per Theme-CSS verschwinden zu
	   lassen - das verhindert das kurze Aufblitzen/Flackern beim Laden. */
	-moz-appearance: textfield;
}

#yith-ywrq-table-list input.qty::-webkit-outer-spin-button,
#yith-ywrq-table-list input.qty::-webkit-inner-spin-button,
table.shop_table.cart input.qty::-webkit-outer-spin-button,
table.shop_table.cart input.qty::-webkit-inner-spin-button,
#yith-ywrq-table-list .product-quantity input[type="number"]::-webkit-outer-spin-button,
#yith-ywrq-table-list .product-quantity input[type="number"]::-webkit-inner-spin-button,
table.shop_table.cart .product-quantity input[type="number"]::-webkit-outer-spin-button,
table.shop_table.cart .product-quantity input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Entfernen-Link (×) */
#yith-ywrq-table-list a.yith-ywraq-item-remove,
table.shop_table.cart a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	color: var(--ksw-yith-text-muted) !important;
	text-decoration: none !important;
	font-size: 16px;
	line-height: 1;
}

#yith-ywrq-table-list a.yith-ywraq-item-remove:hover,
table.shop_table.cart a.remove:hover {
	background: #fdeceb;
	color: #c0392b !important;
}

/* Update-/Absenden-Buttons unterhalb der Tabelle */
#yith-ywrq-table-list ~ p .button,
.yith-ywraq-actions .button,
#yith-ywraq-form button[type="submit"],
#yith-ywraq-form input[type="submit"] {
	background: var(--ksw-yith-primary);
	color: #fff;
	border: none;
	border-radius: var(--ksw-yith-radius);
	padding: 11px 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

#yith-ywrq-table-list ~ p .button:hover,
.yith-ywraq-actions .button:hover,
#yith-ywraq-form button[type="submit"]:hover,
#yith-ywraq-form input[type="submit"]:hover {
	background: var(--ksw-yith-primary-hover);
}

/* ---------- Anfrage-Formular (Name / E-Mail / Nachricht) ---------- */
#yith-ywraq-mail-form {
	max-width: 640px;
	background: var(--ksw-yith-bg);
	border: 1px solid var(--ksw-yith-border);
	border-radius: var(--ksw-yith-radius);
	padding: 24px;
}

#yith-ywraq-mail-form label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--ksw-yith-text);
}

#yith-ywraq-mail-form .input-text,
#yith-ywraq-mail-form input[type="text"],
#yith-ywraq-mail-form input[type="email"],
#yith-ywraq-mail-form input[type="tel"],
#yith-ywraq-mail-form textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--ksw-yith-border);
	border-radius: var(--ksw-yith-radius);
	font-size: 14px;
	color: var(--ksw-yith-text);
	background: var(--ksw-yith-bg);
	margin-bottom: 16px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#yith-ywraq-mail-form .input-text:focus,
#yith-ywraq-mail-form input:focus,
#yith-ywraq-mail-form textarea:focus {
	outline: none;
	border-color: var(--ksw-yith-primary);
	box-shadow: 0 0 0 3px rgba(28, 78, 128, 0.12);
}

#yith-ywraq-mail-form button[type="submit"],
#yith-ywraq-mail-form input[type="submit"] {
	background: var(--ksw-yith-accent);
	color: #fff;
	border: none;
	border-radius: var(--ksw-yith-radius);
	padding: 12px 22px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

#yith-ywraq-mail-form button[type="submit"]:hover,
#yith-ywraq-mail-form input[type="submit"]:hover {
	opacity: 0.9;
}

/* ---------- Responsive: Tabelle auf Mobile als Karten ---------- */
@media (max-width: 720px) {
	#yith-ywrq-table-list thead,
	table.shop_table.cart thead {
		display: none;
	}

	#yith-ywrq-table-list,
	#yith-ywrq-table-list tbody,
	#yith-ywrq-table-list tr,
	#yith-ywrq-table-list td,
	table.shop_table.cart,
	table.shop_table.cart tbody,
	table.shop_table.cart tr,
	table.shop_table.cart td {
		display: block;
		width: 100%;
	}

	#yith-ywrq-table-list tr,
	table.shop_table.cart tr {
		padding: 12px 16px;
		border-bottom: 1px solid var(--ksw-yith-border);
	}

	#yith-ywrq-table-list td,
	table.shop_table.cart td {
		border: none;
		padding: 6px 0;
	}
}
