.toast-container {
  position: fixed;
  bottom: 10vh;
  left: 40vw;
  width: 20vw;
  z-index: 9999;
  text-align: center;
}

.toast {
  background-color: #333;
  color: white;
  padding: 15px 25px;
  border-radius: 5px;
  margin-top: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease-in-out;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast {
  position: relative;
  padding-right: 32px;
}

.toast-message {
  display: block;
  text-align: left;
}

.toast-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  opacity: 0.6;
}

.toast-close:hover {
  opacity: 1;
}

.toast.success {
  /* background-color: #4CAF50; */
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.toast.error {
  /* background-color: #F44336; */
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.toast.warning {
  /* background-color: #FF9800; */
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.toast.info {
  /* background-color: #2196F3; */
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

@media (max-width: 600px) {
  .toast-container {
    left: 5vw;
    width: 90vw;
    right: 5vw;
    min-width: unset;
    max-width: unset;
  }
}

/* ---- Dialog (alert / confirm) ---- */
.dialog-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dialog-overlay.show {
  opacity: 1;
}

.dialog-box {
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px 20px;
  min-width: 280px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  transform: scale(0.9);
  transition: transform 0.2s ease;
}

.dialog-overlay.show .dialog-box {
  transform: scale(1);
}

.dialog-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.dialog-body {
  color: #555;
  margin-bottom: 22px;
  line-height: 1.5;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.dialog-btn {
  padding: 8px 22px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: opacity 0.15s;
}

/* ---- Loading overlay (instant feedback while a request is in flight) ---- */
.loading-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.25);
  z-index: 10600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.loading-overlay.show {
  opacity: 1;
}

.loading-overlay .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: loading-spin 0.7s linear infinite;
}

.loading-overlay .loading-text {
  margin-top: 10px;
  color: #fff;
  font-size: 0.95rem;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

/* ---- Busy state for individual buttons (order screen add/sub/cancel) ---- */
.btn-busy {
  position: relative;
  pointer-events: none;
}

.btn-busy::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: 0 !important;
  width: 100% !important; height: 100% !important;
  background: rgba(13, 110, 253, 0.55) !important;
  border-radius: inherit !important;
  z-index: 1;
}

.btn-busy::after {
  content: '' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 18px !important;
  height: 18px !important;
  margin: -9px 0 0 -9px !important;
  border: 2px solid rgba(255, 255, 255, 0.35) !important;
  border-top-color: #fff !important;
  border-radius: 50% !important;
  animation: loading-spin 0.6s linear infinite !important;
  z-index: 2;
}

.dialog-btn:hover {
  opacity: 0.82;
}

.dialog-btn-primary {
  background: #0d6efd;
  color: #fff;
}

.dialog-btn-secondary {
  background: #e9ecef;
  color: #333;
}

.dialog-btn-danger {
  background: #dc3545;
  color: #fff;
}