/* Oznámení (toast): inverzní plocha, desktop vpravo dole, mobil dole přes celou šířku. */

.toast-region {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-height: 56px;
  padding: 12px 8px 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--st-surface-inverse);
  color: var(--st-text-inverse);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 24px rgba(14, 15, 12, 0.22);
}

.toast__icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: var(--st-success-soft);
  color: var(--st-success-text);
}

.toast--info .toast__icon {
  background: var(--st-info-soft);
  color: var(--st-info-text);
}

.toast__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.toast__title {
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
}

.toast__text {
  font-size: 13px;
  line-height: 18px;
  color: var(--st-text-inverse-secondary);
}

/* Zpět: obyčejný formulář (funguje bez JS), tlačítko jako návrh (accent-inverse, 40 px). */
.toast form {
  flex: none;
  margin: 0;
}

.toast__action {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 9999px;
  background: var(--st-accent-inverse);
  color: var(--st-on-accent-inverse);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.toast__action:hover {
  background: var(--st-accent-inverse-hover);
}

.toast__close {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--st-text-inverse);
  cursor: pointer;
}

/* Tlačítko zavřít se zobrazí až s JS (bez něj oznámení zůstane). */
.toast__close[hidden] {
  display: none;
}

.toast[hidden] {
  display: none;
}

/* Stránka dostane dole místo, aby šel obsah odscrollovat nad oznámení. */
body:has(.toast-region .toast:not([hidden])) .site-main {
  padding-bottom: 96px;
}

@media (min-width: 768px) {
  .toast-region {
    right: 24px;
    bottom: 24px;
    left: auto;
    width: min(440px, calc(100vw - 48px));
  }

  .toast {
    min-width: 352px;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(14, 15, 12, 0.28);
  }

  body:has(.toast-region .toast:not([hidden])) .site-main {
    padding-bottom: 88px;
  }
}
