/* Всплывающая визитка — стили используют переменные и паттерн модалки,
   уже существующие в собранном CSS (.lead-modal / .lead-modal-overlay). */

.vcard-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #08192d99;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--ease-out, ease);
}

.vcard-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.vcard-modal {
  width: min(400px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--paper-0);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  transform: translateY(14px) scale(.98);
  transition: transform .22s var(--ease-out, ease);
}

.vcard-modal-overlay.is-open .vcard-modal {
  transform: none;
}

.vcard-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--paper-0);
  box-shadow: 0 2px 10px rgba(8, 25, 45, .3);
  color: var(--ink-950);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .16s, color .16s;
}

.vcard-modal-close:hover {
  background: var(--sand-100);
}

/* ---------- карточка-визитка ---------- */

.vcard-modal-card-view {
  position: relative;
  padding: 24px;
  text-align: center;
}

.vcard-modal-card-frame {
  margin-top: 8px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-panel);
  background: var(--sand-100);
}

.vcard-modal-card-img {
  display: block;
  width: 100%;
  height: auto;
}

.vcard-modal-card-hint {
  margin: 16px 0 18px;
  font-size: 13.5px;
  color: var(--slate-500);
  line-height: 1.5;
}

.vcard-modal-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vcard-modal-card-view .button {
  width: 100%;
}

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

  .vcard-modal {
    width: 100%;
    max-width: none;
    max-height: 88vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .vcard-modal-card-view {
    padding-bottom: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vcard-modal-overlay,
  .vcard-modal {
    transition: none;
  }
}
