/* UA header fixes (cart look, logged-in spacing, mobile top cart). Used by global block NEWHEAD. */

/* 1) Desktop cart: UA $BASKET$ = a.basket-icon-link > .basket__icon + .basket__num (RU has a different markup) */
li.basket.dkl-user-menu__right-buttons_item .basket__icon { display: none !important; }
li.basket.dkl-user-menu__right-buttons_item > div > a:first-of-type > .basket__num,
li.basket.dkl-user-menu__right-buttons_item > a:first-of-type > .basket__num {
  position: absolute !important; top: -6px !important; right: -6px !important; left: auto !important; bottom: auto !important;
  min-width: 24px !important; width: auto !important; height: 24px !important; padding: 0 7px !important; margin: 0 !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 100%) !important; color: #fff !important;
  font-size: 12px !important; font-weight: 700 !important; line-height: 1 !important;
  border-radius: 12px !important; border: 3px solid #fff !important; box-sizing: border-box !important;
  box-shadow: 0 4px 12px rgba(255, 71, 87, .4) !important; z-index: 2 !important;
}
.black_theme li.basket.dkl-user-menu__right-buttons_item > div > a:first-of-type > .basket__num,
.black_theme li.basket.dkl-user-menu__right-buttons_item > a:first-of-type > .basket__num { border-color: rgba(0, 0, 0, .3) !important; }
li.basket.dkl-user-menu__right-buttons_item.basket-empty > div > a:first-of-type > .basket__num,
li.basket.dkl-user-menu__right-buttons_item.basket-empty > a:first-of-type > .basket__num { display: none !important; }

/* 2) Logged-in menu (Налаштування / Мої замовлення / Вихід) must not touch the search box */
@media (min-width: 992px) {
  .mob_11.ua-logged .header_search { width: auto !important; max-width: none !important; right: 318px !important; }
  .mob_11.ua-logged ul li a { padding: 9px 6px !important; }
}

/* 3) Cart in the mobile top header (next to the menu button), phones only (<768px) */
.ua-top-cart { position: absolute; top: 14px; right: 69px; width: 42px; height: 42px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); display: flex; align-items: center; justify-content: center; z-index: 5; text-decoration: none; }
.ua-top-cart::after { content: ''; width: 21px; height: 21px; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%232d2d2d" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/></svg>') center / contain no-repeat; }
.black_theme .ua-top-cart { background: rgba(255, 255, 255, .1); }
.black_theme .ua-top-cart::after { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/></svg>'); }
.ua-top-cart__num { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 10px; border: 2px solid #fff; background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 100%); color: #fff; font: 700 11px/16px Arial, sans-serif; text-align: center; }
.black_theme .ua-top-cart__num { border-color: rgba(0, 0, 0, .3); }
.ua-top-cart__num.is-empty { display: none; }
@media (min-width: 768px) { .ua-top-cart { display: none !important; } }
