/* Dialog Backdrop */
.dialog-backdrop {
  position: fixed;
  z-index: 1000;
  background: rgb(0 0 0 / 30%);
  inset: 0;
  opacity: 0;
  will-change: transform, opacity;
}

.dialog-backdrop[data-state="closed"] {
  pointer-events: none;
  animation: dialog-backdrop-animate-out 150ms ease-in forwards;
}

@keyframes dialog-backdrop-animate-out {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.95) translateY(-2px);
  }
}

.dialog-backdrop[data-state="open"] {
  animation: dialog-content-animate-in 150ms ease-out forwards;
}

@keyframes dialog-content-animate-in {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Dialog Container - improved for theme consistency */
.dialog {
  position: fixed;
  z-index: 1001;
  top: 50%;
  left: 50%;
  display: flex;
  width: 100%;
  max-width: calc(100% - 2rem);
  box-sizing: border-box;
  flex-direction: column;
  padding: 32px 24px 24px;
  border: 1px solid var(--primary-color-6);
  border-radius: 8px;
  margin: 0;
  background: var(--primary-color-2);
  box-shadow: 0 2px 10px rgb(0 0 0 / 18%);
  color: var(--secondary-color-4);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  gap: 16px;
  text-align: center;
  transform: translate(-50%, -50%);
}

.dialog-title {
  margin: 0;
  color: var(--secondary-color-4);
  font-size: 1.25rem;
  font-weight: 700;
}

.dialog-description {
  margin: 0;
  color: var(--secondary-color-5);
  font-size: 1rem;
}

@media (width >= 40rem) {
  .dialog {
    max-width: 32rem;
    text-align: left;
  }
}

.dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  align-self: flex-start;
  padding: 0;
  border: none;
  margin: 0;
  background: none;
  color: var(--secondary-color-3);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.dialog-close:hover {
  color: var(--secondary-color-1);
}
