/* ============================================================================
   LEVITA Gate — стили (брендовая версия LEVITA).
   ============================================================================ */

/* ============================================================================
   ЗОНА 2 — селективный блюр на цифрах
   ============================================================================ */

body.lvt-locked .lvt-blur {
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  filter: blur(12px);
  transition: filter 0.3s ease;
}

/* Замочек на заблюренных значениях */
body.lvt-locked .lvt-blur::after {
  content: "🔒";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  filter: none;
  pointer-events: none;
  z-index: 2;
}

body.lvt-locked .lvt-blur:hover {
  filter: blur(9px);
}

/* Усиленный блюр для расходов — названия и суммы нечитаемы */
body.lvt-locked .expense-row .lvt-blur {
  filter: blur(14px);
}
body.lvt-locked .expense-row .lvt-blur:hover {
  filter: blur(11px);
}
/* Убираем замочки с названий статей расходов */
body.lvt-locked .expense-label.lvt-blur::after {
  display: none;
}

/* Полный блюр контента в выручке и расходах (кроме заголовков) */
body.lvt-locked #revenue .section-inner,
body.lvt-locked #expenses .section-inner {
  position: relative;
}
body.lvt-locked #revenue .section-inner > *:not(.section-title):not(.section-emotion):not(.lvt-section-teaser),
body.lvt-locked #expenses .section-inner > *:not(.section-title):not(.section-emotion):not(.lvt-section-teaser) {
  filter: blur(12px) saturate(0.6);
  pointer-events: none;
  user-select: none;
}
/* Кнопка-приманка поверх блюра */
body.lvt-locked .lvt-section-teaser {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  padding: 18px 28px;
  background: rgba(255, 255, 255, 0.96);
  color: #1a1a2e;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  pointer-events: auto;
  max-width: 90%;
  transition: transform 0.2s, box-shadow 0.2s;
}
body.lvt-locked .lvt-section-teaser {
  animation: lvt-pulse-glow 2.5s ease-in-out infinite;
}
body.lvt-locked .lvt-section-teaser:hover {
  transform: translate(-50%, -50%) scale(1.05) translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  background: #fff;
  animation: none;
}
@media (max-width: 600px) {
  body.lvt-locked .lvt-section-teaser {
    font-size: 15px;
    padding: 14px 20px;
    white-space: normal;
    max-width: 85%;
  }
}
body.lvt-unlocked .lvt-section-teaser {
  display: none !important;
}
body.lvt-unlocked #revenue .section-inner > *,
body.lvt-unlocked #expenses .section-inner > * {
  filter: none;
  pointer-events: auto;
  user-select: auto;
}

/* После разлока — снимаем размытие */
body.lvt-unlocked .lvt-blur {
  filter: none;
  cursor: auto;
  user-select: auto;
}

/* ============================================================================
   ЗОНА 3 — полный блюр секции + текстовая «приманка»
   ============================================================================ */

body.lvt-locked [data-zone="locked"] {
  position: relative;
  pointer-events: none;
  user-select: none;
}

body.lvt-locked [data-zone="locked"] > * {
  filter: blur(12px) saturate(0.6);
  pointer-events: none;
}

/* Карточка-приманка поверх блюра */
body.lvt-locked [data-zone="locked"]::before {
  content: "🔒  " attr(data-teaser);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  padding: 18px 28px;
  background: rgba(255, 255, 255, 0.96);
  color: #1a1a2e;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  pointer-events: auto;
  max-width: 90%;
  transition: transform 0.2s, box-shadow 0.2s;
}

body.lvt-locked [data-zone="locked"]::before:hover {
  transform: translate(-50%, -50%) scale(1.05) translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  background: #fff;
}

/* Пульсация замочка на всех кнопках-приманках */
@keyframes lvt-pulse-glow {
  0%, 100% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); }
  50% { box-shadow: 0 10px 30px rgba(238, 201, 92, 0.25), 0 0 0 4px rgba(238, 201, 92, 0.1); }
}
body.lvt-locked [data-zone="locked"]::before {
  animation: lvt-pulse-glow 2.5s ease-in-out infinite;
}

@media (max-width: 600px) {
  body.lvt-locked [data-zone="locked"]::before {
    font-size: 15px;
    padding: 14px 20px;
    white-space: normal;
    max-width: 85%;
  }
}

body.lvt-unlocked [data-zone="locked"] > * {
  filter: none;
  pointer-events: auto;
}

body.lvt-unlocked [data-zone="locked"]::before {
  display: none;
}

/* ============================================================================
   ПЛАШКА — sticky bar внизу
   ============================================================================ */

.lvt-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9990;
  background: #EEC95C;
  color: #101A25;
  box-shadow: 0 -8px 28px rgba(16, 26, 37, 0.18);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: env(safe-area-inset-bottom);
  font-family: 'Inter', sans-serif;
}

