/* Barra contextual cambios no guardados — estilo Tuko */
.tuko-unsaved-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 1.15rem;
  z-index: 9000;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
  pointer-events: none;
}

.tuko-unsaved-bar[hidden] {
  display: none !important;
}

.tuko-unsaved-bar-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 36rem;
  padding: 0.7rem 0.85rem 0.7rem 1.05rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.12),
    0 2px 8px rgba(61, 80, 242, 0.08);
  animation: tuko-unsaved-bar-in 0.22s ease;
}

@keyframes tuko-unsaved-bar-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tuko-unsaved-bar-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.tuko-unsaved-bar-dot {
  width: 0.5rem;
  height: 0.5rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: #3d50f2;
  box-shadow: 0 0 0 4px rgba(61, 80, 242, 0.15);
}

.tuko-unsaved-bar-label {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.8125rem;
  font-weight: 650;
  color: #0f172a;
  letter-spacing: -0.015em;
}

.tuko-unsaved-bar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.tuko-unsaved-bar-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.95rem;
  border-radius: 0.65rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}

.tuko-unsaved-bar-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tuko-unsaved-bar-btn--ghost {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.tuko-unsaved-bar-btn--ghost:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.tuko-unsaved-bar-btn--primary {
  background: #3d50f2;
  border: 1px solid #3d50f2;
  color: #fff;
  box-shadow: 0 4px 12px rgba(61, 80, 242, 0.28);
}

.tuko-unsaved-bar-btn--primary:hover:not(:disabled) {
  background: #2f3fd0;
}

.tuko-unsaved-bar-btn--primary.is-saving {
  cursor: wait;
}

html[data-tuko-theme="dark"] .tuko-unsaved-bar-inner {
  background: #1a2d48;
  border-color: #3d5a80;
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.12),
    0 16px 40px rgba(0, 0, 0, 0.55),
    0 4px 12px rgba(61, 80, 242, 0.18);
}

html[data-tuko-theme="dark"] .tuko-unsaved-bar-label {
  color: #f8fafc;
}

html[data-tuko-theme="dark"] .tuko-unsaved-bar-btn--ghost {
  background: #122338;
  border-color: #4a6a90;
  color: #e2e8f0;
}

html[data-tuko-theme="dark"] .tuko-unsaved-bar-btn--ghost:hover:not(:disabled) {
  background: #1e3552;
  border-color: #5b7ea8;
  color: #fff;
}

html[data-tuko-theme="dark"] .tuko-unsaved-bar-btn--primary {
  box-shadow: 0 4px 16px rgba(61, 80, 242, 0.45);
}
