/* ==========================================================
   Cser Kiadó – blokkos Kosár és Pénztár (kozmetikai felülírások).
   A .wc-block-* osztálynevek nem nyilvános API-k: a szabályok csak
   színt, lekerekítést és térközt állítanak, szerkezetet nem.
   ========================================================== */

/* A szabályok a Popshop/Hokishop sablon közös blokkos pénztár-stílusából származnak; a
   színek, betűk és lekerekítések itt a Cser Kiadó változóira képeződnek le. */
body.woocommerce-cart,
body.woocommerce-checkout {
  --accent: var(--brand-teal);
  --accent-light: var(--brand-teal-light);
  --ink: var(--text-main);
  --ink-2: var(--text-muted);
  --line: var(--border-color);
  --surface: var(--bg-card);
  --surface-2: var(--bg-subtle);
  --font-ui: var(--font-body);
  --radius-xs: 2px;
  --radius-pill: 999px;
  --dur-fast: 0.15s;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
}

.wp-block-woocommerce-cart.alignwide,
.wp-block-woocommerce-checkout.alignwide {
  max-width: none;
  margin-inline: 0;
}

.wc-block-cart,
.wc-block-checkout {
  font-family: var(--font-ui);
  color: var(--ink);
}

/* Címsorok */
.wc-block-cart .wc-block-components-title,
.wc-block-checkout .wc-block-components-title,
.wc-block-components-checkout-step__title,
.wc-block-components-sidebar .wc-block-components-title,
.wc-block-cart__totals-title {
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.wc-block-components-checkout-step__title {
  font-size: var(--fs-md);
}

.wc-block-components-checkout-step__description {
  color: var(--ink-2);
  font-size: var(--fs-sm);
}

/* Mezők */
.wc-block-components-text-input input[type='text'],
.wc-block-components-text-input input[type='email'],
.wc-block-components-text-input input[type='tel'],
.wc-block-components-text-input input[type='url'],
.wc-block-components-text-input input[type='number'],
.wc-blocks-components-select__select,
.wc-block-components-textarea,
.wc-block-components-combobox .components-combobox-control__input {
  min-height: 52px;
  border: 1.5px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px !important;
  box-shadow: none !important;
}

.wc-block-components-text-input.is-active input[type='text'],
.wc-block-components-text-input.is-active input[type='email'],
.wc-block-components-text-input.is-active input[type='tel'],
.wc-block-components-text-input input:focus,
.wc-blocks-components-select__select:focus,
.wc-block-components-textarea:focus,
.wc-block-components-combobox.is-active .components-combobox-control__input {
  border-color: var(--ink) !important;
  box-shadow: 0 0 0 3px rgba(13, 13, 13, 0.12) !important;
}

.wc-block-components-text-input label,
.wc-blocks-components-select__label,
.wc-block-components-combobox label {
  color: var(--ink-2);
  font-family: var(--font-ui);
}

.wc-block-components-text-input.has-error input,
.wc-block-components-validation-error p {
  border-color: var(--accent);
  color: var(--accent);
}

.wc-block-components-validation-error {
  font-size: var(--fs-xs);
}

/* Rádió-kártyák (szállítás, fizetés) */
.wc-block-components-radio-control {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.wc-block-components-radio-control .wc-block-components-radio-control__option,
.wc-block-components-radio-control .wc-block-components-radio-control-accordion-option,
.wc-block-components-radio-control-accordion-option {
  min-height: 60px;
  padding: var(--space-3) var(--space-4) var(--space-3) 52px;
  border: 1.5px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  margin-bottom: 0;
  background: var(--surface);
  font-family: var(--font-ui);
  transition: border-color var(--dur-fast), background-color var(--dur-fast);
}

.wc-block-components-radio-control__option::after,
.wc-block-components-radio-control-accordion-option::after {
  display: none;
}

.wc-block-components-radio-control__option--checked,
.wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.wc-block-components-radio-control__option:has(input:checked) {
  border-color: var(--ink) !important;
  background: var(--surface-2);
}

.wc-block-components-radio-control__input {
  left: 16px;
  width: 20px;
  height: 20px;
  border-color: var(--line);
  accent-color: var(--accent);
}

.wc-block-components-radio-control__input:checked {
  border-color: var(--accent);
}

.wc-block-components-radio-control__input:checked::before {
  background: var(--accent);
}

.wc-block-components-radio-control__label,
.wc-block-components-radio-control__label-group {
  font-weight: 600;
  color: var(--ink);
}

.wc-block-components-radio-control__description,
.wc-block-components-radio-control__secondary-description {
  color: var(--ink-2);
  font-size: var(--fs-xs);
}

.wc-block-components-radio-control__secondary-label {
  font-weight: 700;
}

.wc-block-components-radio-control-accordion-content {
  padding: var(--space-3) var(--space-4) var(--space-4);
  border: 1.5px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  margin-top: calc(-1 * var(--space-2));
  background: var(--surface);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}

/* Mennyiség léptető a kosárban */
.wc-block-components-quantity-selector {
  margin: 0;
  width: auto;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.wc-block-components-quantity-selector::after {
  display: none;
}

.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
  min-width: 40px;
  height: 40px;
  color: var(--ink);
  opacity: 1;
}

.wc-block-components-quantity-selector .wc-block-components-quantity-selector__input {
  min-width: 36px;
  height: 40px;
  font-weight: 600;
  font-family: var(--font-ui);
}

/* Kosár sorok */
.wc-block-cart-items {
  font-family: var(--font-ui);
}

.wc-block-cart-items__header {
  display: none;
}

.wc-block-cart-item__wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.wc-block-cart-items .wc-block-cart-item__image img {
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.wc-block-components-product-name {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.wc-block-components-product-metadata,
.wc-block-components-product-details {
  font-size: var(--fs-xs);
  color: var(--ink-2);
}

.wc-block-components-product-details__name {
  font-weight: 600;
}

.wc-block-cart-item__remove-link,
.wc-block-cart-item__remove-link:hover {
  font-size: var(--fs-xs);
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wc-block-cart-item__total .wc-block-components-product-price,
.wc-block-cart-item__prices .wc-block-components-product-price {
  font-weight: 700;
}

.wc-block-components-sale-badge {
  background: var(--accent);
  color: var(--surface);
  border: 0;
  border-radius: var(--radius-xs);
  font-weight: 700;
}

/* Oldalsáv: összesítő kártya */
.wc-block-components-sidebar.wc-block-cart__sidebar,
.wc-block-components-sidebar.wc-block-checkout__sidebar {
  padding: 0;
}

.wc-block-cart__sidebar .wc-block-cart__totals-title {
  display: none;
}

.wc-block-components-totals-wrapper,
.wc-block-components-order-summary {
  border-color: var(--line);
}

.wc-block-cart__sidebar > .wc-block-components-totals-wrapper,
.wc-block-cart__sidebar > .wc-block-components-totals-coupon,
.wc-block-cart__sidebar .wc-block-cart__payment-options,
.wc-block-checkout__sidebar .wc-block-components-totals-wrapper,
.wc-block-checkout__sidebar .wc-block-components-order-summary {
  background: var(--surface);
}

.is-large .wc-block-cart__sidebar,
.is-large .wc-block-checkout__sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  box-shadow: var(--shadow-sm);
}

.wc-block-components-totals-item {
  font-size: var(--fs-sm);
}

.wc-block-components-totals-item__label {
  color: var(--ink-2);
  font-weight: 500;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ink);
}

.wc-block-components-totals-footer-item-tax {
  font-size: var(--fs-xs);
  color: var(--ink-2);
}

.wc-block-components-shipping-rates-control__package .wc-block-components-radio-control__option {
  min-height: 52px;
}

/* Gombok */
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
.wc-block-components-totals-coupon__button {
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-weight: 700;
}

.wc-block-components-checkout-place-order-button {
  min-height: 56px;
  font-size: var(--fs-md);
}

.wc-block-components-totals-coupon__button {
  min-height: 50px;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.wc-block-components-totals-coupon__button:hover {
  background: var(--ink);
  color: var(--surface);
}

.wc-block-components-totals-coupon-link,
.wc-block-components-panel__button,
.wc-block-components-checkout-return-to-cart-button {
  color: var(--ink);
  font-family: var(--font-ui);
}

.wc-block-components-panel__button {
  font-weight: 600;
}

/* Checkbox */
.wc-block-components-checkbox .wc-block-components-checkbox__input[type='checkbox'] {
  border-color: var(--line);
  border-radius: 6px;
  width: 22px;
  height: 22px;
}

.wc-block-components-checkbox .wc-block-components-checkbox__input[type='checkbox']:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.wc-block-components-checkbox__mark {
  width: 14px;
}

.wc-block-components-checkbox__label {
  font-size: var(--fs-sm);
}

/* Cím-kártya ("Szerkesztés") */
.wc-block-components-address-card {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-sm);
}

.wc-block-components-address-card__edit {
  color: var(--ink);
  font-weight: 600;
}

/* Értesítések */
.wc-block-components-notice-banner {
  border-radius: var(--radius-sm);
  border-width: 1px;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
}

.wc-block-components-notice-banner.is-error {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* Üres kosár */
.wc-block-cart__empty-cart__title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--fs-xl);
}

.wp-block-woocommerce-empty-cart-block .wp-block-button__link,
.wc-block-cart__empty-cart__button {
  border-radius: var(--radius-md);
}

.wp-block-woocommerce-empty-cart-block .wp-block-heading {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--fs-lg);
}

/* Kapcsolódó termékek a kosárban (product-collection) */
.wc-block-cart .wp-block-woocommerce-product-collection {
  margin-top: var(--space-6);
}

.wc-block-cart .wp-block-woocommerce-product-collection .wp-block-heading {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--fs-lg);
}

