/* Woo DruckAdmin – Flyeralarm-Konfigurator (Frontend) */

/* ── Container ─────────────────────────────────────────────────────────────── */

form.cart.wda-fa-form {
	display: block !important;
	width: 100%;
	max-width: 100%;
	clear: both;
}

form.cart.wda-fa-form::after {
	content: "";
	display: table;
	clear: both;
}

form.cart.wda-fa-form > * {
	box-sizing: border-box;
}

.wda-fa-configurator {
	margin: 1.5em 0 1em;
	padding: 1.25em 1.5em;
	width: 100%;
	max-width: 100%;
	background: #fff8f0;
	border: 1px solid #f0c070;
	border-radius: 6px;
	box-sizing: border-box;
}

.wda-fa-configurator.wda-fa-loading {
	color: #888;
	font-style: italic;
}

/* ── Attribute-Zeilen ───────────────────────────────────────────────────────── */

.wda-fa-attrs {
	display: flex;
	flex-direction: column;
	gap: 0.75em;
}

.wda-fa-attr-row {
	display: flex;
	align-items: center;
	gap: 1em;
}

.wda-fa-label {
	min-width: 140px;
	font-weight: 600;
	font-size: 0.9em;
	color: #333;
	flex-shrink: 0;
}

.wda-fa-select {
	flex: 1;
	max-width: 360px;
	padding: 0.45em 0.7em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.95em;
	background: #fff;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
}

.wda-fa-select:focus {
	outline: 2px solid #e8821e;
	outline-offset: 1px;
	border-color: #e8821e;
}

/* ── Dropdown-Zustände (wie im Screenshot) ──────────────────────────────────── */

/* Gewählt → grüner Hintergrund */
.wda-fa-select.wda-fa-select--selected {
	background-color: #edfaef;
	border-color: #82c98f;
	color: #1a5c30;
}

/* Erwartet Eingabe → rosé/pink Hintergrund */
.wda-fa-select.wda-fa-select--required {
	background-color: #fff0f0;
	border-color: #f5a0a0;
}

/* Deaktiviert → ausgegraut */
.wda-fa-select:disabled {
	background-color: #f5f5f5;
	border-color: #e0e0e0;
	color: #aaa;
	cursor: not-allowed;
	opacity: 1; /* Browser-Standard überschreiben */
}

/* ── Preistabelle ────────────────────────────────────────────────────────────── */

.wda-fa-pricing-wrap {
	margin: 1.25em 0 0.5em;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	clear: both;
}

.wda-fa-price-table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
	font-size: 0.88em;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
}

.wda-fa-price-table thead tr {
	background: #f5f5f5;
}

.wda-fa-price-table th {
	padding: 0.6em 0.9em;
	text-align: left;
	font-weight: 600;
	color: #444;
	border-bottom: 1px solid #ddd;
	white-space: nowrap;
}

.wda-fa-price-table td {
	padding: 0.55em 0.9em;
	border-bottom: 1px solid #f0f0f0;
	color: #333;
	vertical-align: middle;
}

.wda-fa-price-table tbody tr:last-child td {
	border-bottom: none;
}

.wda-fa-price-table tbody tr:hover {
	background: #fffaf3;
}

.wda-fa-tier-selected {
	background: #fff3e0 !important;
	outline: 2px solid #e8821e;
	outline-offset: -2px;
}

.wda-fa-price-gross {
	font-weight: 600;
	color: #c0392b;
}

.wda-fa-select-btn {
	font-size: 0.82em !important;
	padding: 0.3em 0.8em !important;
	white-space: nowrap;
	cursor: pointer;
	position: relative;
	z-index: 2;
	pointer-events: auto;
}

/* ── Zusammenfassung ─────────────────────────────────────────────────────────── */

.wda-fa-summary {
	margin: 0.75em 0;
	padding: 0.65em 1em;
	width: 100%;
	max-width: 100%;
	background: #edfaef;
	border: 1px solid #b8e6c4;
	border-radius: 4px;
	font-size: 0.95em;
	color: #1a5c30;
	min-height: 0;
}

.wda-fa-summary:empty {
	display: none;
}

/* ── Lade- und Fehlermeldungen ───────────────────────────────────────────────── */

.wda-fa-loading-text {
	margin: 0;
	color: #888;
	font-style: italic;
	font-size: 0.9em;
}

.wda-fa-error {
	margin: 0.5em 0;
	color: #c0392b;
	font-size: 0.9em;
}

/* ── Verstecktes WC-Mengenfeld ───────────────────────────────────────────────── */

.wda-fa-qty-hidden {
	display: none !important;
}

form.cart.wda-fa-form .quantity {
	display: none !important;
}

/* ── Preishinweis (ersetzt WC-Preis auf FA-Produktseiten) ───────────────────── */

.wda-fa-price-info {
	font-size: 0.95em;
	color: #888;
	font-style: italic;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */

@media ( max-width: 600px ) {
	.wda-fa-attr-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.3em;
	}

	.wda-fa-label {
		min-width: unset;
	}

	.wda-fa-select {
		max-width: 100%;
		width: 100%;
	}

	.wda-fa-price-table th,
	.wda-fa-price-table td {
		padding: 0.5em 0.5em;
		font-size: 0.82em;
	}

	form.cart.wda-fa-form button.wda-fa-submit {
		width: 100%;
	}
}

/* ── Cart-Button Zustände ──────────────────────────────────────────────────── */

/* Disabled: sichtbar aber ausgegraut mit Hinweistext */
button.wda-fa-submit[disabled] {
	opacity: 0.45;
	cursor: not-allowed !important;
}

form.cart.wda-fa-form button.wda-fa-submit {
	position: static !important;
	float: none !important;
	clear: both;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: auto;
	max-width: 100%;
	margin-top: 0.75em;
	pointer-events: auto;
	z-index: 1;
}

/* Aktiviert: leichte Hervorhebung damit der Nutzer es bemerkt */
button.wda-fa-submit:not([disabled]) {
	animation: wda-btn-ready 0.4s ease;
}

@keyframes wda-btn-ready {
	0%   { transform: scale(1);    box-shadow: none; }
	50%  { transform: scale(1.04); box-shadow: 0 0 0 4px rgba(0,0,0,0.12); }
	100% { transform: scale(1);    box-shadow: none; }
}

/* Preistabellen-Zeile: ganzer Bereich klickbar */
.wda-fa-tier-row {
	cursor: pointer;
}

.wda-fa-tier-row:hover {
	background: #fffaf3;
}
