@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&display=swap");

.flash-stack {
  position: fixed;
  top: var(--header-offset-mobile);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: grid;
  gap: 10px;
  width: min(92vw, 720px);
  padding: 0 8px;
}

@media (min-width: 1118px) {
  .flash-stack {
    top: var(--header-offset-desktop);
  }
}

.flash {
  --flash-bg:         #ffffff;
  --flash-text:       #111418;
  --flash-border:     #e5e7eb;
  --flash-shadow:     0 12px 28px rgba(15, 23, 42, 0.18);

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;

  background: var(--flash-bg);
  color: var(--flash-text);
  border: 1px solid var(--flash-border);
  border-radius: 12px;
  box-shadow: var(--flash-shadow);
  padding: 12px 14px;

  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  opacity: 0;
  transform: translateY(-8px);
  animation: flash-in 220ms ease-out forwards;
}

.flash-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.flash-notice {
  --flash-accent:      #0f62fe;
  --flash-bg:          #ffffff;
  --flash-border:      #dbeafe;
  color:               #0b1220;
}

.flash-notice .flash-icon {
  color: var(--flash-accent);
}

.flash-alert {
  --flash-accent:      #e71d36;
  --flash-bg:          #fff5f6;
  --flash-border:      #fecaca;
  color:               #611018;
}

.flash-alert .flash-icon {
  font-size: .98rem;
  line-height: 1.45;
}

.flash-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 1.15rem;
  line-height: 1;
  padding: 6px;
  border-radius: 8px;
  cursor: pointer;
}

.flash-close:hover {
  background: #f1f5f9;
}

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

@keyframes flash-out {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@media (max-height: 540px) {
  .flash-stack {
    top: 8px;
  }
}
