/*
 * Asetusnäkymän ilmoitus näkyy aina katselualueella.
 */

#settings-message.settings-toast {
  position: fixed;
  top: 16px;
  top: calc(16px + env(safe-area-inset-top));
  right: 18px;
  z-index: 10000;
  box-sizing: border-box;
  width: min(420px, calc(100vw - 36px));
  margin: 0;
  padding: 15px 18px;
  border: 1px solid #cfdaea;
  border-radius: 14px;
  color: #10254a;
  background: #ffffff;
  box-shadow:
    0 16px 42px rgba(16, 37, 74, 0.20),
    0 3px 10px rgba(16, 37, 74, 0.10);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  animation: ov-settings-toast-in 180ms ease-out;
}

#settings-message.settings-toast.success {
  color: #145c34;
  background: #ecfaf1;
  border-color: #9ed8b2;
}

#settings-message.settings-toast.success::before {
  content: "✓";
  display: inline-block;
  margin-right: 9px;
  font-size: 17px;
  font-weight: 900;
}

#settings-message.settings-toast.error {
  color: #8c1d2c;
  background: #fff0f2;
  border-color: #efadb7;
}

#settings-message.settings-toast.error::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 9px;
  border-radius: 50%;
  color: #ffffff;
  background: #a62335;
  font-size: 14px;
  font-weight: 900;
}

@keyframes ov-settings-toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  #settings-message.settings-toast {
    top: 12px;
    top: calc(12px + env(safe-area-inset-top));
    right: 12px;
    left: 12px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  #settings-message.settings-toast {
    animation: none;
  }
}
