/* yens-ux mobile.css (Hermes 26 Nov 2026). Loaded sitewide after the theme. */

/* WooCommerce notices: the theme's padding:14px 18px !important put WooCommerce's ::before icon on top of the first words
   ("Silakan pilih Kecamatan.", "link reset kata sandi telah dikirim"). Room for the icon wherever woocommerce.css (the icon) loads. */
.woocommerce-page .woocommerce-error, .woocommerce-page .woocommerce-info, .woocommerce-page .woocommerce-message,
.woocommerce-account .woocommerce-error, .woocommerce-account .woocommerce-info, .woocommerce-account .woocommerce-message {
  position: relative !important; padding-left: 46px !important;
}
.woocommerce-page .woocommerce-error::before, .woocommerce-page .woocommerce-info::before, .woocommerce-page .woocommerce-message::before,
.woocommerce-account .woocommerce-error::before, .woocommerce-account .woocommerce-info::before, .woocommerce-account .woocommerce-message::before {
  left: 16px !important; top: 15px !important;
}

/* Location helper: the empty status line showed as an empty blue box (theme styles every <p>); buttons touched. */
.yens-ux-status:empty { display: none !important; }
.yens-ux-location .yens-ux-locate { margin-bottom: 8px !important; }

/* Kecamatan (KiriminAja select2): full text wraps instead of "Jawa B…", big clear-× target. */
.select2-selection--single:has([id*="kiriof_destination_area-container"]), .select2-selection--single:has([id*="kiriof_shipping_destination_area-container"]) { height: auto !important; min-height: 44px; }
[id^="select2-"][id*="kiriof"][id$="destination_area-container"] { white-space: normal !important; line-height: 1.35 !important; padding-top: 10px !important; padding-bottom: 10px !important; overflow: visible !important; text-overflow: clip !important; }
[id^="select2-"][id*="kiriof"][id$="destination_area-container"] .select2-selection__clear { font-size: 22px; line-height: 1; padding: 10px 12px; margin: -10px -6px -10px 4px; }

/* Shipping options: the promo note under the price. */
.yens-cp-ship-note del { opacity: .8; }

