/* ============================================================
   Toast Component
   ============================================================ */

.toast-container {
  position: fixed;
  top: calc(60px + env(safe-area-inset-top, 0px));
  left: 12px;
  right: 12px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 480px;
  margin: 0 auto;
}

.toast {
  background: #1a1715;
  border: 1px solid #4a3f38;
  border-left: 4px solid #b8956a;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5),
              0 2px 6px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
}

.toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--leaving {
  opacity: 0;
  transform: translateY(-16px);
}

/* Tipos */
.toast--info {
  border-left-color: #4a90d9;
}
.toast--success {
  border-left-color: #2ecc71;
}
.toast--warning {
  border-left-color: #e67e22;
}
.toast--error {
  border-left-color: #e74c3c;
}

.toast__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.toast__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toast__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f5f0eb;
  line-height: 1.3;
  word-break: break-word;
}

.toast__body {
  font-size: 0.75rem;
  color: #b8956a;
  line-height: 1.4;
  word-break: break-word;
}

.toast__close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: #b8956a;
  font-size: 1.3rem;
  line-height: 1;
  padding: 0;
  width: 22px;
  height: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.toast__close:hover {
  color: #f5f0eb;
  background: rgba(255, 255, 255, 0.05);
}

/* Respeitar prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: opacity 0.1s ease;
    transform: none;
  }
  .toast--visible,
  .toast--leaving {
    transform: none;
  }
}
