/* =============================================================================
   DIMAQ — Toast notification styles
   Kontener bottom-right, stack column-reverse (najnowszy toast NAJWYŻEJ,
   starsze przesuwają się w dół — natural stacking behavior).
   ========================================================================== */

.dimaq-toast-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: calc(100vw - 48px);
  width: 480px;
  pointer-events: none;   /* przepuszcza kliki poza toastami */
}

/* =============================================================================
   Toast card
   ========================================================================== */

.dimaq-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  pointer-events: auto;
  font-family: "Fira Sans", sans-serif;

  /* animacja wejścia */
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 200ms ease, transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.dimaq-toast--visible {
  opacity: 1;
  transform: translateX(0);
}

.dimaq-toast--leaving {
  opacity: 0;
  transform: translateX(24px);
}

/* -----------------------------------------------------------------------------
   Icon
   -------------------------------------------------------------------------- */

.dimaq-toast__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
}

.dimaq-toast__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* -----------------------------------------------------------------------------
   Body
   -------------------------------------------------------------------------- */

.dimaq-toast__body {
  flex: 1;
  min-width: 0;
  padding-top: 4px;   /* wizualnie zrównuje z ikoną */
}

.dimaq-toast__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--dimaq-gray100, #212121);
  word-wrap: break-word;
}

.dimaq-toast__desc {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--dimaq-gray80, #424242);
  word-wrap: break-word;
}

/* -----------------------------------------------------------------------------
   Close button
   -------------------------------------------------------------------------- */

.dimaq-toast__close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--dimaq-gray60, #757575);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.dimaq-toast__close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--dimaq-gray100, #212121);
}

.dimaq-toast__close:focus-visible {
  outline: 2px solid var(--dimaq-primary50, #EF1800);
  outline-offset: 2px;
}

/* =============================================================================
   Variants
   ========================================================================== */

/* RED (alert / error) — screen z Figmy */
.dimaq-toast--red {
  background: var(--dimaq-alert05, #FFEEEE);
  border-color: var(--dimaq-alert10, #FFCECE);
}
.dimaq-toast--red .dimaq-toast__icon {
  background: var(--dimaq-alert50, #EF1800);
}

/* GREEN (success) */
.dimaq-toast--green {
  background: var(--dimaq-success05, #EAF9F0);
  border-color: var(--dimaq-success10, #C4EFD4);
}
.dimaq-toast--green .dimaq-toast__icon {
  background: var(--dimaq-success50, #10B981);
}

/* BLUE (info) */
.dimaq-toast--blue {
  background: var(--dimaq-info05, #E8F1FE);
  border-color: var(--dimaq-info10, #C4DBFA);
}
.dimaq-toast--blue .dimaq-toast__icon {
  background: var(--dimaq-info50, #3B82F6);
}

/* YELLOW (warning) */
.dimaq-toast--yellow {
  background: var(--dimaq-warning05, #FEF7E6);
  border-color: var(--dimaq-warning10, #FCE7B6);
}
.dimaq-toast--yellow .dimaq-toast__icon {
  background: var(--dimaq-warning50, #F59E0B);
}

/* =============================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
  .dimaq-toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    max-width: none;
  }

  .dimaq-toast {
    padding: 14px 16px;
  }

  .dimaq-toast__title {
    font-size: 13px;
  }

  .dimaq-toast__desc {
    font-size: 12px;
  }
}
