/* 20.11.2026: удобство на телефоне и формы — см. local/php_interface/altx_mobile_polish.php */

/* Автозаполнение браузера (Яндекс Браузер, Chrome) красит поле жёлтым — выглядит как ошибка. Все ширины. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: #1f2937 !important;
  caret-color: #1f2937;
  transition: background-color 9999s ease-out 0s;
}

/* Плашка «В корзине» после добавления: куда идти дальше. Все ширины. */
.notice .altx-notice-actions { display: flex; gap: 8px; margin-top: 10px; }
.notice .altx-notice-actions a {
  flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 700;
  line-height: 1.1; text-decoration: none !important; white-space: nowrap;
}
.notice .altx-notice-actions .altx-na-primary { background: #396b9b; color: #fff !important; }
.notice .altx-notice-actions .altx-na-secondary { background: #fff; color: #396b9b !important; border: 1px solid #c9d3dc; }

/* Страница входа /auth/: вкладки в одну строку, кнопки фирменного цвета вместо ярко-голубого Aspro. Все ширины. */
.wrapper1.auth_page .nav-tabs > li > a,
.wrapper1.auth_page .nav-tabs > li > span { white-space: nowrap; padding-left: 8px; padding-right: 8px; font-size: 15px; }
/* Стиль входа auth.css (08.10) красит кнопку через #ajax_auth.altx-auth … — перебиваем тем же уровнем с ID */
.wrapper1.auth_page .btn.btn-default:not(.white):not(.transparent),
.wrapper1.auth_page #ajax_auth.altx-auth button.btn-default,
.wrapper1.auth_page #ajax_auth.altx-auth .buttons button[type="submit"] {
  background: #396b9b !important; border-color: #396b9b !important; color: #fff !important; border-radius: 10px;
}
.wrapper1.auth_page .btn.btn-default:not(.white):not(.transparent):hover,
.wrapper1.auth_page #ajax_auth.altx-auth button.btn-default:hover,
.wrapper1.auth_page #ajax_auth.altx-auth .buttons button[type="submit"]:hover { background: #2f5a83 !important; border-color: #2f5a83 !important; }
.wrapper1.auth_page .btn.transparent.register {
  background: #fff !important; color: #396b9b !important; border: 1px solid #c9d3dc !important; border-radius: 10px;
}

/* Нижнее меню (как в приложениях и у Лемана ПРО): разметку ставит mobile.js, показываем только на телефоне */
.altx-bnav { display: none; }

@media (max-width: 767px) {
  .altx-bnav {
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 1000;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
    height: 64px; border-radius: 22px; background: #eef1f5;
    box-shadow: 8px 8px 20px rgba(160,174,194,0.55), -6px -6px 16px rgba(255,255,255,0.95);
    font-family: Manrope, system-ui, sans-serif; transition: transform .25s ease;
  }
  .altx-bnav a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: 100%; font-size: 10px; font-weight: 600; line-height: 1; color: #5d6e7f !important; text-decoration: none !important;
  }
  .altx-bnav a svg { width: 22px; height: 22px; }
  .altx-bnav a.is-active { color: #396b9b !important; font-weight: 800; }
  .altx-bnav .altx-bnav-count {
    position: absolute; top: 7px; left: calc(50% + 4px); min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box;
    border-radius: 9px; background: #396b9b; color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  }
  .altx-bnav .altx-bnav-count[data-n="0"] { display: none; }
  body.altx-bnav-on { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  body.altx-bnav-on .widget_cookie.altx-cookie { bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important; }
  /* избранное и корзина переехали в нижнее меню — в шапке остаются поиск и телефон */
  body.altx-bnav-on #mobileheader .mobileheader-v1 .basket-link.delay,
  body.altx-bnav-on #mobileheader .mobileheader-v1 .basket-link.basket { display: none !important; }

  /* Списки товаров (шаг 2 концепта): светлый фон, белые карточки с мягкой полутенью, цена скидки как у Лемана ПРО */
  body.altx-catalog-listing #content,
  body.altx-catalog-listing .wrapper1,
  body.altx-catalog-listing { background: #eef1f5 !important; }
  body.altx-catalog-listing .catalog_block .catalog_item_wrapp.item .catalog_item {
    border: 0 !important; border-radius: 18px !important; background: #fff !important;
    box-shadow: 6px 6px 14px rgba(160,174,194,0.42), -6px -6px 14px rgba(255,255,255,0.95) !important;
  }
  body.altx-catalog-listing .catalog_block .image_wrapper_block { position: relative; }
  body.altx-catalog-listing .catalog_block .item_info--bottom_block { border-top-color: #eef1f5 !important; }
  body.altx-catalog-listing .catalog_block .cost:has(.price.discount .price_value) .price_matrix_wrapper > .price:not(.discount),
  body.altx-catalog-listing .catalog_block .cost:has(.price.discount .price_value) .price_matrix_wrapper > .price:not(.discount) * { color: #c2372f !important; }
  body.altx-catalog-listing .catalog_block .cost .price.discount,
  body.altx-catalog-listing .catalog_block .cost .price.discount * { font-size: 13px !important; color: #8a97a5 !important; font-weight: 500 !important; }
  body.altx-catalog-listing .catalog_block .altx-disc-badge {
    position: absolute; top: 8px; left: 8px; z-index: 2; padding: 3px 8px; border-radius: 9px;
    background: #c2372f; color: #fff; font: 800 12px/1.3 Manrope, system-ui, sans-serif; pointer-events: none;
  }
  body.altx-catalog-listing .catalog_block .btn.read_more,
  body.altx-catalog-listing .catalog_block .btn.to-cart {
    border-radius: 12px !important; min-height: 40px; background: #396b9b !important; border-color: #396b9b !important;
    box-shadow: 3px 3px 8px rgba(57,107,155,0.28) !important;
  }

  /* Пустой штатный блок заголовка Aspro (71 px) над нашим H1 — каталог, разделы, бренды, карточка. Класс ставит mobile.js. */
  #content > .top_inner_block_wrapper.altx-empty-top { display: none !important; }
  body.altx-no-top #content { padding-top: 14px; }

  /* Основные кнопки Aspro — фирменный синий вместо ярко-голубого */
  .btn.btn-default:not(.white):not(.transparent):not(.grey):not(.white-bg) {
    background-color: #396b9b; border-color: #396b9b;
  }

  /* Корзина: «Оформить заказ» — главная, «Быстрый заказ» — вторичная */
  /* Aspro: .btn.btn-default.white:not(.grey){color:… !important} — нужна та же специфичность */
  .basket-checkout-section .btn.btn-default.basket-btn-checkout,
  .basket-checkout-section .btn.btn-default.basket-btn-checkout.white:not(.grey) {
    background: #396b9b !important; border-color: #396b9b !important; color: #fff !important;
    min-height: 48px; font-size: 16px !important; font-weight: 700; border-radius: 10px;
  }
  .basket-checkout-section .fast_order {
    background: #fff !important; color: #396b9b !important; border: 1px solid #c9d3dc !important; border-radius: 10px;
  }
  /* Купон свёрнут в ссылку «Есть промокод?», открывается по нажатию (mobile.js) или если купон уже введён */
  .basket-coupon-section:not(.altx-coupon-open) .basket-coupon-block-field > :not(.basket-coupon-block-field-description) { display: none !important; }
  .basket-coupon-section:not(.altx-coupon-open) .basket-coupon-block-field-description {
    font-size: 0 !important; margin: 0 !important; cursor: pointer;
  }
  .basket-coupon-section:not(.altx-coupon-open) .basket-coupon-block-field-description::after {
    content: "Есть промокод?"; font-size: 14px; color: #396b9b; border-bottom: 1px dashed currentColor;
  }

  /* Окна форм («Заказать звонок», «в 1 клик», вопрос) — у верха экрана, чтобы клавиатура их не закрывала */
  .jqmWindow.popup.show,
  .popup.jqm-init.show {
    top: 10px !important; bottom: auto !important; margin-top: 0 !important;
    max-height: calc(100dvh - 20px) !important; overflow-y: auto !important;
  }

  /* Плашка cookies — тонкая полоска внизу, не закрывает экран */
  .widget_cookie.altx-cookie {
    left: 8px !important; right: 8px !important; bottom: 8px !important;
    padding: 6px 8px 6px 12px !important; gap: 10px; align-items: center;
    font-size: 12px !important; line-height: 1.3 !important; border-radius: 10px;
  }
  .widget_cookie.altx-cookie .widget_cookie__text { font-size: 12px !important; line-height: 1.3 !important; }
  .widget_cookie.altx-cookie .widget_cookie__btn-close-cookie {
    flex: none; min-height: 32px !important; height: 32px; padding: 0 14px !important; font-size: 13px !important; border-radius: 8px;
  }
}
