/* LOST — квиз «День рождения под ключ» (модальное окно, 6 шагов) */

.lost-bday {
  position: fixed;
  inset: 0;
  z-index: 12100;
  display: none;
}
.lost-bday.is-open { display: block; }

/* Атрибут hidden должен всегда скрывать: у классов есть display, который
   иначе перебивает [hidden] из браузерных стилей (поле мессенджера и др.). */
#lost-bday [hidden] { display: none !important; }

.lost-bday__overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 8, 0.72);
  backdrop-filter: blur(3px);
}

.lost-bday__dialog {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(720px, 100%);
  max-width: 100vw;
  max-height: 92vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px 20px 26px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, rgba(29, 20, 35, 0.99), rgba(16, 10, 20, 0.99));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -20px 70px rgba(0, 0, 0, 0.6);
  font-family: var(--lost-font-family, Inter, system-ui, sans-serif);
  color: #fff;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .lost-bday__dialog {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    border-radius: 22px;
  }
}

.lost-bday__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
}

.lost-bday__head { margin-bottom: 16px; }
.lost-bday__title {
  margin: 0 0 6px;
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.lost-bday__progress {
  margin: 0 0 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}
.lost-bday__bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.lost-bday__bar span {
  display: block;
  height: 100%;
  width: 16.6%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e23a4b, #d12b3c);
  transition: width 0.25s ease;
}

.lost-bday__step { display: none; }
.lost-bday__step.is-active { display: block; }
.lost-bday__step-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
}
.lost-bday__label {
  display: block;
  margin: 18px 0 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}
.lost-bday__hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.lost-bday__input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 15px;
  box-sizing: border-box;
}
.lost-bday__input::placeholder { color: rgba(255, 255, 255, 0.4); }

.lost-bday__date-wrap {
  position: relative;
  width: 100%;
}
.lost-bday__date-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.lost-bday__date-btn:hover,
.lost-bday .lost-datepicker.is-open .lost-bday__date-btn {
  border-color: rgba(226, 58, 75, 0.55);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.lost-bday__date-btn.has-value {
  color: #fff;
  border-color: rgba(226, 58, 75, 0.65);
  background: rgba(209, 43, 60, 0.16);
}
.lost-bday__date-input,
.lost-bday .lost-datepicker__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Кастомный календарь внутри квиза ДР */
.lost-bday .lost-datepicker {
  position: relative;
  width: 100%;
  max-width: 100%;
}
.lost-bday .lost-datepicker--inline .lost-datepicker__popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 30;
  width: 100%;
  max-width: 100%;
}
.lost-bday .lost-datepicker.is-open .lost-datepicker__popover {
  display: block;
}
.lost-bday .lost-datepicker__day {
  min-height: 40px;
  font-size: 15px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
@media (max-width: 700px) {
  .lost-bday .lost-datepicker__popover {
    padding: 14px 12px;
  }
  .lost-bday .lost-datepicker__day {
    min-height: 42px;
  }
}

.lost-bday__input:focus {
  outline: none;
  border-color: rgba(226, 58, 75, 0.7);
}

.lost-bday__messenger {
  width: 100%;
  max-width: 100%;
  margin-top: 4px;
  box-sizing: border-box;
  overflow: visible;
}
.lost-bday__messenger .lost-bday__input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.lost-bday__messenger .lost-bday__dd + .lost-bday__input {
  margin-top: 10px;
}

.lost-bday__dd {
  position: relative;
  width: 100%;
}
.lost-bday__dd-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 10px 40px 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.06);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' fill-opacity='0.7' d='M1.4.3L6 4.9 10.6.3 12 1.7l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  color: #fff;
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.lost-bday__dd-trigger:hover,
.lost-bday__dd-trigger:focus {
  outline: none;
  border-color: rgba(226, 58, 75, 0.7);
  background-color: rgba(255, 255, 255, 0.08);
}
.lost-bday__dd.is-open .lost-bday__dd-trigger {
  border-color: rgba(226, 58, 75, 0.7);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' fill-opacity='0.7' d='M10.6 7.7L6 3.1 1.4 7.7 0 6.3l6-6 6 6z'/%3E%3C/svg%3E");
}
.lost-bday__dd-list {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  top: auto;
  z-index: 30;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: #1a141f;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  max-height: 240px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.lost-bday__dd-option {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.3;
  cursor: pointer;
  box-sizing: border-box;
}
.lost-bday__dd-option:hover,
.lost-bday__dd-option:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.lost-bday__dd-option.is-selected {
  background: rgba(209, 43, 60, 0.22);
  color: #fff;
  font-weight: 600;
}

