/**
 * Гостевые блоки «заблокировано»: белая карточка, серая рамка, 🔒, клик → модалка входа.
 * Подключается вместе с guest-preview.css на страницах трекеров для гостей.
 */

.guest-locked-trigger {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
  border-radius: 14px;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Без жёлтой/синей рамки после tap и click */
.guest-locked-trigger:focus,
.guest-locked-trigger:focus-visible,
.guest-locked-trigger:active,
[data-guest-auth]:focus,
[data-guest-auth]:focus-visible,
[data-guest-auth]:active,
.diary-guest-locked-trigger:focus,
.diary-guest-locked-trigger:focus-visible,
.diary-guest-locked-trigger:active,
button.calorazh-profile-link.is-guest-disabled:focus,
button.calorazh-profile-link.is-guest-disabled:focus-visible,
button.calorazh-profile-link.is-guest-disabled:active {
  outline: none !important;
  box-shadow: none !important;
}

.stats-guest__preview.guest-locked-trigger:focus,
.stats-guest__preview.guest-locked-trigger:focus-visible,
.stats-guest__preview.guest-locked-trigger:active,
.water-guest__preview.guest-locked-trigger:focus,
.water-guest__preview.guest-locked-trigger:focus-visible,
.water-guest__preview.guest-locked-trigger:active,
.weight-guest__preview .weight-panel.guest-locked-trigger:focus,
.weight-guest__preview .weight-panel.guest-locked-trigger:focus-visible,
.weight-guest__preview .weight-panel.guest-locked-trigger:active {
  outline: none !important;
  box-shadow: none !important;
}

/* Поля и кнопки внутри гостевых плашек не подсвечиваются */
.stats-guest__preview.guest-locked-trigger *:focus,
.water-guest__preview.guest-locked-trigger *:focus,
.weight-guest__preview .guest-locked-trigger *:focus {
  outline: none !important;
  box-shadow: none !important;
}

.guest-locked-trigger--panel {
  padding: 14px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  opacity: 0.82;
}

.guest-locked__icon {
  font-size: 11px;
  opacity: 0.75;
}

/* —— Статистика / вода: вся демо-область кликабельна —— */
.stats-guest__preview.guest-locked-trigger,
.water-guest__preview.guest-locked-trigger {
  pointer-events: auto !important;
  user-select: none;
  cursor: pointer;
}

/* Дочерние img/кнопки иначе перехватывают клик — проваливаем на плашку */
.stats-guest__preview.guest-locked-trigger *,
.water-guest__preview.guest-locked-trigger * {
  pointer-events: none !important;
}

/* —— Вес: серия и отметки —— */
.weight-head--guest-locked {
  margin-bottom: 14px;
}

.weight-head--guest-locked .weight-streak,
.weight-head--guest-locked .weight-days,
.weight-head--guest-locked .calorazh-days {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: none;
  opacity: 0.82;
}

.weight-head--guest-locked .weight-streak__text {
  font-size: 13px;
  font-weight: 400;
  color: #374151;
  line-height: 1.4;
}

.weight-head--guest-locked .weight-streak__text strong {
  font-weight: 700;
  color: #374151;
}

.weight-head--guest-locked .weight-days__dot,
.weight-head--guest-locked .calorazh-days__dot {
  background: #e2e8f0;
}

.weight-head--guest-locked .weight-days__dot--filled,
.weight-head--guest-locked .calorazh-days__dot--filled {
  background: #9ca3af;
}

.weight-head--guest-locked .weight-days__dot--filled.weight-days__dot--active,
.weight-head--guest-locked .calorazh-days__dot--filled.calorazh-days__dot--active {
  background: #6b7280;
  outline-color: #9ca3af;
}

.weight-head--guest-locked .weight-streak__flame {
  filter: grayscale(1);
  opacity: 0.65;
}

.guest-locked-trigger--badges {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  opacity: 0.82;
  text-align: left;
}

.guest-locked-trigger--badges .weight-badges {
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  opacity: 1;
}

.guest-locked-trigger--badges .weight-badges__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  color: #374151;
  margin-bottom: 10px;
}

.guest-locked-trigger--badges .weight-badge,
.guest-locked-trigger--badges .weight-badge--unlocked {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  opacity: 0.82;
  filter: none;
}

.guest-locked-trigger--badges .weight-badge__icon,
.guest-locked-trigger--badges .weight-badge--unlocked .weight-badge__icon {
  color: #9ca3af;
}

.guest-locked-trigger--badges .weight-badge__label {
  color: #374151;
}

.weight-guest__preview .weight-app--demo {
  pointer-events: none;
  user-select: none;
}

.weight-guest__preview .guest-locked-trigger {
  pointer-events: auto;
}

.weight-guest__preview .weight-panel.guest-locked-trigger {
  cursor: pointer;
}

.weight-guest__preview .weight-panel.guest-locked-trigger .weight-form__adj,
.weight-guest__preview .weight-panel.guest-locked-trigger .weight-form__input,
.weight-guest__preview .weight-panel.guest-locked-trigger .weight-form__save {
  pointer-events: none;
}

.weight-guest__preview .weight-panel.guest-locked-trigger .weight-form__input:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: #d1d5db;
}

/* —— Модалка входа (те же классы, что у дневника) —— */
.diary-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 260001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  visibility: hidden;
  pointer-events: none;
}

.diary-auth-modal.is-open {
  visibility: visible;
  pointer-events: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.diary-auth-modal .diary-clear-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.diary-auth-modal.is-open .diary-clear-modal__backdrop {
  opacity: 1;
}

.diary-auth-modal .diary-clear-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(340px, calc(100vw - 32px));
  max-width: 340px;
  padding: 20px 18px 16px;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e7ebf0;
  border-radius: 20px;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.06),
    0 20px 48px rgba(15, 23, 42, 0.12);
  transform: scale(0.96) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.diary-auth-modal.is-open .diary-clear-modal__dialog {
  transform: scale(1) translateY(0);
}

.diary-auth-modal .diary-clear-modal__title {
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 10px;
  font-weight: 700;
  color: #1f2937 !important;
}

.diary-auth-modal .diary-clear-modal__text {
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 4px;
  color: #64748b !important;
}

.diary-auth-modal .diary-clear-modal__actions--auth {
  display: grid;
  margin-top: 16px;
  gap: 10px;
  grid-template-columns: 1fr;
}

.diary-auth-modal .diary-clear-modal__btn {
  width: 100%;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.diary-auth-modal a.diary-clear-modal__btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.diary-auth-modal .diary-clear-modal__btn--primary {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.diary-auth-modal .diary-clear-modal__btn--primary:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.diary-auth-modal .diary-clear-modal__btn--ghost {
  background: #ffffff !important;
  color: #64748b !important;
  border-color: #e2e8f0 !important;
  font-weight: 600;
  box-shadow: none;
}

.diary-auth-modal .diary-clear-modal__btn--ghost:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}
