/* Phase 8A-3a — Error Surfaces */

.mp-toast-host {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(420px, calc(100vw - 24px));
  pointer-events: none;
}

.mp-toast {
  pointer-events: auto;
  position: relative;
  padding: 12px 36px 12px 14px;
  border-radius: 10px;
  background: #1f2937;
  color: #f8fafc;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
  font-size: 0.92rem;
  line-height: 1.45;
  animation: mp-toast-in 0.22s ease-out;
}

.mp-toast--error {
  background: #7f1d1d;
  border: 1px solid rgba(254, 202, 202, 0.35);
}

.mp-toast__rid {
  margin-top: 6px;
  font-size: 0.78rem;
  opacity: 0.85;
  font-family: ui-monospace, Consolas, monospace;
}

.mp-toast__close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}

.mp-inline-error {
  margin: 6px 0 0;
  color: #b91c1c;
  font-size: 0.82rem;
}

.mp-fatal {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.mp-fatal__card {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  text-align: center;
}

.mp-fatal__title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  color: #111827;
}

.mp-fatal__msg {
  margin: 0;
  color: #4b5563;
  line-height: 1.5;
}

.mp-fatal__rid {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: #6b7280;
  font-family: ui-monospace, Consolas, monospace;
}

.mp-fatal__actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.mp-fatal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid #d1d5db;
  color: #111827;
  background: #f9fafb;
  font-weight: 600;
}

.mp-fatal__btn--primary {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

@keyframes mp-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