.lost-bday__options {
  display: grid;
  gap: 8px;
}
@media (min-width: 560px) {
  .lost-bday__options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.lost-bday__option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.lost-bday__option:hover { border-color: rgba(226, 58, 75, 0.5); }
.lost-bday__option input { accent-color: #d12b3c; }
.lost-bday__option:has(input:checked) {
  border-color: #d12b3c;
  background: rgba(209, 43, 60, 0.18);
}

.lost-bday__cards {
  display: grid;
  gap: 10px;
}
@media (min-width: 700px) {
  .lost-bday__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.lost-bday__card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.lost-bday__card:hover { border-color: rgba(226, 58, 75, 0.5); }
.lost-bday__card:has(input:checked) {
  border-color: #d12b3c;
  background: rgba(209, 43, 60, 0.16);
}
.lost-bday__card input { position: absolute; opacity: 0; pointer-events: none; }
.lost-bday__card-img {
  display: block;
  height: 120px;
  background-size: cover;
  background-position: center;
}
.lost-bday__card-body {
  display: block;
  padding: 12px 14px 14px;
}
.lost-bday__card-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.lost-bday__card-text {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.6);
}
.lost-bday__card-price {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(209, 43, 60, 0.22);
  border: 1px solid rgba(209, 43, 60, 0.45);
  font-size: 13px;
  font-weight: 600;
}

.lost-bday__addons {
  display: grid;
  gap: 6px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 700px) {
  .lost-bday__addons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
    gap: 8px;
  }
}
.lost-bday__addon {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}
@media (max-width: 699px) {
  .lost-bday__addon {
    padding: 8px 10px;
    gap: 8px;
  }
  .lost-bday__addon-name {
    font-size: 13.5px;
  }
  .lost-bday__addon-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 11.5px;
    line-height: 1.35;
  }
  .lost-bday__dialog {
    max-height: 94vh;
    padding: 18px 14px 20px;
  }
  .lost-bday__step-title { margin-bottom: 8px; font-size: 16px; }
  .lost-bday__hint { margin-bottom: 8px; }
  .lost-bday__nav { margin-top: 14px; }
  .lost-bday__btn { min-height: 46px; }
}
.lost-bday__addon:has(input:checked) {
  border-color: #d12b3c;
  background: rgba(209, 43, 60, 0.16);
}
.lost-bday__addon input { position: absolute; opacity: 0; pointer-events: none; }
.lost-bday__addon-check {
  position: relative;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
}
.lost-bday__addon:has(input:checked) .lost-bday__addon-check {
  border-color: #d12b3c;
  background: #d12b3c;
}
.lost-bday__addon:has(input:checked) .lost-bday__addon-check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.lost-bday__addon-body { min-width: 0; }
.lost-bday__addon-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.lost-bday__addon-text {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
}

.lost-bday__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}
.lost-bday__consent input { accent-color: #d12b3c; margin-top: 2px; }

/* Legacy-тема делает чекбоксы прозрачными (#fff0) — рисуем свой, видимый на тёмном. */
.lost-bday__consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  cursor: pointer;
}
.lost-bday__consent input[type="checkbox"]:checked {
  border-color: #d12b3c;
  background: #d12b3c;
}
.lost-bday__consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.lost-bday__consent a { color: #ff6b7a; }

.lost-bday__error {
  margin: 8px 0 0;
  font-size: 13px;
  color: #ff6b7a;
}
.lost-bday__error--common { margin-top: 14px; }

.lost-bday__nav {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.lost-bday__btn {
  flex: 1;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.18s ease, background 0.18s ease;
}
.lost-bday__btn:hover { filter: brightness(1.08); }
.lost-bday__btn--back { flex: 0 0 auto; min-width: 110px; }
.lost-bday__btn--next,
.lost-bday__btn--submit {
  background: linear-gradient(180deg, #e23a4b, #d12b3c);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(209, 43, 60, 0.3);
}
.lost-bday__btn:disabled { opacity: 0.6; cursor: default; }

.lost-bday__done { text-align: center; padding: 20px 0 6px; }
.lost-bday__done-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #e23a4b, #d12b3c);
  font-size: 26px;
  font-weight: 700;
}
.lost-bday__done-title { margin: 0 0 8px; font-size: 20px; }
.lost-bday__done-text {
  margin: 0 0 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
}

body.lost-bday-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .lost-bday__bar span,
  .lost-bday__option,
  .lost-bday__card,
  .lost-bday__addon,
  .lost-bday__btn { transition: none; }
}