.lvt-bar.is-visible {
  transform: translateY(0);
}

.lvt-bar__content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.lvt-bar__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lvt-bar__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: #101A25;
}

.lvt-bar__subtitle {
  font-size: 13px;
  color: rgba(16, 26, 37, 0.7);
  line-height: 1.3;
}

.lvt-bar__cta {
  flex-shrink: 0;
  padding: 12px 24px;
  background: #101A25;
  color: #FFFFFF;
  border: none;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.1s;
}

.lvt-bar__cta:hover {
  background: #1f2d3e;
}

.lvt-bar__cta:active {
  transform: translateY(1px);
}

.lvt-bar__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: rgba(16, 26, 37, 0.55);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}

.lvt-bar__close:hover {
  background: rgba(16, 26, 37, 0.08);
  color: #101A25;
}

@media (max-width: 600px) {
  .lvt-bar__content {
    padding: 12px 16px;
    gap: 12px;
  }
  .lvt-bar__title {
    font-size: 14px;
  }
  .lvt-bar__subtitle {
    display: none;
  }
  .lvt-bar__cta {
    padding: 9px 14px;
    font-size: 11px;
  }
}

/* ============================================================================
   МОДАЛКА с формой
   ============================================================================ */

.lvt-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: 'Inter', sans-serif;
}

.lvt-modal[hidden] {
  display: none;
}

.lvt-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(16, 26, 37, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: lvt-fade 0.25s ease;
}

.lvt-modal__card {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px 36px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: lvt-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lvt-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}

.lvt-modal__close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}

/* Золотая полоса вместо эмодзи замка */
.lvt-modal__line {
  width: 48px;
  height: 2px;
  background: #EEC95C;
  margin: 0 auto 28px;
}

.lvt-modal__title {
  margin: 0 0 14px;
  font-family: 'Cormorant Garamond', 'Spectral', serif;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 500;
  text-align: center;
  color: #101A25;
  letter-spacing: -0.01em;
}

.lvt-modal__subtitle {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.5;
  color: #555;
  text-align: center;
}

/* --- поля формы --- */

.lvt-modal__form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lvt-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lvt-field label {
  font-size: 11px;
  font-weight: 600;
  color: #101A25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lvt-field input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1.5px solid #d0d0d8;
  border-radius: 10px;
  background: #fafafc;
  color: #1a1a2e;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}

.lvt-field input:focus {
  border-color: #101A25;
  background: #fff;
}

.lvt-field input.is-invalid {
  border-color: #e63946;
  background: #fff5f5;
}

.lvt-error {
  display: block;
  font-size: 12px;
  color: #e63946;
  min-height: 14px;
  line-height: 1.2;
}

.lvt-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.4;
  color: #555;
  margin-top: 0;
}

.lvt-consent input[type="checkbox"] {
  margin: 2px 0 0;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #101A25;
}

.lvt-consent a {
  color: #101A25;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* honeypot */
.lvt-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* кнопка отправки */
.lvt-submit {
  position: relative;
  width: 100%;
  padding: 16px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #101A25;
  background: #EEC95C;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
  font-family: 'Inter', sans-serif;
}

.lvt-submit:hover:not(:disabled) {
  background: #f5d76e;
}

.lvt-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.lvt-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lvt-submit__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lvt-spin 0.7s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

.lvt-submit.is-loading .lvt-submit__text {
  opacity: 0.7;
}

.lvt-submit.is-loading .lvt-submit__spinner {
  display: inline-block;
}

.lvt-safety {
  margin: 8px 0 0;
  font-size: 12px;
  color: #888;
  text-align: center;
  line-height: 1.4;
}

/* блок успеха */
.lvt-success {
  text-align: center;
  padding: 12px 0;
}

.lvt-success__line {
  width: 48px;
  height: 2px;
  background: #EEC95C;
  margin: 0 auto 24px;
}

.lvt-success__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #101A25;
  color: #EEC95C;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.lvt-success h3 {
  margin: 0 0 10px;
  font-family: 'Cormorant Garamond', 'Spectral', serif;
  font-size: 26px;
  font-weight: 500;
  color: #101A25;
  letter-spacing: -0.01em;
}

.lvt-success p {
  margin: 0;
  color: #5a6470;
  line-height: 1.6;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}

/* ============================================================================
   Анимации
   ============================================================================ */

@keyframes lvt-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes lvt-pop {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

@keyframes lvt-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ============================================================================
   Адаптивность модалки
   ============================================================================ */

@media (max-width: 480px) {
  .lvt-modal {
    padding: 0;
    align-items: flex-end;
  }

  .lvt-modal__card {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 32px 22px 24px;
    max-height: 95vh;
  }

  .lvt-modal__title {
    font-size: 22px;
  }

  .lvt-modal__subtitle {
    font-size: 13px;
    margin-bottom: 18px;
  }
}
