:root { font-family: 'Inter', system-ui, sans-serif; }
[x-cloak] { display: none !important; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  height: 2.25rem;
  width: 2.25rem;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  line-height: 1;
  color: rgb(75 85 99);
  transition: background-color .15s, color .15s;
}
.dark .icon-btn { color: rgb(156 163 175); }
.icon-btn:hover { background-color: rgb(243 244 246); color: rgb(17 24 39); }
.dark .icon-btn:hover { background-color: rgb(31 41 55); color: rgb(243 244 246); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.45);
  padding: 1rem;
}
.modal-panel {
  width: 100%;
  max-width: 24rem;
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 20px 40px rgba(0,0,0,.25);
}
.dark .modal-panel { background: rgb(17 24 39); }

.btn-primary {
  border-radius: .5rem;
  padding: .5rem 1rem;
  font-weight: 500;
  color: #fff;
  background: rgb(79 70 229);
}
.btn-primary:hover { background: rgb(67 56 202); }
.btn-secondary {
  border-radius: .5rem;
  padding: .5rem 1rem;
  font-weight: 500;
  background: rgb(243 244 246);
  color: rgb(31 41 55);
}
.dark .btn-secondary { background: rgb(31 41 55); color: rgb(229 231 235); }

/* --- Storage destination chips ---------------------------------------
   Inactive: colored outline only. Active (.is-active): pastel fill plus a
   darker outline. Tuned for readability in both light and dark themes. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border-radius: 9999px;
  border: 1.5px solid transparent;
  font-weight: 600;
  line-height: 1.1;
  background: transparent;
  transition: background-color .15s, border-color .15s, color .15s;
}

/* SFTP — blue */
.chip-sftp            { border-color: #60a5fa; color: #1d4ed8; }
.chip-sftp.is-active  { background: #dbeafe; border-color: #2563eb; color: #1e3a8a; }
.dark .chip-sftp            { border-color: rgba(96,165,250,.65); color: #93c5fd; }
.dark .chip-sftp.is-active  { background: rgba(59,130,246,.28); border-color: #60a5fa; color: #dbeafe; }

/* GDrive — amber */
.chip-gdrive            { border-color: #fbbf24; color: #b45309; }
.chip-gdrive.is-active  { background: #fef3c7; border-color: #d97706; color: #78350f; }
.dark .chip-gdrive            { border-color: rgba(251,191,36,.65); color: #fcd34d; }
.dark .chip-gdrive.is-active  { background: rgba(245,158,11,.28); border-color: #fbbf24; color: #fef3c7; }

/* Local — emerald */
.chip-local            { border-color: #34d399; color: #047857; }
.chip-local.is-active  { background: #d1fae5; border-color: #059669; color: #064e3b; }
.dark .chip-local            { border-color: rgba(52,211,153,.65); color: #6ee7b7; }
.dark .chip-local.is-active  { background: rgba(16,185,129,.28); border-color: #34d399; color: #d1fae5; }

/* --- Indeterminate progress bar -------------------------------------
   For transfer steps with no measurable percentage (e.g. rclone deletes):
   a slim segment that sweeps across the track to signal ongoing work. */
.bar-indeterminate {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  border-radius: 9999px;
  animation: bar-sweep 1.1s ease-in-out infinite;
}
@keyframes bar-sweep {
  0%   { left: -40%; }
  100% { left: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .bar-indeterminate { animation: none; left: 0; width: 100%; opacity: .6; }
}
