/* Вода&Еда — кнопка скачивания приложения и окно QR-кодов. */

/* Скрытие блока внутри приложения. */
#ve-footer-app[hidden],
.ve-app-stores[hidden] {
  display: none !important;
}

/* Кнопка под социальными сетями. */
.ve-footer-app {
  margin-top: 24px;
}

.ve-footer-app-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  min-height: 42px;
  padding: 12px 18px;
  border: none;
  border-radius: 6px;
  background: #68492b;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.2s ease;
}

.ve-footer-app-button:hover {
  background: #51402f;
}

/* QR-коды и ссылки магазинов. */
.ve-app-stores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ve-app-store {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 8px;
  color: #51402f !important;
  text-decoration: none !important;
  text-align: center;
  font: 500 13px/1.4 Montserrat, Arial, sans-serif;
}

.ve-app-store img {
  display: block;
  width: 100%;
  max-width: 148px;
  height: auto;
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
  box-sizing: border-box;
}

.ve-app-store span {
  padding: 6px 0;
}

.ve-app-store:hover span {
  text-decoration: underline;
}

/* Модальное окно скачивания. */

.ve-app-dialog:not([open]) {
  display: none !important;
}

.ve-app-dialog {
  position: fixed;
  inset: 0;
  width: min(420px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  margin: auto;
  padding: 48px 28px 32px;
  overflow-y: auto;
  border: none;
  border-radius: 24px;
  background: #f8f4ec;
  color: #30281f;
  text-align: center;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.25);
  font-family: Montserrat, Arial, sans-serif;
  box-sizing: border-box;
}

.ve-app-dialog::backdrop {
  background: rgba(25, 22, 19, 0.65);
  backdrop-filter: blur(4px);
}

.ve-app-dialog h2 {
  margin: 0 0 14px;
  font: 500 30px/1.2 Georgia, serif;
}

.ve-app-dialog p {
  margin: 0 0 24px;
  color: #645b51;
  font-size: 13px;
  line-height: 1.5;
}

/* Закрытие окна. */

.ve-app-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #30281f;
  font: 24px/1 Arial, sans-serif;
  cursor: pointer;
}

.ve-app-close:hover {
  background: #ebe1d4;
}

.ve-app-close:focus-visible,
.ve-footer-app-button:focus-visible,
.ve-app-store:focus-visible {
  outline: 2px solid #b68e61;
  outline-offset: 3px;
}

/* Мобильная адаптация. */

@media (max-width: 767px) {

  .ve-footer-app {
    margin-top: 18px;
  }

  .ve-footer-app-button {
    min-height: 40px;
    font-size: 12px;
  }

  .ve-app-stores {
    gap: 8px;
  }

  .ve-app-store {
    font-size: 11px;
  }

  .ve-app-dialog {
    padding: 42px 18px 24px;
  }

  .ve-app-dialog h2 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .ve-footer-app-button {
    transition: none;
  }
}