/*
 * Urban Pets - mobile UX pass v1 (2026-09-20)
 * Destination on server: /home/urbanpets/public_html/online/catalog/view/javascript/urbanpets-mobile-ux.css
 *
 * EVERY rule below requires html.up-ux, a class that urbanpets-mobile-ux.js adds
 * (and only when the visitor has not switched it off with ?ux=off). Each feature
 * additionally needs its own html.up-f-<name> class, set in FEATURES at the top
 * of the JS file. Mobile-only rules use html.mobile-header-active, Journal's own
 * "phone/tablet layout is in use" class.
 *
 * Full revert: system/storage/backup_urbanpets/mobile_ux_20260920/revert.sh
 */

/* Elements created by the script stay hidden outside the mobile layout. */
.up-trust,
.up-price-top { display: none; }

/* ------------------------------------------------------------------
   Product page: price + delivery/payment facts near the top
   ------------------------------------------------------------------ */
html.up-ux.up-f-pricetop.mobile-header-active .up-price-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin: 0 20px 12px;
  padding: 0;
}
html.up-ux.up-f-pricetop.mobile-header-active .up-pt-now {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: #333;
}
html.up-ux.up-f-pricetop.mobile-header-active .up-pt-old {
  font-size: 16px;
  color: #888;
  text-decoration: line-through;
}
html.up-ux.up-f-pricetop.mobile-header-active .up-pt-unit {
  font-size: 13px;
  font-style: italic;
  color: #666;
}
/* Less dead space above the title, slightly smaller title so it wraps less. */
html.up-ux.up-f-pricetop.mobile-header-active.route-product-product h1.page-title {
  margin-top: 6px;
  padding-top: 10px;
  font-size: 22px;
  line-height: 1.25;
}

html.up-ux.up-f-trust.mobile-header-active .up-trust {
  display: block;
  margin: 10px 0 6px;
  padding: 9px 12px;
  background: #f4f8ee;
  border-left: 3px solid #8cc63f;
  font-size: 13px;
  line-height: 1.5;
  color: #2f4a1d;
}
html.up-ux.up-f-trust.mobile-header-active .up-trust span {
  display: block;
  padding-left: 18px;
  position: relative;
}
html.up-ux.up-f-trust.mobile-header-active .up-trust span::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: #4b9a1a;
}

/* ------------------------------------------------------------------
   Product page: sticky add-to-cart bar (bigger targets, price on button)
   ------------------------------------------------------------------ */
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page .stepper,
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page .stepper input.form-control {
  height: 46px;
}
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page .btn {
  min-height: 46px;
}
/* One row that never wraps: on 360px phones the two groups needed 352px of 340px. The buy button absorbs the difference. */
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page .buttons-wrapper,
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page .stepper-group,
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page .wishlist-compare {
  flex-wrap: nowrap;
}
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page .stepper-group {
  flex: 1 1 auto;
  min-width: 0;
}
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page .wishlist-compare {
  flex: 0 0 auto;
}
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page #button-cart {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
}
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page .stepper,
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page .btn-extra {
  flex: 0 0 auto;
}
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page .btn-wishlist,
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page .btn-compare {
  min-width: 40px;
  padding-left: 8px;
  padding-right: 8px;
  justify-content: center;
}
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page #button-cart {
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page #button-cart .btn-text[data-up-price]::after {
  content: attr(data-up-price);
  display: block;
  margin-top: 1px;
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}
/* "Imate pitanja?" stays available on buyable products but no longer looks like a second buy button. */
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page .btn-extra {
  min-width: 44px;
  background: #fff;
  border: 1px solid #c9d2dc;
  color: #55677a;
}
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page .btn-extra::before,
html.up-ux.up-f-sticky.mobile-header-active .product-info:not(.hide-cart) .button-group-page .btn-extra .btn-text {
  color: #55677a;
}

/* Shipping-cost estimator: outline instead of a second solid navy button. */
html.up-ux.up-f-shipbtn.mobile-header-active #estimate-xshipping {
  background: #fff;
  color: #0f3a8d;
  border: 1px solid #0f3a8d;
}

/* ------------------------------------------------------------------
   Listings: larger wishlist/compare tap areas on product cards
   ------------------------------------------------------------------ */