/* Toast (add to cart, cart errors) */
.yux-toast { position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 99999; max-width: 480px; margin: 0 auto;
  padding: 12px 14px; border-radius: 14px; background: #0f5132; color: #fff; font: 600 14px/1.4 Inter, system-ui, sans-serif; box-shadow: 0 10px 30px #0003;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s; }
.yux-toast.show { opacity: 1; transform: none; pointer-events: auto; }
.yux-toast.bad { background: #9f1239; }
.yux-toast a { color: #fff; text-decoration: underline; white-space: nowrap; }

/* Cart quantity stepper (all sizes) */
.yux-stepper { display: inline-flex; align-items: center; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; overflow: hidden; }
.yux-step { width: 44px; height: 44px; border: 0; background: #f8fafc; color: #0f172a; font: 600 20px/1 system-ui, sans-serif; cursor: pointer; padding: 0; }
.yux-step:active { background: #e2e8f0; }
.yux-stepper input.qty { width: 44px !important; height: 44px !important; min-height: 44px; border: 0 !important; border-radius: 0 !important; text-align: center; padding: 0 !important; margin: 0 !important; font-size: 16px; -moz-appearance: textfield; box-shadow: none !important; }
.yux-stepper input.qty::-webkit-outer-spin-button, .yux-stepper input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.yux-qty-fixed { display: inline-block; font-weight: 700; } .yux-qty-fixed small { font-weight: 500; color: #be123c; }
.woocommerce-cart-form button[name="update_cart"] { display: none !important; }
tr.yux-ship-est small { display: block; font-size: 12px; color: #64748b; font-weight: 500; }

/* Points test row (staff only): label was missing on phones (":" only) */
.shop_table_responsive tr.yens-points-test th { display: block !important; border: 0 !important; padding-bottom: 0 !important; }
.shop_table_responsive tr.yens-points-test td::before { content: none !important; }

/* Product page sticky add-to-cart (phones only, shown while the real button is off screen) */
#yux-sticky-atc { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9980; display: flex; align-items: center; gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid #e2e8f0; box-shadow: 0 -6px 20px #0f172a14; }
#yux-sticky-atc[hidden] { display: none; }
#yux-sticky-atc .yux-sa-price { flex: 1; min-width: 0; font: 800 17px/1.2 Inter, system-ui, sans-serif; color: #0f172a; }
#yux-sticky-atc .yux-sa-price del { font-size: 12px; font-weight: 500; color: #94a3b8; display: block; }
#yux-sticky-atc .yux-sa-price ins { text-decoration: none; }
#yux-sticky-atc .yens-cp-line { display: none !important; }
#yux-sticky-atc .yux-sa-btn { min-height: 48px; padding: 0 20px; border: 0; border-radius: 14px; background: #0984e3; color: #fff; font: 700 15px/1 Inter, system-ui, sans-serif; cursor: pointer; }
body.yux-sa-on { padding-bottom: 76px; }
body.yux-sa-on .yens-floating-cs-btn { bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
.single_add_to_cart_button.loading { opacity: .6; }

@media (max-width: 768px) {
  /* Header stack: Flash Deal bar one line; it replaces the shipping strip; no "Geser untuk kategori" hint line. */
  #yens-fd-bar { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 7px 12px !important; font-size: 12.5px !important; }
  #yens-fd-bar ~ #page .yens-top-strip { display: none !important; }
  .yens-navbar::before { display: none !important; content: none !important; }

  /* Cart rows: thumb | name + unit price + stepper | bin, subtotal right. Was ~520 px per item. */
  .woocommerce-cart-form table.cart thead { display: none !important; }
  .woocommerce-cart-form table.cart tr.cart_item { display: grid !important; grid-template-columns: 64px 1fr auto; grid-template-areas: "img name rm" "img price price" "img qty sub";
    column-gap: 12px; row-gap: 6px; align-items: center; padding: 12px !important; border-bottom: 1px solid #e5e7eb; background: #fff !important; }
  .woocommerce-cart-form table.cart tr.cart_item td { display: block !important; border: 0 !important; padding: 0 !important; text-align: left !important; background: none !important; min-height: 0 !important; }
  .woocommerce-cart-form table.cart tr.cart_item td::before { content: none !important; display: none !important; }
  .woocommerce-cart-form table.cart td.product-thumbnail { grid-area: img; align-self: start; }
  .woocommerce-cart-form table.cart td.product-thumbnail img { width: 64px !important; height: 64px !important; max-width: none !important; object-fit: cover; border-radius: 10px; }
  .woocommerce-cart-form table.cart td.product-name { grid-area: name; font-size: 14px; line-height: 1.35; font-weight: 600; }
  .woocommerce-cart-form table.cart td.product-name a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .woocommerce-cart-form table.cart td.product-price { grid-area: price; font-size: 13px; color: #64748b; }
  .woocommerce-cart-form table.cart td.product-quantity { grid-area: qty; }
  .woocommerce-cart-form table.cart td.product-subtotal { grid-area: sub; text-align: right !important; font-weight: 800; }
  .woocommerce-cart-form table.cart td.product-remove { grid-area: rm; justify-self: end; align-self: start; }
  .woocommerce-cart-form table.cart a.remove { width: 44px !important; height: 44px !important; display: flex !important; align-items: center; justify-content: center;
    font-size: 26px !important; line-height: 1 !important; border-radius: 50% !important; margin: -8px -8px 0 0; }
}

/* KiriminAja courier rows: the promo note gets its own full-width line instead of a squeezed third column. */
label.kiriof-shipping-method-label { flex-wrap: wrap !important; }
label.kiriof-shipping-method-label .yens-cp-ship-note { flex: 0 0 100% !important; order: 9; width: 100%; margin-top: 2px; }

/* Kecamatan clear-×: the select2 arrow sat on top of it, so on iPhone the tap opened the list instead of clearing. */
.select2-container .select2-selection--single .select2-selection__arrow { pointer-events: none; }
[id^="select2-"][id*="kiriof"][id$="destination_area-container"] .select2-selection__clear { position: relative; z-index: 3; }
