/* Базовая разметка */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: white;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    scroll-behavior: smooth;
}
html {
    scrollbar-gutter: stable;
}
*, *::before, *::after {
    box-sizing: inherit;
    -webkit-tap-highlight-color: transparent;
}

body {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
button,
a,
input,
textarea {
    outline: none;
    -webkit-tap-highlight-color: transparent; /* убирает синий фон на iOS Safari */
    -webkit-focus-ring-color: transparent;   /* убирает подсветку на некоторых браузерах */
}
@media screen and (min-width: 769px) {
    /* Основной контейнер */
    main {
        flex: 1;
        padding-top: 64px; /* отступ под фиксированную навигацию */
    }
}
@media screen and (max-width: 769px) {
    main {
        flex: 1;
        padding-bottom: 50px; /* отступ под фиксированную навигацию */
    }
}
.swal-highest-zindex {
    z-index: 9999999 !important;
}

.emoji-item,
.emoji-trigger,
.newsTitleInput,
.commentTextArea {
  font-family:
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Noto Color Emoji",
    "Segoe UI Symbol",
    sans-serif;
}
/* Навигация */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    display: flex;
    align-items: center;
    padding: 0 20px;

}

/* Внутренний контейнер навигации */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Логотип */
.logo-wrapper {
    margin-right: 20px;
    flex-shrink: 0;
}

.logo a {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}
.logo img {
    width: 45px;
    height: auto;
}

/* Кнопка категорий */
.category {
  width: 60px;
  height: 44px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.category:hover {
  background-color: #f9f9f9;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Поисковая форма */
.nav-search-form {
  display: flex;
  width: 50px;
  margin: 0 auto;
}

.nav-search-form input {
    flex: 1;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px 0 0 6px;
    outline: none;
}

.nav-search-form button {
    padding: 10px 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 6px 6px 0;
    background-color: #ffcc00;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.nav-search-form button:hover {
    background-color: #e6b800;
}

/* Ссылки */
.nav-links {
    display: flex;
    gap: 15px;
    list-style: none;
    margin-left: 20px;
}

.nav-links a {
    padding: 5px;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    display: flex;
    flex-direction: column; /* ставит иконку над текстом */
    align-items: center;
    justify-content: center;
    font-size: 14px;
    gap: 4px;
}
.nav-links i {
    font-size: 18px; /* размер иконки */
}
.main-nav .nav-links li a:hover {
  background-color: #f2f2f2;
}

.section-links a.active,
.nav-links a.active,
.nav-button.active {
    background: #f2f2f2;
    color: #e38e0e;
    border-radius: 8px;
}

.section-links a.active i,
.nav-button.active i {
    color: #e38e0e;
}

.bottom-nav .nav-button.active {
    color: #e38e0e;
}

.bottom-nav .nav-button.active i {
    color: #e38e0e;
}

.bottom-nav .nav-button.active::after {

    display: block;
    width: 6px;
    height: 6px;
    background: #122496;
    border-radius: 50%;
    margin: 4px auto 0;
}

.nav-left {
    display: flex;
    align-items: center;
    justify-content: space-between; /* распределяем кнопки и форму */
    margin: 10px auto;
    padding: 10px;
    box-sizing: border-box;
    width: 100%;
    gap: 10px;

}
.nav-left-products {
    max-width: 990px;
    position: sticky;
    top: 64px; /* высота твоей верхней навигации */
    z-index: 1000;
    padding: 10px 15px;
}

@media screen and (min-width: 769px) {
    background: white;
    border-bottom: 1px solid #ddd;
}

.nav-left-news {
    max-width: 750px;
}
.category-toggle-button {
  font-size: 24px;
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: #333;
  z-index: 1100; /* выше чем у nav-search-form */
  position: relative;
}
.nav-left-zone {
  display: flex;
  align-items: center;
  gap: 20px;
}

.section-links {
  display: flex;
  gap: 16px;
  align-items: center; /* добавить */
}

.section-links a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.section-links a:hover {
  background-color: #f2f2f2;

}

.dropdown {
  position: relative;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 160px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
  z-index: 1;
  border-radius: 5px;
}
.dropdown-content a {
  color: black;
  padding: 10px 15px;
  text-decoration: none;
  display: block;
}
.dropdown:hover .dropdown-content {
  display: block;
}
.section-links a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 14px;
    gap: 4px;
}
.section-links i {
    font-size: 18px;
}

.suggest-form input {
    width: 50%;
    padding: 6px;
    margin-right: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.suggest-form button {
    padding: 6px 12px;

    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.suggest-form button:hover {
    background-color: #d1d1d1;
}
.bottom-nav {
    display: none;
}
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    min-width: 100%;
    height: 50px;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #ccc;
    padding: 0 10px;
    z-index: 1000;
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
    bottom: env(safe-area-inset-bottom);
}

.bottom-nav .nav-main {
    display: flex;
    gap: 20px;
}

.bottom-nav .nav-more-toggle {
    font-size: 20px;
    cursor: pointer;
}

.more-menu {
    position: fixed;
    bottom: 60px; /* над нижней панелью */
    right: 10px; /* прижата к правому краю */
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 9999;
    min-width: 150px;
    max-width: 200px;
    font-size: 14px;
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}



.more-menu.show {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.more-menu .nav-button {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 5px;
    transition: background 0.2s ease;
}


.more-menu .edit-button {
    background-color: #eee;
    border: none;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 5px;
    margin-top: 4px;
    transition: background 0.2s ease;
}

.more-menu .edit-button:hover {
    background-color: #ddd;
}


.nav-button {
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    padding: 10px 0;
    text-decoration: none;
    user-select: none;
}

.nav-button:hover {
    color: #878787;
    text-decoration: none;
}

.nav-button i {
    font-size: 20px;
    margin-bottom: 3px;
}

.more-menu.edit-mode #editButtons {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
}

.nav-button.draggable {
    cursor: move;
}

#moreButtons,
#editButtons {
    display: flex;
    flex-direction: column; /* ключевая строка */
    gap: 6px;
}


@keyframes shake {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(1deg); }
  50% { transform: rotate(0deg); }
  75% { transform: rotate(-1deg); }
  100% { transform: rotate(0deg); }
}

