/* ==========================================================================
   Pasek darmowej dostawy (Flexible Shipping) — koszyk i zamówienie
   --------------------------------------------------------------------------
   Wtyczka Flexible Shipping wstrzykuje pasek przez wc_add_notice( ..., 'notice' ),
   więc trafia on do kontenera .woocommerce-info (Shoptimizer: niebieskie tło
   #3d9cd2, biały tekst, biała ramka paska postępu). Poniższe reguły osadzają go
   w identyfikacji wizualnej AliFlori, bez kopiowania szablonu wtyczki.

   Kontener rozpoznajemy po zawartości (:has), aby nie ruszać pozostałych
   notyfikacji WooCommerce. Brak wsparcia :has() oznacza wygląd domyślny motywu.

   Wtyczka wyświetla ten komunikat wyłącznie, gdy do progu brakuje kwoty
   (po osiągnięciu progu pasek znika), dlatego całość jest pomarańczowa —
   kolor sygnalizuje pilność i zachęca do uzupełnienia koszyka.
   ========================================================================== */

.woocommerce-info:has(.fs-free-shipping-notice-and-button-wrapper) {
	margin-top: 20px;
	margin-bottom: 20px;
	padding: 14px 20px;
	border: 1px solid var(--aliflori-ember-border);
	border-radius: var(--aliflori-radius-card);
	box-shadow: none;
	color: var(--aliflori-text);
	background-color: var(--aliflori-ember-soft);
	font-family: var(--aliflori-font-body);
	font-size: 0.95rem;
}

/* WooCommerce core dokłada do notyfikacji ikonę w ::before — niepotrzebna tutaj. */
.woocommerce-info:has(.fs-free-shipping-notice-and-button-wrapper)::before {
	content: none;
}

/* Kwota brakująca do progu: ciemny pomarańcz zamiast białego tekstu. */
.woocommerce-info:has(.fs-free-shipping-notice-and-button-wrapper) .fs-free-shipping-notice-text .amount,
.woocommerce-info:has(.fs-free-shipping-notice-and-button-wrapper) .fs-free-shipping-notice-text strong {
	color: var(--aliflori-ember-deep);
	font-family: var(--aliflori-font-heading);
	font-weight: 600;
}

/* Tor paska postępu: jasny, z pomarańczową ramką. */
.woocommerce-info:has(.fs-free-shipping-notice-and-button-wrapper) .fs-free-shipping-notice-progress-bar {
	height: 10px;
	border: 1px solid var(--aliflori-ember-border);
	border-radius: var(--aliflori-radius-pill);
	background-color: var(--aliflori-white);
}

/* Wypełnienie: pomarańczowy (pilność). */
.woocommerce-info:has(.fs-free-shipping-notice-and-button-wrapper) .fs-free-shipping-notice-progress-bar > span {
	border-radius: var(--aliflori-radius-pill);
	background-color: var(--aliflori-ember);
}

.woocommerce-info:has(.fs-free-shipping-notice-and-button-wrapper) .fs-free-shipping-notice-opening-value,
.woocommerce-info:has(.fs-free-shipping-notice-and-button-wrapper) .fs-free-shipping-notice-closing-value {
	color: var(--aliflori-text-muted);
	font-size: 0.8rem;
	white-space: nowrap;
}

/* „Kontynuuj zakupy” jako link tekstowy — nie konkuruje z CTA „Przejdź do kasy”.
   border-left-color motywu nadrzędnego jest oznaczony !important, dlatego tutaj
   również wymaga !important; pozostałe właściwości wygrywają specyficznością. */
.woocommerce-info:has(.fs-free-shipping-notice-and-button-wrapper) a.button.flexible-shipping-free-shipping-button,
.woocommerce-info:has(.fs-free-shipping-notice-and-button-wrapper) a.button.flexible-shipping-free-shipping-button:hover {
	float: none;
	min-height: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 0;
	opacity: 1;
	color: var(--aliflori-primary-hover);
	background: none;
	box-shadow: none;
	font-family: var(--aliflori-font-body);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.woocommerce-info:has(.fs-free-shipping-notice-and-button-wrapper) a.button.flexible-shipping-free-shipping-button:hover {
	color: var(--aliflori-primary);
}

.woocommerce-info:has(.fs-free-shipping-notice-and-button-wrapper) a.button.flexible-shipping-free-shipping-button:focus-visible {
	outline: 2px solid var(--aliflori-primary);
	outline-offset: 3px;
}

@media (max-width: 600px) {
	.woocommerce-info:has(.fs-free-shipping-notice-and-button-wrapper) .fs-free-shipping-notice-and-button-wrapper {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.woocommerce-info:has(.fs-free-shipping-notice-and-button-wrapper) .fs-free-shipping-notice-text-and-progress-bar-wrapper,
	.woocommerce-info:has(.fs-free-shipping-notice-and-button-wrapper) .fs-free-shipping-notice-continue-shopping-button-wrapper {
		width: 100%;
		margin: 0;
	}
}
