/* Zamówienie (ekran „Koszyk” makiety): karty kroków, pola Woo, dostawa i płatność
 * jako kafle-radio, ciemne podsumowanie. Pola i metody pochodzą z WooCommerce
 * i wtyczek (InPost, DPD, PayU) - tu tylko wygląd. */

.fm-co-head { padding-top: 56px; padding-bottom: 28px; }
/* Dwie kolumny na sztywno: WooCommerce wstrzykuje blok z błędami jako
   pierwsze dziecko <form class="fm-co">, a przy auto-fit robił z niego
   trzecią kolumnę i rozjeżdżał kasę. Teraz błędy idą na całą szerokość. */
.fm-co { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; padding-bottom: 24px; }
.fm-co > .woocommerce-NoticeGroup { grid-column: 1 / -1; order: -1; }
.fm-co__main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fm-co__side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 88px; min-width: 0; }
.admin-bar .fm-co__side { top: 120px; }
.fm-co-card { background: #fff; border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.fm-co-card--16 { gap: 16px; }
.fm-co-card__h { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.fm-co-emptyw { padding-bottom: 24px; }
.fm-co-emptyw .fm-co-card { max-width: 668px; }
.fm-co-empty { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 10px 0; font-size: 15px; line-height: 1.5; }

/* 1. Koszyk */
[data-fm-co-cart] { display: flex; flex-direction: column; }
.fm-line { display: flex; gap: 14px 16px; align-items: center; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.fm-line.is-busy { opacity: 0.5; pointer-events: none; }
.fm-line__img { width: 76px; height: 76px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; flex: none; }
.fm-line__c { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 200px; }
.fm-line__n { font-size: 15px; font-weight: 700; line-height: 1.3; text-wrap: pretty; }
.fm-line__v { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.fm-line__rm { cursor: pointer; border: none; background: transparent; padding: 0; width: fit-content; font-size: 12px; font-weight: 700; color: var(--red); }
.fm-line__r { display: flex; align-items: center; gap: 14px; flex: 0 1 auto; margin-left: auto; }
.fm-line__sum { font-family: var(--mono); font-size: 15px; font-weight: 700; flex: none; min-width: 84px; text-align: right; }
.fm-upsell { border-top: 1px solid var(--line-soft); padding-top: 16px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.fm-upsell img { width: 56px; height: 56px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; flex: none; }
.fm-upsell__c { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 160px; }
.fm-upsell__n { font-size: 14px; font-weight: 700; }
.fm-upsell__p { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.fm-upsell__b { cursor: pointer; border: 1px solid var(--ink); background: #fff; border-radius: 100px; padding: 11px 18px; font-size: 13px; font-weight: 700; }
.fm-upsell__b:hover { background: var(--ink); color: #fff; }

/* 2. Dane */
.fm-co-social { display: flex; gap: 10px; flex-wrap: wrap; }
.fm-co-social__b { flex: 1 1 150px; border: 1px solid var(--line); background: #fff; border-radius: 100px; padding: 13px 16px; font-size: 14px; font-weight: 700; text-align: center; line-height: normal; }
.fm-theme .fm-co-social__b:hover { border-color: var(--ink); color: var(--ink); }
.fm-co-fields h3, .fm-co-fields #ship-to-different-address label { font-size: 15px; font-weight: 700; }
.fm-co-fields .woocommerce-billing-fields > h3 { display: none; }
.fm-co-fields .woocommerce-billing-fields__field-wrapper, .fm-co-fields .woocommerce-shipping-fields__field-wrapper, .fm-co-fields .woocommerce-account-fields .create-account:not(p) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.fm-co-fields .form-row { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; width: auto; float: none; }
.fm-co-fields .form-row-wide, .fm-co-fields #billing_country_field, .fm-co-fields #billing_address_1_field { grid-column: 1 / -1; }
.fm-co-fields .form-row label { font-size: 13px; font-weight: 700; line-height: normal; margin: 0; }
.fm-co-fields .form-row label .required { color: var(--ink); text-decoration: none; border: 0; }
.fm-co-fields .form-row label .optional { font-weight: 400; color: var(--muted-2); }
.fm-theme .fm-co-fields .input-text, .fm-theme .fm-co-fields select, .fm-theme .fm-co-fields textarea { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; outline: none; background: #fff; color: var(--ink); box-shadow: none; height: auto; line-height: normal; }
.fm-theme .fm-co-fields .input-text:focus, .fm-theme .fm-co-fields select:focus { border-color: var(--ink); }
.fm-co-fields .woocommerce-invalid .input-text { border-color: var(--red); }
.fm-co-fields .select2-container .select2-selection--single { height: 50px; border: 1px solid var(--line); border-radius: 12px; }
.fm-co-fields .select2-container .select2-selection--single .select2-selection__rendered { line-height: 48px; padding-left: 16px; }
.fm-co-fields .select2-container .select2-selection--single .select2-selection__arrow { height: 48px; }
.fm-co-fields .fm-invoice-field { display: none; }
.fm-co-fields.is-invoice .fm-invoice-field { display: flex; }
.fm-co-fields .woocommerce-account-fields, .fm-co-fields .woocommerce-shipping-fields { margin-top: 12px; }
.fm-co-fields .woocommerce-shipping-fields h3 { margin: 0 0 12px; }
.fm-co-fields #ship-to-different-address { margin: 0; }

/* Własne pola wyboru (faktura, konto, zgoda) */
.fm-check { display: flex; gap: 12px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 14px 16px; cursor: pointer; margin: 12px 0 0; position: relative; }
.fm-check:has(input:checked) { border-color: var(--ink); background: var(--paper); }
.fm-check input { position: absolute; opacity: 0; pointer-events: none; }
.fm-check__box { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: transparent; background: #fff; }
.fm-check input:checked + .fm-check__box { background: var(--ink); color: #fff; }
.fm-check__t { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.fm-check__t span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.fm-co-fields .woocommerce-form__label-for-checkbox { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 700; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.fm-co-fields .woocommerce-form__label-for-checkbox:has(input:checked) { border-color: var(--ink); background: var(--paper); }
.fm-co-fields .woocommerce-form__label-for-checkbox input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }

/* 3. Dostawa - natywna lista Woo jako kafle */
.fm-co-ship ul#shipping_method, .fm-co-ship .woocommerce-shipping-methods { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fm-co-ship ul#shipping_method li { position: relative; margin: 0; padding: 15px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; cursor: pointer; }
.fm-co-ship ul#shipping_method li:has(input:checked), .fm-co-ship ul#shipping_method li:only-child { background: var(--paper); border-color: var(--ink); }
.fm-co-ship ul#shipping_method li > input { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); margin: 0; background: #fff; cursor: pointer; }
.fm-co-ship ul#shipping_method li > input:checked { background: var(--ink); box-shadow: inset 0 0 0 3px #fff; }
.fm-co-ship ul#shipping_method li > input[type="hidden"] + label { padding-left: 0; }
.fm-co-ship ul#shipping_method li > label { flex: 1 1 auto; display: flex; align-items: center; gap: 12px; min-width: 0; margin: 0; cursor: pointer; font-size: 15px; font-weight: 700; line-height: normal; }
.fm-ship__c { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.fm-ship__eta { font-size: 13px; color: var(--muted); font-weight: 400; }
.fm-ship__p { font-family: var(--mono); font-size: 14px; font-weight: 700; flex: none; margin-left: auto; }
.fm-co-ship ul#shipping_method li > label + * { flex-basis: 100%; }
.fm-co-ship li button, .fm-co-ship li .button, .fm-co-ship li input[type="button"] { cursor: pointer; border: none; background: var(--ink); color: #fff; border-radius: 100px; padding: 12px 18px; font-size: 13px; font-weight: 700; }
.fm-co-ship li .button:hover, .fm-co-ship li button:hover { background: var(--red); }
.fm-co-ship .woocommerce-shipping-destination, .fm-co-ship .woocommerce-shipping-contents { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

/* Wybór punktu odbioru (InPost, ORLEN). Wtyczki wstrzykują własny markup pod
   listę metod. Tło przycisku InPost przychodzi inline z !important (kolor z
   ustawień wtyczki), więc go nie ruszamy - poprawiamy tylko czytelność (biały
   tekst na żółtym miał kontrast 1,8) i kształt: pigułka na pełną szerokość. */
.fm-co-ship .easypack_show_geowidget,
.fm-co-ship .orlen-paczka-widget-button,
.fm-co-ship [class*="orlen"][class*="select-point"] {
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: none;
	margin: 10px 0 0;
	padding: 15px 20px;
	border: 0;
	border-radius: 100px;
	color: var(--ink);
	font-size: 14px;
	font-weight: 700;
	line-height: normal;
	text-align: center;
	transition: filter 200ms ease;
}
.fm-co-ship .easypack_show_geowidget:hover,
.fm-co-ship .orlen-paczka-widget-button:hover { filter: brightness(0.94); }
.fm-co-ship #selected-parcel-machine { margin-top: 10px; padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--ink); font-size: 14px; line-height: 1.5; }
.fm-co-ship .easypack-visible-point-header { font-family: var(--mono); font-size: 11px; font-style: normal; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.fm-co-ship .easypack-visible-point-description { display: block; margin-top: 4px; }

/* 4. Płatność */
.fm-pay { background: transparent; border-radius: 0; }
.fm-pay__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.fm-pay__i { position: relative; margin: 0; padding: 16px; border-radius: 12px; display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); cursor: pointer; }
.fm-pay__i:has(> input:checked) { background: var(--paper); border-color: var(--ink); grid-column: 1 / -1; }
.fm-pay__i > input { position: absolute; opacity: 0; pointer-events: none; }
.fm-pay__i > label { display: flex; flex-direction: column; gap: 4px; margin: 0; cursor: pointer; }
.fm-pay__i > label::after { content: ""; position: absolute; inset: 0; }
.fm-pay__i:has(> input:checked) > label::after { display: none; }
.fm-pay__t { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fm-pay__t img { max-height: 22px; width: auto; }
.fm-pay__s { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.fm-pay .payment_box { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--body); background: transparent; padding: 0; position: relative; z-index: 1; }
.fm-pay .payment_box::before { display: none; }
.fm-pay .payment_box p:last-child { margin-bottom: 0; }

/* Podsumowanie */
.fm-sum { background: var(--ink); color: #fff; border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.fm-sum__h { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.fm-sum__rows { display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.fm-sum__r { display: flex; justify-content: space-between; gap: 12px; }
.fm-sum__r > span:first-child { color: var(--on-dark); }
.fm-sum__v { font-family: var(--mono); font-weight: 700; }
.fm-sum__r.is-disc, .fm-sum__r.is-disc > span:first-child { color: var(--sage); }
.fm-sum__r.is-disc a { color: var(--sage); margin-left: 4px; }
.fm-sum__sep { height: 1px; background: rgba(255, 255, 255, 0.14); }
.fm-sum__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.fm-sum__total > span:first-child { font-size: 15px; font-weight: 700; }
.fm-sum__tv { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.fm-sum__free { display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.4; color: var(--on-dark); }
.fm-sum__track { height: 6px; border-radius: 100px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.fm-sum__track span { display: block; height: 100%; background: var(--sage); border-radius: 100px; }
.fm-sum__coupon { display: flex; gap: 8px; flex-wrap: wrap; }
.fm-theme .fm-sum__coupon input { flex: 1 1 120px; min-width: 0; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 100px; background: transparent; color: #fff; font-family: var(--mono); font-size: 13px; outline: none; text-transform: uppercase; height: auto; box-shadow: none; }
.fm-sum__coupon input::placeholder { color: var(--muted-2); }
.fm-sum__coupon button { cursor: pointer; padding: 12px 18px; border: 1px solid #fff; background: transparent; color: #fff; border-radius: 100px; font-size: 13px; font-weight: 700; }
.fm-sum__coupon button:hover { background: #fff; color: var(--ink); }
.fm-sum__cmsg { flex-basis: 100%; font-size: 12px; color: var(--sage); }
.fm-sum__cmsg.is-err { color: #ff9aa7; }
.fm-sum__terms { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--on-dark); cursor: pointer; position: relative; margin: 0; }
.fm-sum__terms input { position: absolute; opacity: 0; pointer-events: none; }
.fm-sum__tbox { flex: none; width: 18px; height: 18px; border-radius: 5px; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: transparent; margin-top: 1px; }
.fm-sum__terms input:checked + .fm-sum__tbox { background: var(--sage); border-color: var(--sage); color: var(--ink); }
.fm-sum__terms a, .fm-sum__legal a { color: #fff; text-decoration: underline; }
.fm-sum__legal { font-size: 12px; line-height: 1.45; color: var(--on-dark); }
.fm-sum__btn { cursor: pointer; border: none; border-radius: 100px; background: var(--sage); color: var(--ink); padding: 18px 24px; font-size: 16px; font-weight: 700; transition: background 200ms; }
.fm-sum__btn:hover { background: #fff; }
.fm-sum__trust { font-family: var(--mono); font-size: 11px; color: var(--muted-2); line-height: 1.5; text-align: center; letter-spacing: 0.04em; }

/* Komunikaty Woo */
.fm-theme .woocommerce-error, .fm-theme .woocommerce-message, .fm-theme .woocommerce-info { list-style: none; margin: 0 0 14px; padding: 14px 18px; border-radius: 12px; font-size: 14px; line-height: 1.5; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.fm-theme .woocommerce-error { border-color: var(--red); color: var(--red); }
.fm-theme .woocommerce-message { border-color: var(--sage); background: rgba(188, 212, 167, 0.3); color: var(--sage-ink); }
.fm-theme .woocommerce-error li + li { margin-top: 4px; }
.fm-theme .woocommerce-NoticeGroup:empty { display: none; }

/* Podziękowanie */
.fm-thanks { padding-top: 56px; display: flex; flex-direction: column; gap: 14px; }
.fm-thanks__hero { background: #fff; border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.fm-thanks__hero p { font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 70ch; }
.fm-thanks__facts { display: flex; gap: 28px; flex-wrap: wrap; padding-top: 6px; }
.fm-thanks__facts > span { display: flex; flex-direction: column; gap: 4px; border-top: 2px solid var(--ink); padding-top: 10px; }
.fm-thanks__facts > span > span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.fm-thanks__details { background: #fff; border-radius: 20px; padding: 26px; font-size: 15px; }
.fm-thanks__details:empty { display: none; }
.fm-thanks__details h2 { font-size: 20px; margin: 18px 0 10px; }
.fm-thanks__details table { width: 100%; border-collapse: collapse; }
.fm-thanks__details th, .fm-thanks__details td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }

/* Sklep wysyła do Polski: kraj i województwo zostają w formularzu (Woo ich wymaga),
 * ale nie zajmują miejsca w kroku „Dane”. */
.fm-co-fields #billing_country_field, .fm-co-fields #billing_state_field,
.fm-co-fields #shipping_country_field, .fm-co-fields #shipping_state_field { display: none; }
