/* Cloud upload UI — progress, loading, notifications */
.amman-upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  padding: 1rem;
}

.amman-upload-panel {
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  min-width: min(320px, 100%);
  max-width: 400px;
  text-align: center;
  color: #f5f5f5;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.amman-upload-panel h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.amman-upload-panel p {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.amman-upload-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.amman-upload-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #c9a227, #e8c547);
  border-radius: 999px;
  width: 0%;
  transition: width 0.2s ease;
}

.amman-upload-percent {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.amman-upload-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 1rem;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #c9a227;
  border-radius: 50%;
  animation: amman-spin 0.8s linear infinite;
}

@keyframes amman-spin {
  to {
    transform: rotate(360deg);
  }
}

.amman-toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}

.amman-toast {
  pointer-events: auto;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: amman-toast-in 0.3s ease;
}

.amman-toast-success {
  background: #14532d;
  border: 1px solid #22c55e;
  color: #dcfce7;
}

.amman-toast-error {
  background: #450a0a;
  border: 1px solid #ef4444;
  color: #fecaca;
}

.amman-toast-info {
  background: #1e3a5f;
  border: 1px solid #3b82f6;
  color: #dbeafe;
}

@keyframes amman-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .amman-toast-container {
    left: 1rem;
    right: 1rem;
    bottom: max(1rem, env(safe-area-inset-bottom));
  }
}