.wc-block-cart .wp-block-woocommerce-product-template > li,
.wc-block-cart .wc-block-product {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
}

.wc-block-cart .wc-block-components-product-image img {
  border-radius: var(--radius-sm);
}

.wc-block-cart .wp-block-post-title {
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 500;
}

/* Mobil: rendelés-összesítő lenyíló */
.wc-block-components-order-summary__button-text {
  font-family: var(--font-ui);
  font-weight: 600;
}

/* Betöltési váz magasságok, hogy ne ugráljon */
.wc-block-components-skeleton {
  border-radius: var(--radius-sm);
}

/* Express fizetés (WooPayments) doboz */
.wc-block-components-express-payment {
  border-radius: var(--radius-md);
  border-color: var(--line);
}

.wc-block-components-express-payment__title {
  font-family: var(--font-ui);
}

/* GLS csomagautomata doboz a pénztárban: a plugin saját stílusához igazítás */
.wc-block-checkout .hgls-box {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Kosár: szállítási mód csak a pénztárban; adótartalom sehol */
.wc-block-cart .wp-block-woocommerce-cart-order-summary-shipping-block,
.wc-block-components-totals-footer-item .wc-block-components-totals-footer-item-tax,
.wc-block-components-totals-footer-item-tax,
.wc-block-components-totals-taxes,
.wp-block-woocommerce-cart-order-summary-taxes-block,
.wp-block-woocommerce-checkout-order-summary-taxes-block {
  display: none !important;
}

/* Fizetési módok: a harmonika-opción belül nincs második keret */
.wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option,
.wc-block-components-radio-control .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent;
  min-height: 0;
  padding-block: var(--space-2);
}

/* Pénztár: fiók létrehozása pipa, belépés link */
.wc-block-checkout__create-account,
.wc-block-checkout__guest-checkout-notice {
  margin-top: var(--space-3);
}

.wc-block-checkout__guest-checkout-notice {
  font-size: var(--fs-sm);
  color: var(--ink-2);
}

.wc-block-checkout__login-prompt,
.wc-block-checkout__login-prompt a,
.wc-block-components-checkout-step__heading-content a {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wc-block-components-checkout-step__heading {
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ÁSZF elfogadás: a jogi oldalak linkjei felismerhetők legyenek */
.wc-block-checkout__terms a {
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

/* Megjegyzés a pénztár fölött (pl. e-könyvnél nincs utánvét). */
.cser-ebook-payment-note--block {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-size: var(--fs-sm);
}
