/* ==========================================================================
   deintextil – kosár, pénztár, visszaigazolás (DT_Checkout)
   A téma (Elementor) oldal-CSS-e !important szabályokkal dolgozik, ezért itt :not(#dt) + !important.
   ========================================================================== */

/* ---------- Kosár: a mennyiség mezőbe bele lehet írni ---------- */
.elementor-widget-woocommerce-cart td.product-quantity input.qty:not(#dt) { pointer-events: auto !important; cursor: text; -moz-appearance: textfield; }
.elementor-widget-woocommerce-cart td.product-quantity input.qty:not(#dt):focus { outline: none; background: var(--dt-soft); }
.elementor-widget-woocommerce-cart td.product-quantity input.qty::-webkit-outer-spin-button,
.elementor-widget-woocommerce-cart td.product-quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Pénztár-összesítő: szállítási mód kártyaként (ha a csempék nem látszanak, pl. csak egy mód van) ----------
   A sor két sorra törik: felül „Versand”, alatta teljes szélességben a kártyák. */
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals:not(#dt) { flex-wrap: wrap !important; row-gap: 10px; }
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals > :is(th, td):not(#dt) { flex: 0 0 100% !important; width: 100% !important; max-width: none !important; text-align: left !important; }

.woocommerce-checkout-review-order-table #shipping_method:not(#dt) { display: grid; gap: 8px; margin: 0 !important; padding: 0 !important; list-style: none !important; }
.woocommerce-checkout-review-order-table #shipping_method li:not(#dt) { position: relative; margin: 0 !important; padding: 0 !important; list-style: none !important; }
.woocommerce-checkout-review-order-table #shipping_method li::marker { content: none; }
/* the real radio stays focusable for keyboard / screen readers, the card draws the visual radio */
.woocommerce-checkout-review-order-table #shipping_method input.shipping_method:not(#dt) { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; margin: 0 !important; opacity: 0; cursor: pointer; z-index: 1; }
.woocommerce-checkout-review-order-table #shipping_method label:not(#dt) {
	display: flex !important; align-items: center; gap: 12px; width: 100%; margin: 0 !important; padding: 13px 14px !important;
	border: 1px solid var(--dt-line-strong) !important; border-radius: 14px !important; background: #fff !important;
	font-family: var(--dt-font); font-size: 14px !important; font-weight: 500 !important; line-height: 1.3 !important;
	letter-spacing: 0 !important; text-transform: none !important; white-space: normal !important; text-align: left !important; color: var(--dt-text) !important;
	cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.woocommerce-checkout-review-order-table #shipping_method label:not(#dt)::before {
	content: ""; flex: 0 0 auto; width: 16px; height: 16px; box-sizing: border-box; border: 1.5px solid #9EA3A6; border-radius: 999px; background: #fff; transition: border .15s ease;
}
.woocommerce-checkout-review-order-table #shipping_method li:hover label:not(#dt) { border-color: var(--dt-dark) !important; }
.woocommerce-checkout-review-order-table #shipping_method input:checked + label:not(#dt),
.woocommerce-checkout-review-order-table #shipping_method input[type="hidden"] + label:not(#dt) { border-color: var(--dt-dark) !important; background: #F7FCDD !important; }
.woocommerce-checkout-review-order-table #shipping_method input:checked + label:not(#dt)::before { border: 5px solid var(--dt-dark); }
.woocommerce-checkout-review-order-table #shipping_method input[type="hidden"] + label:not(#dt)::before { display: none; } /* only one method: nothing to choose */
.woocommerce-checkout-review-order-table #shipping_method input:focus-visible + label:not(#dt) { outline: 2px solid var(--dt-dark); outline-offset: 2px; }
.dt-ship__name { flex: 1 1 auto; min-width: 0; }
.dt-ship__price { flex: 0 0 auto; font-weight: 600; white-space: nowrap; }
.dt-ship__price .woocommerce-Price-amount:not(#dt) { font-size: 14px !important; font-weight: 600 !important; color: var(--dt-text) !important; }

/* ---------- Pénztár: „Lieferung an eine andere Adresse senden?” ---------- */
.woocommerce-shipping-fields[hidden] { display: none !important; }
#ship-to-different-address label:not(#dt) { display: inline-flex !important; align-items: center; gap: 10px; cursor: pointer; }
#ship-to-different-address label span:not(#dt) { font-family: var(--dt-font); font-size: 14px !important; font-weight: 500 !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--dt-text) !important; }
#ship-to-different-address input[type="checkbox"]:not(#dt) { width: 18px; height: 18px; margin: 0 !important; accent-color: var(--dt-dark); }

/* ---------- Pénztár: kupon-panel (a JS animálja a magasságot) ---------- */
.e-coupon-box .e-coupon-anchor { box-sizing: border-box; }

/* ---------- Visszaigazolás: telefon és e-mail egyforma sor ---------- */
.woocommerce-customer-details :is(.woocommerce-customer-details--phone, .woocommerce-customer-details--email):not(#dt) {
	position: relative !important; display: flex !important; align-items: center !important; gap: 10px !important;
	margin-left: 0 !important; padding-left: 0 !important; text-indent: 0 !important;
}
.woocommerce-customer-details :is(.woocommerce-customer-details--phone, .woocommerce-customer-details--email):not(#dt)::before {
	position: static !important; inset: auto !important; flex: 0 0 auto; margin: 0 !important; transform: none !important;
}

/* ---------- Kosár: szállítás helyett egy rövid sor ---------- */
.cart_totals .dt-ship-note__txt { font-size: 14px; font-weight: 400; color: var(--dt-muted); }

/* ---------- Pénztár: Versandart csempék (a „Rechnungsdetails” kártya stílusában) ---------- */
.dt-ship-tiles[hidden] { display: none !important; }
.dt-ship-tiles { box-sizing: border-box; margin: 0 0 20px; border: 1px solid #1D2023; border-radius: 30px; background: #fff; font-family: var(--dt-font); color: var(--dt-text); }
.dt-ship-tiles .dt-ship-tiles__title:not(#dt) { margin: 0; padding: 20px 22px; border-bottom: 1px solid #E0E0E0; font-family: var(--dt-font); font-size: 20px; font-weight: 800; line-height: 1.2; letter-spacing: -.4px; text-transform: uppercase; color: var(--dt-text); }
.dt-ship-tiles__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 20px 22px 22px; transition: opacity .2s ease; }
.dt-ship-tiles.is-busy .dt-ship-tiles__grid { opacity: .7; pointer-events: none; }
.dt-ship-tiles .dt-ship-tile:not(#dt) {
	position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "icon . check" "name name name" "hint hint hint" "price price price";
	align-items: start; gap: 0; width: 100%; min-height: 0; margin: 0; padding: 18px; box-sizing: border-box;
	border: 1px solid var(--dt-line-strong); border-radius: 20px; background: #fff; color: var(--dt-text);
	font-family: var(--dt-font); text-align: left; text-transform: none; letter-spacing: 0; box-shadow: none; cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.dt-ship-tiles .dt-ship-tile:not(#dt):hover { border-color: var(--dt-dark); background: #fff; color: var(--dt-text); }
.dt-ship-tiles .dt-ship-tile[aria-checked="true"]:not(#dt) { border-color: var(--dt-dark); background: #F7FCDD; }
.dt-ship-tiles .dt-ship-tile:not(#dt):focus-visible { outline: 2px solid var(--dt-dark); outline-offset: 3px; }
.dt-ship-tile__icon { grid-area: icon; width: 44px; height: 44px; border-radius: 12px; background: var(--dt-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; transition: background-color .15s ease; }
.dt-ship-tile[aria-checked="true"] .dt-ship-tile__icon { background: var(--dt-accent); }
.dt-ship-tile__check { grid-area: check; width: 24px; height: 24px; box-sizing: border-box; border: 1.5px solid #B9BBB4; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: transparent; transition: background-color .15s ease, border-color .15s ease; }
.dt-ship-tile[aria-checked="true"] .dt-ship-tile__check { border-color: var(--dt-dark); background: var(--dt-dark); color: var(--dt-accent); }
.dt-ship-tile__name:not(#dt) { grid-area: name; font-size: 16px; font-weight: 600; line-height: 1.25; }
.dt-ship-tile__hint:not(#dt) { grid-area: hint; margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--dt-muted); }
.dt-ship-tile__price:not(#dt) { grid-area: price; margin-top: 12px; font-size: 15px; font-weight: 600; }
.dt-ship-tile__price .woocommerce-Price-amount:not(#dt) { font-size: inherit !important; font-weight: inherit !important; color: inherit !important; }

/* a csempék mellett az összesítőben csak a választott mód, sima sorként */
form.checkout:has(.dt-ship-tiles:not([hidden])) .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals:not(#dt) { flex-wrap: nowrap !important; }
form.checkout:has(.dt-ship-tiles:not([hidden])) .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals > :is(th, td):not(#dt) { flex: 1 1 auto !important; width: auto !important; }
form.checkout:has(.dt-ship-tiles:not([hidden])) .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals > td:not(#dt) { text-align: right !important; }
form.checkout:has(.dt-ship-tiles:not([hidden])) .woocommerce-checkout-review-order-table #shipping_method li:not(:has(input:checked)):not(#dt) { display: none !important; }
form.checkout:has(.dt-ship-tiles:not([hidden])) .woocommerce-checkout-review-order-table #shipping_method label:not(#dt) { display: inline-flex !important; justify-content: flex-end; gap: 8px; width: auto; padding: 0 !important; border: 0 !important; background: transparent !important; }
form.checkout:has(.dt-ship-tiles:not([hidden])) .woocommerce-checkout-review-order-table #shipping_method label:not(#dt)::before { display: none; }
form.checkout:has(.dt-ship-tiles:not([hidden])) .woocommerce-checkout-review-order-table .dt-ship__name { flex: 0 1 auto; }

@media (max-width: 767px) {
	.dt-ship-tiles { border-radius: 24px; }
	.dt-ship-tiles__grid { grid-template-columns: minmax(0, 1fr); padding: 16px; }
	.dt-ship-tiles .dt-ship-tile:not(#dt) { min-width: 0; }
	.dt-ship-tile__hint:not(#dt), .dt-ship-tile__name:not(#dt) { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
	.dt-ship-tiles .dt-ship-tile:not(#dt) { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "icon name check" "icon hint check" "icon price check"; column-gap: 14px; padding: 14px 16px; }
	.dt-ship-tile__icon { grid-row: 1 / span 3; margin-bottom: 0; align-self: center; }
	.dt-ship-tile__check { align-self: center; grid-row: 1 / span 3; }
	.dt-ship-tile__price:not(#dt) { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) { .dt-ship-tiles .dt-ship-tile:not(#dt), .dt-ship-tiles__grid { transition: none; } }

/* ---------- Kosár: „Weiter einkaufen” – Shop + Schulkollektion ---------- */
.dt-continue { margin-top: 14px; font-family: var(--dt-font); }
.dt-continue__t { display: block; margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dt-muted); text-align: center; }
.dt-continue__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; } /* két gomb egymás mellett, ha elfér; különben egymás alatt */
.wc-proceed-to-checkout .dt-continue__btn:not(#dt) {
	display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; margin: 0; padding: 0 14px; box-sizing: border-box;
	border: 1px solid #1D2023; border-radius: 999px; background: #fff; color: #1D2023;
	font-family: var(--dt-font); font-size: 14px; font-weight: 500; line-height: 1.2; text-align: center; text-decoration: none; text-transform: none; letter-spacing: 0;
	transition: background-color .18s ease, transform .18s ease;
}
.wc-proceed-to-checkout .dt-continue__btn:not(#dt):hover { background: var(--dt-accent); color: #1D2023; transform: translateY(-1px); }
.wc-proceed-to-checkout .dt-continue__btn:not(#dt):focus-visible { outline: 2px solid var(--dt-dark); outline-offset: 2px; }
.dt-continue__i { display: inline-flex; transition: transform .18s ease; }
.dt-continue__btn:hover .dt-continue__i { transform: translateX(-2px); }

/* Cart page: item details collapse into "Auswahl & Details" (dt-cart.js) – same look as in the cart flyout */
.woocommerce-cart-form .dt-item-details { margin: 6px 0 0; font-family: var(--dt-font); font-size: 13px; line-height: 1.5; }
.woocommerce-cart-form .dt-item-details > summary:not(#dt) {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 2px 0; list-style: none; cursor: pointer;
	color: #636857; font-size: 13px; font-weight: 400;
	-webkit-tap-highlight-color: transparent;
}
.woocommerce-cart-form .dt-item-details > summary::-webkit-details-marker { display: none; }
.woocommerce-cart-form .dt-item-details > summary::before {
	content: ""; width: 0; height: 0;
	border-style: solid; border-width: 4.5px 0 4.5px 7px; border-color: transparent transparent transparent currentColor;
	transition: transform .18s ease;
}
.woocommerce-cart-form .dt-item-details[open]:not(.is-closing) > summary::before { transform: rotate(90deg); }
.woocommerce-cart-form .dt-item-details > summary:hover { color: var(--dt-text); }
.woocommerce-cart-form .dt-item-details > summary:focus-visible { outline: 2px solid var(--dt-dark); outline-offset: 2px; border-radius: 4px; }
.woocommerce-cart-form .dt-item-details dl.variation:not(#dt) {
	display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 12px;
	margin: 8px 0 4px; padding: 0;
	color: #61655b;
}
.woocommerce-cart-form .dt-item-details dl.variation :is(dt, dd):not(#dt) { float: none; clear: none; margin: 0; padding: 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.woocommerce-cart-form .dt-item-details dl.variation dt:not(#dt) { font-weight: 400; color: #73786a; }
.woocommerce-cart-form .dt-item-details dl.variation dd:not(#dt) { color: var(--dt-text); }
.woocommerce-cart-form .dt-item-details dl.variation dd p:not(#dt) { margin: 0; }

/* Checkout ≤1100px: one column that may shrink below its content's width (plain 1fr grew to ~370px on phones
   and pushed the right edge past the page gutter) */
@media (max-width: 1100px) {
	.elementor-widget-woocommerce-checkout-page .e-checkout__container:not(#dt) { grid-template-columns: minmax(0, 1fr) !important; }
	.elementor-widget-woocommerce-checkout-page :is(.e-checkout__column, .e-checkout__column-inner):not(#dt) { min-width: 0; max-width: 100%; }
}
/* the details box always contains its children's margins → same height during and after the animation */
.woocommerce-cart-form .dt-item-details { display: flow-root; }

/* Checkout: "Lieferung an eine andere Adresse" – same card look as the billing / notes boxes */
.woocommerce-checkout .woocommerce-shipping-fields #ship-to-different-address:not(#dt) { margin: 20px 0 16px; padding-left: 22px; }
.woocommerce-checkout .woocommerce-shipping-fields .shipping_address:not(#dt) {
	box-sizing: border-box;
	margin: 0 0 20px; padding: 22px;
	border: 1px solid #1D2023; border-radius: 30px;
	background: #fff;
}
@media (max-width: 767px) {
	.woocommerce-checkout .woocommerce-shipping-fields #ship-to-different-address:not(#dt) { padding-left: 18px; }
	.woocommerce-checkout .woocommerce-shipping-fields .shipping_address:not(#dt) { padding: 18px; }
}
