/* Floating flash toasts — centered in viewport without affecting page layout */
.sl-flash-toast-region{
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  pointer-events: none;
  padding:
    max(.75rem, env(safe-area-inset-top, 0px))
    max(.75rem, env(safe-area-inset-right, 0px))
    max(.75rem, env(safe-area-inset-bottom, 0px))
    max(.75rem, env(safe-area-inset-left, 0px));
}

.sl-flash-toast-region--owner::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 35, 55, .14);
  pointer-events: none;
}

.sl-flash-toast{
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  width: min(24rem, calc(100vw - 1.5rem));
  padding: .75rem .9rem;
  border-radius: .75rem;
  border: 1px solid transparent;
  box-shadow: 0 .35rem 1rem rgba(26, 61, 92, .16);
  background: #fff;
  color: #1f2937;
  font-size: .95rem;
  line-height: 1.45;
  pointer-events: auto;
  opacity: 0;
  transform: scale(.97);
  transition: opacity .2s ease, transform .2s ease;
}

.sl-flash-toast.is-visible{
  opacity: 1;
  transform: scale(1);
}

.sl-flash-toast.is-hiding{
  opacity: 0;
  transform: scale(.98);
}

.sl-flash-toast--success{
  border-color: rgba(25, 135, 84, .28);
  background: #f3fbf6;
  color: #0f5132;
}

.sl-flash-toast--info{
  border-color: rgba(13, 110, 253, .22);
  background: #f3f8ff;
  color: #084298;
}

.sl-flash-toast--warning{
  border-color: rgba(255, 193, 7, .45);
  background: #fff9e8;
  color: #664d03;
}

.sl-flash-toast--danger,
.sl-flash-toast--error{
  border-color: rgba(220, 53, 69, .28);
  background: #fff5f5;
  color: #842029;
}

.sl-flash-toast-message{
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}

.sl-flash-toast-close{
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: .5rem;
  background: transparent;
  color: inherit;
  font-size: 1.35rem;
  line-height: 1;
  opacity: .65;
  cursor: pointer;
  margin: -.15rem -.25rem -.15rem 0;
}

.sl-flash-toast-close:hover,
.sl-flash-toast-close:focus{
  opacity: 1;
  background: rgba(0, 0, 0, .06);
}

.sl-flash-toast-close:focus{
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Owner portal: larger, easier-to-read centered confirmations */
body[data-owner-scroll-preserve] .sl-flash-toast{
  width: min(36rem, calc(100vw - 2rem));
  padding: 1.15rem 1.3rem;
  font-size: 1.2rem;
  line-height: 1.5;
  border-radius: .9rem;
  box-shadow: 0 .65rem 1.75rem rgba(26, 61, 92, .24);
}

body[data-owner-scroll-preserve] .sl-flash-toast-close{
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.65rem;
}

html.sl-scroll-restoring{
  scroll-behavior: auto !important;
}

@media (max-width: 767.98px){
  .sl-flash-toast{
    font-size: .92rem;
    padding: .85rem 1rem;
  }

  .sl-flash-toast-close{
    width: 2.35rem;
    height: 2.35rem;
  }

  body[data-owner-scroll-preserve] .sl-flash-toast{
    width: min(34rem, calc(100vw - 1.25rem));
    font-size: 1.08rem;
    padding: 1rem 1.1rem;
  }

  body[data-owner-scroll-preserve] .sl-flash-toast-close{
    width: 2.85rem;
    height: 2.85rem;
  }
}
