/* Дополнения к вёрстке (css/main.min.css) для сайта */

/* Видео с камеры в «Сканере чеков» — на месте картинки-заглушки */
.receipt-view__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Лоадер отправки форм (assets/plugins/loader) — поверх модалок */
#backdrop {
  z-index: 1090;
  opacity: 0.5;
}
.loader {
  z-index: 1095;
  border-left-color: #c69f5e;
}

/* Текст сообщения из движка может содержать разметку (<br>, <hr>) */
#modal-message .modal-head__text hr {
  margin: 12px 0;
}

/* Капча: поле и картинка в одну строку, ошибка — под ними */
.form-captcha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.form-captcha .form-control {
  flex: 1 1 0;
  min-width: 0;
}
.form-captcha__img {
  flex: none;
  border-radius: 8px;
  background-color: #fff;
  cursor: pointer;
}
.form-captcha .invalid-feedback {
  flex-basis: 100%;
  margin-top: -8px;
}

/* Подсказка «?» у поля (Bootstrap Tooltip) */
.form-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid #c69f5e;
  border-radius: 50%;
  background: none;
  color: #c69f5e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  cursor: help;
}

/* Куки-баннер (ТЗ 4.5) */
.cookie-banner {
  position: fixed;
  z-index: 1040;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 24px;
  border-radius: 24px;
  background-color: #fff;
  box-shadow: 1px 0 8.6px rgba(0, 0, 0, .25);
  color: #361015;
}
.cookie-banner[hidden] {
  display: none;
}
.cookie-banner__text {
  margin: 0;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 14px;
  line-height: 20px;
}
.cookie-banner__text a {
  color: #780e08;
}
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
@media (min-width: 768px) {
  .cookie-banner {
    flex-direction: row;
    align-items: center;
  }
  .cookie-banner__actions {
    flex: none;
  }
}
/* В ЛК на мобильном внизу таббар — баннер над ним */
@media (max-width: 991.98px) {
  .has-tabbar .cookie-banner {
    bottom: calc(104px + env(safe-area-inset-bottom));
  }
}

/* Вход по Passkey: блок в профиле ЛК */
.lk-passkey {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: 32px;
}
.lk-passkey[hidden] {
  display: none;
}
.lk-passkey__text {
  margin: 0;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: #361015;
}
.lk-passkey__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lk-passkey__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 16px;
  background-color: #fff;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: #361015;
}

/* Баннер главного приза (04) — оформление как у карточки .step--light (03) */
.steps__banner {
  padding: 20px;
  border: 2px solid #c69f5e;
  border-radius: 24px;
  background-color: #fff9f0;
  background-image: none;
  color: #780e08;
}
.steps__banner-title {
  font-weight: 600;
  font-size: 20px;
  line-height: 28px;
}
.steps__banner-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
}
.steps__banner-num {
  background-image: linear-gradient(90deg, #c69f5e 0%, #ead29a 31.731%, #fff6d5 63.462%, #c69f5e 100%);
}
@media (min-width: 992px) {
  .steps__banner {
    border: 0;
    border-radius: 20px;
    background-image: none;
  }
  .steps__banner-title {
    font-size: 24px;
    line-height: 32px;
  }
  .steps__banner-text {
    font-size: 16px;
    line-height: 24px;
  }
}

/* Победители на мобильной: название приза не налезает на дату */
@media (max-width: 767.98px) {
  .winners__table tr:not(.winners__empty) {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }
  .winners__table tr:not(.winners__empty) td:nth-child(4) {
    text-align: right;
    overflow-wrap: anywhere;
  }
}

/* Шапка закреплена вверху экрана на всех страницах, в том числе на телефоне */
.page {
  padding-top: 0;
}
.page > .container:first-child {
  position: sticky;
  top: 0;
  z-index: 1020;
  padding-top: 10px;
  background-color: var(--bs-body-bg);
}
.page-light .page > .container:first-child {
  background-color: #fff9f0;
}
@media (min-width: 992px) {
  .page > .container:first-child {
    padding-top: 20px;
  }
}
/* якоря (/#prizes, /#winners, #receipts) не должны уезжать под шапку */
html {
  scroll-padding-top: 150px;
}

/* Подсказки поиска населённого пункта и улицы в форме данных победителя (js/main.js) */
.addr-field {
  position: relative;
}
.addr-suggest {
  position: absolute;
  z-index: 5;
  top: 100%;
  right: 0;
  left: 0;
  max-height: 240px;
  margin: 4px 0 0;
  padding: 4px;
  overflow-y: auto;
  list-style: none;
  background-color: #fff;
  border: 1px solid #c69f5e;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.addr-suggest[hidden] {
  display: none;
}
.addr-suggest__item {
  padding: 10px 12px;
  border-radius: 8px;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: #361015;
  cursor: pointer;
}
.addr-suggest__item:hover,
.addr-suggest__item.is-active {
  background-color: #fff9f0;
}
