/* ═══════════════════════════════════════
   NK Header — modal.css
   ═══════════════════════════════════════ */

.custom-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  align-items: center;
  justify-content: center;
  text-align: center;
}

.custom-modal[style*="flex"],
.custom-modal.open {
  animation: nk-overlay-in 0.2s ease forwards;
}

@keyframes nk-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── Контент ─────────────────────────────────── */

.custom-modal-content {
  background-color: var(--nk-additional-color);
  border: 1px solid hsla(0, 0%, 100%, .04);
  margin: auto;
  padding: 24px 20px 20px;
  border-radius: 14px;
  width: 90%;
  max-width: 320px;
  position: relative;
  text-align: center;
  box-shadow: 0 0 0 1px hsla(0, 0%, 100%, 0.03), 0 32px 64px rgba(0, 0, 0, 0.55);
  animation: nk-modal-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  color: var(--nk-text-color);
  font-family: inherit;
}

.custom-modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--nk-accent);
  border-radius: 0 0 4px 4px;
}

@keyframes nk-modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Крестик ─────────────────────────────────── */

.custom-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid hsla(0, 0%, 100%, .04);
  background: transparent;
  color: var(--nk-secondary-text-color);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
}

.custom-modal-close:hover {
  background: hsla(0, 0%, 100%, .06);
  border-color: hsla(0, 0%, 100%, .1);
  color: var(--nk-text-color);
}

/* ─── Заголовок ───────────────────────────────── */

.custom-modal h2,
.custom-modal-content .modal-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

/* ─── QR ──────────────────────────────────────── */

.custom-modal img {
  padding: 0;
  background: none;
  border-radius: 0;
}

.custom-modal-content .qr-wrap {
  margin: 0 auto 10px;
  width: 148px;
  height: 148px;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
  display: inline-block;
  box-shadow:
    0 0 0 1px hsla(0, 0%, 100%, 0.06),
    0 0 20px rgba(255, 69, 0, 0.15),
    0 0 48px rgba(255, 69, 0, 0.07);
  transition: box-shadow 0.3s;
}

.custom-modal-content .qr-wrap:hover {
  box-shadow:
    0 0 0 1px hsla(0, 0%, 100%, 0.1),
    0 0 28px rgba(255, 69, 0, 0.28),
    0 0 60px rgba(255, 69, 0, 0.12);
}

.custom-modal-content .qr-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

/* ─── Подпись ─────────────────────────────────── */

.custom-modal-content .modal-sub {
  font-size: 11px !important;
  color: var(--nk-secondary-text-color) !important;
  margin-bottom: 14px;
}

/* ─── Разделитель ─────────────────────────────── */

.custom-modal-content .divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.custom-modal-content .divider::before,
.custom-modal-content .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: hsla(0, 0%, 100%, .05);
}

.custom-modal-content .divider span {
  font-size: 11px;
  color: var(--nk-secondary-text-color);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.custom-modal-content .stagger {
  opacity: 0;
  transform: translateY(10px);
  animation: nk-stagger-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes nk-stagger-in {
  to { opacity: 1; transform: translateY(0); }
}

.custom-modal-content .stagger:nth-child(1) { animation-delay: 0.08s; }
.custom-modal-content .stagger:nth-child(2) { animation-delay: 0.15s; }
.custom-modal-content .stagger:nth-child(3) { animation-delay: 0.22s; }
.custom-modal-content .stagger:nth-child(4) { animation-delay: 0.29s; }
.custom-modal-content .stagger:nth-child(5) { animation-delay: 0.36s; }
.custom-modal-content .stagger:nth-child(6) { animation-delay: 0.43s; }
.custom-modal-content .stagger:nth-child(7) { animation-delay: 0.50s; }

/* ─── Магазины ────────────────────────────────── */

.custom-modal-content .stores {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.custom-modal-content .store-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid hsla(0, 0%, 100%, .04);
  background: #dcdcdc20;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: border 0.18s, transform 0.18s, background 0.18s;
}

.custom-modal-content .store-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    hsla(0, 0%, 100%, 0.06) 50%,
    transparent 65%
  );
  background-size: 200% 100%;
  background-position: 200% 0;
  pointer-events: none;
  transition: background-position 0s;
}

.custom-modal-content .store-link:hover {
  border-color: hsla(0, 0%, 100%, .1);
  background: hsla(0, 0%, 100%, .06);
  transform: translateX(3px);
}

.custom-modal-content .store-link:hover::before {
  background-position: -200% 0;
  transition: background-position 0.55s ease;
}

.custom-modal-content .store-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.custom-modal-content .store-text {
  text-align: left;
  line-height: 1.3;
}

.custom-modal-content .store-text .label {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--nk-secondary-text-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1px;
}

.custom-modal-content .store-text .name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--nk-text-color);
}

.custom-modal-content .store-arrow {
  margin-left: auto;
  color: hsla(0, 0%, 100%, .18);
  font-size: 16px;
  transition: color 0.18s, transform 0.18s;
  line-height: 1;
  flex-shrink: 0;
}

.custom-modal-content .store-link:hover .store-arrow {
  color: var(--nk-accent);
  transform: translateX(2px);
}