.nav-button.shaking {
  animation: shake 0.4s infinite;
}

.nav-main {
  display: flex;
  width: 100%;
  align-items: center;
}

.nav-main .nav-button {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 14px;
  cursor: pointer;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: bold;
}

.nav-button i {
  font-size: 18px;
  margin-bottom: 4px;
}
.u-modal__content {
    background: #fff;
    padding: 20px 25px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
}

.u-modal__content h6 {
    margin: 5px;
}

.category-icon {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    vertical-align: middle;
}

.agreements-list {
    list-style: none;
    padding: 0;
    margin: 0px 0;
    font-size: 13px;

}

.agreements-list li {
    margin: 5px 0;
}

.agreements-list a {
    color: #007bff;
    text-decoration: underline;
}

.agreements-list a:hover {
    text-decoration: none;
}

.privacy {
    margin-top: -60px;
    margin-left: 40px
}

.from-app {
    margin-bottom: -50px;
}

.drag-handle {
    width: 40px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
    margin: 10px auto;
}

.swal2-container {
  z-index: 200000 !important;
}

#edgeSwipeZone{
  position: fixed;
  left: 0;
  top: 0;
  width: 24px;          /* лучше 16–24, а не 60 */
  height: 100vh;
  z-index: 1000;        /* огромный не нужен */
  background: transparent;
  touch-action: pan-y;
  pointer-events: auto; /* ВСЕГДА включено */
}