html.up-ux.up-f-cards.mobile-header-active .product-layout .buttons-wrapper .btn-wishlist,
html.up-ux.up-f-cards.mobile-header-active .product-layout .buttons-wrapper .btn-compare {
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ------------------------------------------------------------------
   Mobile mini-cart panel (the slide-in "Vasa korpa"): Journal builds it with an
   EMPTY nested div.cart-content that its CSS stretches to ~800px, which pushes the
   product list below the visible area (only totals + buttons showed). Hide only
   that empty element (:empty = no children and no text, so real content is never hidden).
   ------------------------------------------------------------------ */
html.up-ux.up-f-minicart.mobile-header-active .mobile-cart-content-wrapper > .cart-content:empty {
  display: none;
}

/* ------------------------------------------------------------------
   Checkout
   ------------------------------------------------------------------ */
html.up-ux.up-f-checkoutui.mobile-header-active.route-checkout-checkout .checkout-section input.form-control,
html.up-ux.up-f-checkoutui.mobile-header-active.route-checkout-checkout .checkout-section select.form-control {
  height: 46px;
  min-height: 46px;
  flex-shrink: 0;
  font-size: 16px;
}
html.up-ux.up-f-checkoutui.mobile-header-active.route-checkout-checkout .checkout-section input[type="radio"],
html.up-ux.up-f-checkoutui.mobile-header-active.route-checkout-checkout .checkout-section input[type="checkbox"] {
  transform: scale(1.35);
  transform-origin: left center;
}
/* Room for the enlarged control: 13px * 1.35 is about 18px wide, the label only reserved 20px. */
html.up-ux.up-f-checkoutui.mobile-header-active.route-checkout-checkout .checkout-section label.up-choice {
  padding-left: 30px;
}
/* The input's "left" is auto (it follows the label padding), so pin it to the label's left edge. */
html.up-ux.up-f-checkoutui.mobile-header-active.route-checkout-checkout .checkout-section label.up-choice > input[type="radio"],
html.up-ux.up-f-checkoutui.mobile-header-active.route-checkout-checkout .checkout-section label.up-choice > input[type="checkbox"] {
  left: 0;
  margin-left: 0;
}
html.up-ux.up-f-checkoutui.mobile-header-active.route-checkout-checkout .checkout-section .radio label,
html.up-ux.up-f-checkoutui.mobile-header-active.route-checkout-checkout .checkout-section .checkbox label {
  font-size: 14px;
  padding-top: 7px;
  padding-bottom: 7px;
}
/* The floating "back to top" arrow sat on top of the cart's quantity/remove buttons. */
html.up-ux.up-f-checkoutui.mobile-header-active.route-checkout-checkout .scroll-top {
  display: none !important;
}

/* Coupon block: collapsed to one tappable row until opened (opens by itself if a code is present). */
.up-cvr-toggle { display: none; }
html.up-ux.up-f-coupon.mobile-header-active.route-checkout-checkout .section-cvr.up-collapsed .section-body,
html.up-ux.up-f-coupon.mobile-header-active.route-checkout-checkout .section-cvr.up-collapsed .up-cvr-title {
  display: none;
}
html.up-ux.up-f-coupon.mobile-header-active.route-checkout-checkout .section-cvr.up-collapsed .up-cvr-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  padding: 0 4px;
  margin: 0;
  background: none;
  border: 0;
  font-size: 14px;
  color: #0f3a8d;
  text-align: left;
  cursor: pointer;
}
html.up-ux.up-f-coupon.mobile-header-active.route-checkout-checkout .section-cvr.up-collapsed .up-cvr-toggle b {
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

/* ------------------------------------------------------------------
   Cart table (checkout AND cart page): on a phone it was 557-602px wide
   inside a ~320-350px scroll box, so price and total were off-screen.
   Reflow each line into a small card instead. The cart page names the
   product cell td-name, the checkout names it td-product.
   ------------------------------------------------------------------ */
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive { overflow-x: visible; border: 0; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive > table,
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive > table > tbody { display: block; width: 100%; min-width: 0; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive > table > thead { display: none; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive > table > tbody > tr {
  display: grid;
  grid-template-columns: 76px 1fr;
  grid-template-areas:
    "image product"
    "image price"
    "image qty"
    "image total";
  column-gap: 12px;
  row-gap: 4px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e2e2e2;
}
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive > table > tbody > tr > td { display: block; width: auto; min-width: 0; padding: 0; border: 0; text-align: left; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive td.td-image { grid-area: image; align-self: start; text-align: center; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive td.td-product,
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive td.td-name { grid-area: product; font-weight: 600; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive td.td-model { display: none; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive td.td-price { grid-area: price; font-size: 13px; color: #666; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive td.td-price::before { content: "Cena: "; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive td.td-qty { grid-area: qty; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive td.td-qty .input-group { width: 100%; max-width: 220px; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive td.td-total { grid-area: total; text-align: right; font-weight: 700; font-size: 16px; white-space: nowrap; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-checkout .cart-section .table-responsive td.td-total::before { content: "Ukupno: "; font-weight: 400; font-size: 13px; color: #666; }

html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive { overflow-x: visible; border: 0; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive > table,
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive > table > tbody { display: block; width: 100%; min-width: 0; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive > table > thead { display: none; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive > table > tbody > tr {
  display: grid;
  grid-template-columns: 76px 1fr;
  grid-template-areas:
    "image product"
    "image price"
    "image qty"
    "image total";
  column-gap: 12px;
  row-gap: 4px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e2e2e2;
}
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive > table > tbody > tr > td { display: block; width: auto; min-width: 0; padding: 0; border: 0; text-align: left; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive td.td-image { grid-area: image; align-self: start; text-align: center; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive td.td-product,
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive td.td-name { grid-area: product; font-weight: 600; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive td.td-model { display: none; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive td.td-price { grid-area: price; font-size: 13px; color: #666; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive td.td-price::before { content: "Cena: "; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive td.td-qty { grid-area: qty; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive td.td-qty .input-group { width: 100%; max-width: 220px; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive td.td-total { grid-area: total; text-align: right; font-weight: 700; font-size: 16px; white-space: nowrap; }
html.up-ux.up-f-cartreflow.mobile-header-active.route-checkout-cart .table-responsive td.td-total::before { content: "Ukupno: "; font-weight: 400; font-size: 13px; color: #666; }

