.mixy-dialog {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mixy-dialog[hidden] {
  display: none;
}

.mixy-dialog__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.mixy-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(800px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  border-radius: 48px;
  background: #1d1d1d;
  padding: 64px 32px 32px;
  display: flex;
  flex-direction: column;
  animation: mixy-dialog-in 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.mixy-dialog__body {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.mixy-dialog__payment {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mixy-dialog__qr-wrap {
  margin-top: 28px;
  margin-bottom: 12px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.mixy-dialog__close {
  position: absolute;
  top: 32px;
  right: 32px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  line-height: 0;
}

.mixy-dialog__close svg {
  width: 32px;
  height: 32px;
}

.mixy-dialog__title {
  text-align: center;
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 600;
  line-height: 1.1;
}

.mixy-dialog__subtitle {
  text-align: center;
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
}

.mixy-dialog__address {
  text-align: center;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 500;
  word-break: break-all;
}

.mixy-dialog__copy {
  text-align: center;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: color 0.2s ease;
  margin: 0;
}

.mixy-dialog__copy:hover {
  color: #fff;
}

.mixy-dialog__qr {
  display: block;
  margin: 0 auto;
  width: 320px;
  height: 320px;
  max-width: 100%;
  border-radius: 12px;
}

.mixy-dialog__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mixy-dialog__btn {
  min-height: 60px;
  border: 0;
  border-radius: 20px;
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.mixy-dialog__btn:hover {
  opacity: 0.9;
}

.mixy-dialog__btn--secondary {
  background: #2a2a2a;
  color: #fff;
}

.mixy-dialog__btn--primary {
  background: #eedbff;
  color: #1d1d1d;
}

.mixy-dialog__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.mixy-dialog__loader {
  display: inline-flex;
  gap: 10px;
}

.mixy-dialog__loader span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eedbff;
  opacity: 0.6;
  animation: mixy-loader 1s infinite ease-in-out;
}

.mixy-dialog__loader span:nth-child(2) {
  animation-delay: 0.15s;
}

.mixy-dialog__loader span:nth-child(3) {
  animation-delay: 0.3s;
}

.mixy-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  width: min(512px, calc(100% - 32px));
  padding: 20px 24px;
  border-radius: 24px;
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  animation: mixy-dialog-in 0.3s ease;
}

.mixy-toast[hidden] {
  display: none;
}

.mixy-toast__title {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
}

.mixy-toast__desc {
  text-align: center;
  margin-top: 8px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
}

.mixy-toast--error .mixy-toast__title {
  color: #f87171;
}

@keyframes mixy-dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes mixy-loader {
  0%,
  80%,
  100% {
    transform: scale(0.6);
  }
  40% {
    transform: scale(1);
  }
}

@media (max-width: 767px) {
  .mixy-dialog {
    align-items: flex-end;
    padding: 0;
  }

  .mixy-dialog__panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 32px 32px 0 0;
    padding: 48px 20px 24px;
    gap: 40px;
  }

  .mixy-dialog__actions {
    grid-template-columns: 1fr;
  }
}

[data-section-cat] {
  opacity: 0;
  will-change: transform, opacity;
  mix-blend-mode: screen;
  z-index: 10;
}

[data-section-cat] img {
  mix-blend-mode: screen;
}

#mixer {
  overflow: visible;
}

@media (prefers-reduced-motion: reduce) {
  [data-section-cat] {
    opacity: 1 !important;
  }

  .mixy-dialog__panel {
    animation: none;
  }
}