.nav-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge--mobile {
  position: absolute;
  top: -6px;
  right: -10px;

  min-width: 18px;
  height: 18px;
  padding: 0 5px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;

  background: #ff3b30;
  color: #fff;

  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

/* чтобы строка была: [searchbar] [add button] */
.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Единая "пилюля" */
.searchbar{
  flex: 1;                 /* занимает всё место между кнопками */
  display: flex;
  align-items: center;
  height: 44px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;        /* склеивает углы у внутренностей */
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* кнопка категорий — часть единого блока */
.searchbar__cat{
  width: 52px;
  height: 100%;
  border: 0;
  background: transparent;
  font-size: 19px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.searchbar__cat:hover{
  background: #f7f7f7;
}

/* форма внутри — тоже flex */
.searchbar__form{
  flex: 1;
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0;
}

/* input без своей рамки */
.searchbar__input{
  flex: 1;
  height: 100%;
  border: 0;
  outline: none;
  padding: 0 12px;
  font-size: 16px;
  background: transparent;
}

/* кнопка поиска — часть единого блока */
.searchbar__submit{
  width: 52px;
  height: 100%;
  border: 0;
  background: #ffcc00;
  cursor: pointer;
  font-size: 18px;
}

.searchbar__submit:hover{
  background: #e6b800;
}

.fab-add{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 0;
  background: #28a745;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  z-index: 2000;
  transition: transform .12s ease, filter .12s ease;
}

.fab-add:hover{ filter: brightness(.95); }
.fab-add:active{ transform: scale(.96); }

/* ===== ПК (по умолчанию) — вариант B (пилюля рядом с поиском) ===== */
.add-btn{
  height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #ff9838;
  background: white;
  color: #1f7a35;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;

  transition: background .15s ease, transform .12s ease, filter .12s ease;
}
.add-btn:active{ transform: scale(.98); }

.add-btn.add-btn--news {
    border: 1px solid #0077FF;
}

.add-btn .main-icon.news-app {
      font-size: 20px;
      color: #0077FF;
}

.add-btn .plus-icon.news-app {
    right: -8px;
    bottom: -16px;
    background: #0077FF;
}

/* ===== Мобилка — вариант A (FAB) ===== */
@media (max-width: 768px){
  .add-btn{
    position: fixed;
    right: 10px;
    bottom: calc(10px + 50px + env(safe-area-inset-bottom)); /* учитываем нижний бар */
    width: 50px;
    height: 50px;
    padding: 0;

    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, #ff7a00 0%, #ff9838 100%);
    color: #fff;

    box-shadow: 0 10px 25px rgba(0,0,0,.22);
    z-index: 2000; .nav-left .btn

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .add-btn:hover{ filter: brightness(.95); background: #28a745; }
  .add-btn:active{ transform: scale(.96); }

  .add-btn.add-btn--news {
    background: #0077FF;
  }
  .add-btn.add-btn--news:hover{ background: #005EDC; }
  .add-btn.add-btn--product:hover{ background: #fc8414; }
  .add-btn .plus-icon.news-app {
        color: #0077FF;
        background: white;
  }

  .add-btn .main-icon.news-app {
      color: white;
  }

  .add-btn{
    transition: transform .25s ease, opacity .25s ease, filter .12s ease;
    will-change: transform, opacity;
  }

  .add-btn.is-hidden{
    transform: translateY(90px); /* уезжает вниз */
    opacity: 0;
    pointer-events: none;        /* чтобы не кликалась пока спрятана */
  }

}

.add-btn__icon-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Основная иконка */
.add-btn .main-icon{
  font-size: 18px;
  color: #ff9838;
}

/* Маленький + */
.add-btn .plus-icon{
  position: absolute;
  bottom: -6px;
  right: -8px;

  font-size: 10px;
  background: #ff9838;
  color: #fff;

  width: 16px;
  height: 16px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

.fa-arrow-left {
    font-size: 20px;
}

.more-menu__reset-btn {
    width: 100%;
    padding: 3px 6px;

    border: 1px solid #e5e7eb;
    border-radius: 5px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
    color: #333;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition:
        background 0.18s ease,
        transform 0.12s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.more-menu__reset-btn:hover {
    background: linear-gradient(180deg, #fff8f8 0%, #ffeaea 100%);
    border-color: #f1b5b5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.more-menu__reset-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.more-menu__reset-btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(255, 99, 71, 0.18),
        0 4px 10px rgba(0, 0, 0, 0.12);
}

.dark-theme .more-menu__reset-btn {
    background: linear-gradient(180deg, #2f2f2f 0%, #252525 100%);
    color: #f3f4f6;
    border-color: #454545;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.dark-theme .more-menu__reset-btn:hover {
    background: linear-gradient(180deg, #3a2b2b 0%, #332424 100%);
    border-color: #7a4b4b;
}

@media (max-width: 768px){

  .add-btn .main-icon{
    font-size: 18px;
    color: #fff;
  }

  .add-btn .plus-icon{
    bottom: -8px;
    right: -8px;
    background: #fff;
    color: #ff9838;
  }

}

/* чтобы не перекрывала нижний бар на мобилке */
@media (max-width: 768px){
  .fab-add{ bottom: calc(18px + 50px + env(safe-area-inset-bottom)); }
}


/* мобилка — чуть ниже высота/текст */
@media (max-width: 768px){
  .searchbar{ height: 41px; }
  .searchbar__input{ font-size: 13px; padding: 0 10px; }
  .searchbar__cat, .searchbar__submit{ width: 46px; }
}


@media screen and (max-width: 768px) {
    .category {

       height: 41px;
    }
    .privacy {
        margin-top: 0px;
        padding: 10px;
        margin-left: 10px;
    }

  .main-nav {
    display: none !important; /* скрыть верхнюю навигацию */
  }

  .bottom-nav {
    display: flex !important; /* показать нижнюю панель */
  }
  .captcha-container {
        max-width: 220px;  /* уменьшаем ширину */
        transform: scale(0.85); /* опционально — уменьшает всю капчу */
        transform-origin: top left; /* чтобы масштабировалась "от начала" */
  }
  .mobile-taxi-dropdown {
      display: none;
      background-color: white;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.15);
      z-index: 9999;
      width: 90%;
      max-width: 300px;
      padding: 10px 0;
    }
    .nav-search-form input {
        padding: 5px 6px;
        font-size: 12px;
    }
    /* Внутренние ссылки */
    .mobile-taxi-dropdown-content a {
      display: block;
      padding: 12px 16px;
      text-decoration: none;
      color: #333;
      font-size: 16px;
      border-bottom: 1px solid #eee;
    }

    .mobile-taxi-dropdown-content a:last-child {
      border-bottom: none;
    }

    .mobile-taxi-dropdown-content a:hover {
      background-color: #f2f2f2;
    }

    /* Показываем */
    .mobile-taxi-dropdown.show {
      display: block;
    }
  #mobile-taxi-dropdown {
      position: absolute; /* или fixed */
      top: 0;  /* теперь сверху */
      /* можно настроить left/right для точного позиционирования */
    }
  #nav-panel {
      position: fixed; /* или sticky */
      top: 0;
      left: 0;
      width: 100%;
      z-index: 1000;
    }
}

@media screen and (min-width: 769px) {
  .main-nav {
    display: flex !important; /* показать верхнюю навигацию */
  }

  .bottom-nav {
    display: none !important; /* скрыть нижнюю панель */
  }

}
@media screen and (max-width: 768px) {
    .nav-main .nav-button {
      font-size: 10px;
    }
    .nav-button {
        font-size: 11px;
    }
    .searchbar__submit {
        font-size: 16px;
    }
    .add-btn.add-btn--product.from-app2 {
        margin-bottom: -50px;
    }
}